| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 * **docgen** is a tool for creating machine readable representations of Dart | 6 * **docgen** is a tool for creating machine readable representations of Dart |
| 7 * code metadata, including: classes, members, comments and annotations. | 7 * code metadata, including: classes, members, comments and annotations. |
| 8 * | 8 * |
| 9 * docgen is run on a `.dart` file or a directory containing `.dart` files. | 9 * docgen is run on a `.dart` file or a directory containing `.dart` files. |
| 10 * | 10 * |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 270 |
| 271 /** | 271 /** |
| 272 * Returns true if a library name starts with an underscore, and false | 272 * Returns true if a library name starts with an underscore, and false |
| 273 * otherwise. | 273 * otherwise. |
| 274 * | 274 * |
| 275 * An example that starts with _ is _js_helper. | 275 * An example that starts with _ is _js_helper. |
| 276 * An example that contains ._ is dart._collection.dev | 276 * An example that contains ._ is dart._collection.dev |
| 277 */ | 277 */ |
| 278 // This is because LibraryMirror.isPrivate returns `false` all the time. | 278 // This is because LibraryMirror.isPrivate returns `false` all the time. |
| 279 bool _isLibraryPrivate(LibraryMirror mirror) { | 279 bool _isLibraryPrivate(LibraryMirror mirror) { |
| 280 if (mirror.simpleName.startsWith('_') || mirror.simpleName.contains('._')) { | 280 var sdkLibrary = LIBRARIES[mirror.simpleName]; |
| 281 if (sdkLibrary != null) { |
| 282 return !sdkLibrary.documented; |
| 283 } else if (mirror.simpleName.startsWith('_') || |
| 284 mirror.simpleName.contains('._')) { |
| 281 return true; | 285 return true; |
| 282 } | 286 } |
| 283 return false; | 287 return false; |
| 284 } | 288 } |
| 285 | 289 |
| 286 /** | 290 /** |
| 287 * A declaration is private if itself is private, or the owner is private. | 291 * A declaration is private if itself is private, or the owner is private. |
| 288 */ | 292 */ |
| 289 // Issue(12202) - A declaration is public even if it's owner is private. | 293 // Issue(12202) - A declaration is public even if it's owner is private. |
| 290 bool _isHidden(DeclarationMirror mirror) { | 294 bool _isHidden(DeclarationMirror mirror) { |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 String qualifiedName; | 1080 String qualifiedName; |
| 1077 List<String> parameters; | 1081 List<String> parameters; |
| 1078 | 1082 |
| 1079 Annotation(this.qualifiedName, this.parameters); | 1083 Annotation(this.qualifiedName, this.parameters); |
| 1080 | 1084 |
| 1081 Map toMap() => { | 1085 Map toMap() => { |
| 1082 'name': qualifiedName, | 1086 'name': qualifiedName, |
| 1083 'parameters': parameters | 1087 'parameters': parameters |
| 1084 }; | 1088 }; |
| 1085 } | 1089 } |
| OLD | NEW |