| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 * Defines the element model. The element model describes the semantic (as | 6 * Defines the element model. The element model describes the semantic (as |
| 7 * opposed to syntactic) structure of Dart code. The syntactic structure of the | 7 * opposed to syntactic) structure of Dart code. The syntactic structure of the |
| 8 * code is modeled by the [AST structure](../ast/ast.dart). | 8 * code is modeled by the [AST structure](../ast/ast.dart). |
| 9 * | 9 * |
| 10 * The element model consists of two closely related kinds of objects: elements | 10 * The element model consists of two closely related kinds of objects: elements |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 */ | 639 */ |
| 640 bool get isProtected; | 640 bool get isProtected; |
| 641 | 641 |
| 642 /** | 642 /** |
| 643 * Return `true` if this element is public. Public elements are visible within | 643 * Return `true` if this element is public. Public elements are visible within |
| 644 * any library that imports the library in which they are declared. | 644 * any library that imports the library in which they are declared. |
| 645 */ | 645 */ |
| 646 bool get isPublic; | 646 bool get isPublic; |
| 647 | 647 |
| 648 /** | 648 /** |
| 649 * Return `true` if this element has an annotation of the form '@required'. |
| 650 */ |
| 651 bool get isRequired; |
| 652 |
| 653 /** |
| 649 * Return `true` if this element is synthetic. A synthetic element is an | 654 * Return `true` if this element is synthetic. A synthetic element is an |
| 650 * element that is not represented in the source code explicitly, but is | 655 * element that is not represented in the source code explicitly, but is |
| 651 * implied by the source code, such as the default constructor for a class | 656 * implied by the source code, such as the default constructor for a class |
| 652 * that does not explicitly define any constructors. | 657 * that does not explicitly define any constructors. |
| 653 */ | 658 */ |
| 654 bool get isSynthetic; | 659 bool get isSynthetic; |
| 655 | 660 |
| 656 /** | 661 /** |
| 657 * Return the kind of element that this is. | 662 * Return the kind of element that this is. |
| 658 */ | 663 */ |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 * Return `true` if this annotation marks the associated member as being | 828 * Return `true` if this annotation marks the associated member as being |
| 824 * protected. | 829 * protected. |
| 825 */ | 830 */ |
| 826 bool get isProtected; | 831 bool get isProtected; |
| 827 | 832 |
| 828 /** | 833 /** |
| 829 * Return `true` if this annotation marks the associated class as implementing | 834 * Return `true` if this annotation marks the associated class as implementing |
| 830 * a proxy object. | 835 * a proxy object. |
| 831 */ | 836 */ |
| 832 bool get isProxy; | 837 bool get isProxy; |
| 838 |
| 839 /** |
| 840 * Return `true` if this annotation marks the associated member as being |
| 841 * required. |
| 842 */ |
| 843 bool get isRequired; |
| 833 } | 844 } |
| 834 | 845 |
| 835 /** | 846 /** |
| 836 * The enumeration `ElementKind` defines the various kinds of elements in the | 847 * The enumeration `ElementKind` defines the various kinds of elements in the |
| 837 * element model. | 848 * element model. |
| 838 * | 849 * |
| 839 * Clients may not extend, implement or mix-in this class. | 850 * Clients may not extend, implement or mix-in this class. |
| 840 */ | 851 */ |
| 841 class ElementKind extends Enum<ElementKind> { | 852 class ElementKind extends Enum<ElementKind> { |
| 842 static const ElementKind CLASS = const ElementKind('CLASS', 0, "class"); | 853 static const ElementKind CLASS = const ElementKind('CLASS', 0, "class"); |
| (...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1968 */ | 1979 */ |
| 1969 bool get isStatic; | 1980 bool get isStatic; |
| 1970 | 1981 |
| 1971 /** | 1982 /** |
| 1972 * Return the declared type of this variable, or `null` if the variable did | 1983 * Return the declared type of this variable, or `null` if the variable did |
| 1973 * not have a declared type (such as if it was declared using the keyword | 1984 * not have a declared type (such as if it was declared using the keyword |
| 1974 * 'var'). | 1985 * 'var'). |
| 1975 */ | 1986 */ |
| 1976 DartType get type; | 1987 DartType get type; |
| 1977 } | 1988 } |
| OLD | NEW |