| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * To generate docs for a library, run this script with the path to an | 6 * To generate docs for a library, run this script with the path to an |
| 7 * entrypoint .dart file, like: | 7 * entrypoint .dart file, like: |
| 8 * | 8 * |
| 9 * $ dart dartdoc.dart foo.dart | 9 * $ dart dartdoc.dart foo.dart |
| 10 * | 10 * |
| (...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 void docConstructors(InterfaceMirror type) { | 977 void docConstructors(InterfaceMirror type) { |
| 978 final constructors = <MethodMirror>[]; | 978 final constructors = <MethodMirror>[]; |
| 979 for (var constructor in type.constructors.getValues()) { | 979 for (var constructor in type.constructors.getValues()) { |
| 980 if (!constructor.isPrivate) { | 980 if (!constructor.isPrivate) { |
| 981 constructors.add(constructor); | 981 constructors.add(constructor); |
| 982 } | 982 } |
| 983 } | 983 } |
| 984 | 984 |
| 985 if (constructors.length > 0) { | 985 if (constructors.length > 0) { |
| 986 writeln('<h3>Constructors</h3>'); | 986 writeln('<h3>Constructors</h3>'); |
| 987 constructors.sort((x, y) => x.simpleName.toUpperCase().compareTo( | 987 constructors.sort((x, y) => x.constructorName.toUpperCase().compareTo( |
| 988 y.simpleName.toUpperCase())); | 988 y.constructorName.toUpperCase())); |
| 989 | 989 |
| 990 for (final constructor in constructors) { | 990 for (final constructor in constructors) { |
| 991 docMethod(type, constructor); | 991 docMethod(type, constructor); |
| 992 } | 992 } |
| 993 } | 993 } |
| 994 } | 994 } |
| 995 | 995 |
| 996 void docMembers(ObjectMirror host) { | 996 void docMembers(ObjectMirror host) { |
| 997 // Collect the different kinds of members. | 997 // Collect the different kinds of members. |
| 998 final staticMethods = []; | 998 final staticMethods = []; |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1575 | 1575 |
| 1576 /** | 1576 /** |
| 1577 * Used to report an unexpected error in the DartDoc tool or the | 1577 * Used to report an unexpected error in the DartDoc tool or the |
| 1578 * underlying data | 1578 * underlying data |
| 1579 */ | 1579 */ |
| 1580 class InternalError { | 1580 class InternalError { |
| 1581 final String message; | 1581 final String message; |
| 1582 const InternalError(this.message); | 1582 const InternalError(this.message); |
| 1583 String toString() => "InternalError: '$message'"; | 1583 String toString() => "InternalError: '$message'"; |
| 1584 } | 1584 } |
| OLD | NEW |