| 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 library mirrors; | 5 library mirrors; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * The main interface for the whole mirror system. | 8 * The main interface for the whole mirror system. |
| 9 */ | 9 */ |
| 10 abstract class MirrorSystem { | 10 abstract class MirrorSystem { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 * unnamed constructor for [:class Foo:] the simple name is ''. For a | 57 * unnamed constructor for [:class Foo:] the simple name is ''. For a |
| 58 * constructor for [:class Foo:] named 'named' the simple name is 'named'. | 58 * constructor for [:class Foo:] named 'named' the simple name is 'named'. |
| 59 * For a property [:foo:] the simple name of the getter method is 'foo' and | 59 * For a property [:foo:] the simple name of the getter method is 'foo' and |
| 60 * the simple name of the setter is 'foo='. For operators the simple name is | 60 * the simple name of the setter is 'foo='. For operators the simple name is |
| 61 * the operator itself, for example '+' for [:operator +:]. | 61 * the operator itself, for example '+' for [:operator +:]. |
| 62 * | 62 * |
| 63 * The simple name for the unary minus operator is [Mirror.UNARY_MINUS]. | 63 * The simple name for the unary minus operator is [Mirror.UNARY_MINUS]. |
| 64 */ | 64 */ |
| 65 String get simpleName; | 65 String get simpleName; |
| 66 | 66 |
| 67 /// Returns `true` if the name of this declaration is generated by the |
| 68 /// provider of the mirror system. |
| 69 bool get isNameSynthetic; |
| 70 |
| 67 /** | 71 /** |
| 68 * Returns the name of this entity qualified by is enclosing context. For | 72 * Returns the name of this entity qualified by is enclosing context. For |
| 69 * instance, the qualified name of a method 'method' in class 'Class' in | 73 * instance, the qualified name of a method 'method' in class 'Class' in |
| 70 * library 'library' is 'library.Class.method'. | 74 * library 'library' is 'library.Class.method'. |
| 71 */ | 75 */ |
| 72 String get qualifiedName; | 76 String get qualifiedName; |
| 73 | 77 |
| 74 /** | 78 /** |
| 75 * The source location of this Dart language entity. | 79 * The source location of this Dart language entity. |
| 76 */ | 80 */ |
| (...skipping 23 matching lines...) Expand all Loading... |
| 100 bool get isTopLevel; | 104 bool get isTopLevel; |
| 101 | 105 |
| 102 /** | 106 /** |
| 103 * A list of the metadata associated with this declaration. | 107 * A list of the metadata associated with this declaration. |
| 104 */ | 108 */ |
| 105 List<InstanceMirror> get metadata; | 109 List<InstanceMirror> get metadata; |
| 106 | 110 |
| 107 /** | 111 /** |
| 108 * Looks up [name] in the scope of this declaration. | 112 * Looks up [name] in the scope of this declaration. |
| 109 * | 113 * |
| 110 * [name] may be either a single identifier, like 'foo', or of the | 114 * [name] may be either a single identifier, like 'foo', or of the |
| 111 * a prefixed identifier, like 'foo.bar', where 'foo' must be a prefix. | 115 * a prefixed identifier, like 'foo.bar', where 'foo' must be a prefix. |
| 112 * For methods and constructors, the scope includes the parameters. For | 116 * For methods and constructors, the scope includes the parameters. For |
| 113 * classes and typedefs, the scope includes the type variables. | 117 * classes and typedefs, the scope includes the type variables. |
| 114 * For classes and class members, the scope includes inherited members. | 118 * For classes and class members, the scope includes inherited members. |
| 115 * | 119 * |
| 116 * See also: | 120 * See also: |
| 117 * | 121 * |
| 118 * * [Lexical Scope](https://www.dartlang.org/docs/dart-up-and-running/content
s/ch02.html#ch02-lexical-scope) | 122 * * [Lexical Scope](https://www.dartlang.org/docs/dart-up-and-running/content
s/ch02.html#ch02-lexical-scope) |
| 119 * in Dart Up and Running. | 123 * in Dart Up and Running. |
| 120 * * [Lexical Scoping](http://www.dartlang.org/docs/spec/latest/dart-language-
specification.html#h.jb82efuudrc5) | 124 * * [Lexical Scoping](http://www.dartlang.org/docs/spec/latest/dart-language-
specification.html#h.jb82efuudrc5) |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 * typedef. | 365 * typedef. |
| 362 */ | 366 */ |
| 363 ClassMirror get superclass; | 367 ClassMirror get superclass; |
| 364 | 368 |
| 365 /** | 369 /** |
| 366 * Returns a list of the interfaces directly implemented by this type. | 370 * Returns a list of the interfaces directly implemented by this type. |
| 367 */ | 371 */ |
| 368 List<ClassMirror> get superinterfaces; | 372 List<ClassMirror> get superinterfaces; |
| 369 | 373 |
| 370 /** | 374 /** |
| 375 * The mixin of this class. If this class is the result of a mixin application |
| 376 * of the form S with M, returns a class mirror on M. Otherwise return the |
| 377 * class mirror itself. |
| 378 */ |
| 379 ClassMirror get mixin; |
| 380 |
| 381 /** |
| 371 * Is [:true:] iff this type is a class. | 382 * Is [:true:] iff this type is a class. |
| 372 */ | 383 */ |
| 373 bool get isClass; | 384 bool get isClass; |
| 374 | 385 |
| 375 /** | 386 /** |
| 376 * Is this the original declaration of this type? | 387 * Is this the original declaration of this type? |
| 377 * | 388 * |
| 378 * For most classes, they are their own original declaration. For | 389 * For most classes, they are their own original declaration. For |
| 379 * generic classes, however, there is a distinction between the | 390 * generic classes, however, there is a distinction between the |
| 380 * original class declaration, which has unbound type variables, and | 391 * original class declaration, which has unbound type variables, and |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 /** | 700 /** |
| 690 * Returns the URI where the source originated. | 701 * Returns the URI where the source originated. |
| 691 */ | 702 */ |
| 692 Uri get sourceUri; | 703 Uri get sourceUri; |
| 693 | 704 |
| 694 /** | 705 /** |
| 695 * Returns the text of this source. | 706 * Returns the text of this source. |
| 696 */ | 707 */ |
| 697 String get sourceText; | 708 String get sourceText; |
| 698 } | 709 } |
| OLD | NEW |