Chromium Code Reviews| 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 elements; | 5 library elements; |
| 6 | 6 |
| 7 | 7 |
| 8 import '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
| 9 import '../tree/tree.dart'; | 9 import '../tree/tree.dart'; |
| 10 import '../util/util.dart'; | 10 import '../util/util.dart'; |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 829 | 829 |
| 830 void forEachLocalMember(f(Element element)); | 830 void forEachLocalMember(f(Element element)); |
| 831 } | 831 } |
| 832 | 832 |
| 833 abstract class CompilationUnitElement extends Element { | 833 abstract class CompilationUnitElement extends Element { |
| 834 /// Use [library] instead. | 834 /// Use [library] instead. |
| 835 @deprecated | 835 @deprecated |
| 836 get enclosingElement; | 836 get enclosingElement; |
| 837 | 837 |
| 838 Script get script; | 838 Script get script; |
| 839 PartOf get partTag; | |
| 840 | 839 |
| 841 void forEachLocalMember(f(Element element)); | 840 void forEachLocalMember(f(Element element)); |
| 842 bool get hasMembers; | |
| 843 | 841 |
| 844 int compareTo(CompilationUnitElement other); | 842 int compareTo(CompilationUnitElement other); |
| 845 } | 843 } |
| 846 | 844 |
| 847 abstract class LibraryElement extends Element | 845 abstract class LibraryElement extends Element |
| 848 implements ScopeContainerElement, AnalyzableElement { | 846 implements ScopeContainerElement, AnalyzableElement { |
| 849 /** | 847 /** |
| 850 * The canonical uri for this library. | 848 * The canonical uri for this library. |
| 851 * | 849 * |
| 852 * For user libraries the canonical uri is the script uri. For platform | 850 * For user libraries the canonical uri is the script uri. For platform |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 895 void forEachExport(f(Element element)); | 893 void forEachExport(f(Element element)); |
| 896 | 894 |
| 897 /// Calls [f] for each [Element] imported into this library. | 895 /// Calls [f] for each [Element] imported into this library. |
| 898 void forEachImport(f(Element element)); | 896 void forEachImport(f(Element element)); |
| 899 | 897 |
| 900 /// Returns the imports that import element into this library. | 898 /// Returns the imports that import element into this library. |
| 901 Link<Import> getImportsFor(Element element); | 899 Link<Import> getImportsFor(Element element); |
| 902 | 900 |
| 903 bool hasLibraryName(); | 901 bool hasLibraryName(); |
| 904 String getLibraryName(); | 902 String getLibraryName(); |
| 903 | |
| 904 /** | |
| 905 * Returns the library name (as defined by the library tag) or for script | |
| 906 * (which have no library tag) the script file name. The latter case is used | |
| 907 * to provide a 'library name' for scripts to use for instance in dartdoc. | |
| 908 * | |
| 909 * Note: the returned filename is still escaped ("a%20b.dart" instead of | |
| 910 * "a b.dart"). | |
| 911 */ | |
| 905 String getLibraryOrScriptName(); | 912 String getLibraryOrScriptName(); |
| 906 | 913 |
| 907 int compareTo(LibraryElement other); | 914 int compareTo(LibraryElement other); |
| 908 } | 915 } |
| 909 | 916 |
| 910 /// The implicit scope defined by a import declaration with a prefix clause. | 917 /// The implicit scope defined by a import declaration with a prefix clause. |
| 911 abstract class PrefixElement extends Element { | 918 abstract class PrefixElement extends Element { |
| 912 void addImport(Element element, Import import, DiagnosticListener listener); | 919 void addImport(Element element, Import import, DiagnosticListener listener); |
| 913 Element lookupLocalMember(String memberName); | 920 Element lookupLocalMember(String memberName); |
| 914 /// Is true if this prefix belongs to a deferred import. | 921 /// Is true if this prefix belongs to a deferred import. |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1483 abstract class TypeVariableElement extends Element | 1490 abstract class TypeVariableElement extends Element |
| 1484 implements AstElement, TypedElement { | 1491 implements AstElement, TypedElement { |
| 1485 | 1492 |
| 1486 /// Use [typeDeclaration] instead. | 1493 /// Use [typeDeclaration] instead. |
| 1487 @deprecated | 1494 @deprecated |
| 1488 get enclosingElement; | 1495 get enclosingElement; |
| 1489 | 1496 |
| 1490 /// The class or typedef on which this type variable is defined. | 1497 /// The class or typedef on which this type variable is defined. |
| 1491 TypeDeclarationElement get typeDeclaration; | 1498 TypeDeclarationElement get typeDeclaration; |
| 1492 | 1499 |
| 1500 /// The index of this type variable within its type declaraiton. | |
|
floitsch
2015/07/03 17:06:25
declaration
Johnni Winther
2015/07/06 08:33:22
Done.
| |
| 1501 int get index; | |
| 1502 | |
| 1493 /// The [type] defined by the type variable. | 1503 /// The [type] defined by the type variable. |
| 1494 TypeVariableType get type; | 1504 TypeVariableType get type; |
| 1495 | 1505 |
| 1496 /// The upper bound on the type variable. If not explicitly declared, this is | 1506 /// The upper bound on the type variable. If not explicitly declared, this is |
| 1497 /// `Object`. | 1507 /// `Object`. |
| 1498 DartType get bound; | 1508 DartType get bound; |
| 1499 } | 1509 } |
| 1500 | 1510 |
| 1501 abstract class MetadataAnnotation implements Spannable { | 1511 abstract class MetadataAnnotation implements Spannable { |
| 1502 /// The front-end constant of this metadata annotation. | 1512 /// The front-end constant of this metadata annotation. |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1643 bool get isDeclaredByField; | 1653 bool get isDeclaredByField; |
| 1644 | 1654 |
| 1645 /// Returns `true` if this member is abstract. | 1655 /// Returns `true` if this member is abstract. |
| 1646 bool get isAbstract; | 1656 bool get isAbstract; |
| 1647 | 1657 |
| 1648 /// If abstract, [implementation] points to the overridden concrete member, | 1658 /// If abstract, [implementation] points to the overridden concrete member, |
| 1649 /// if any. Otherwise [implementation] points to the member itself. | 1659 /// if any. Otherwise [implementation] points to the member itself. |
| 1650 Member get implementation; | 1660 Member get implementation; |
| 1651 } | 1661 } |
| 1652 | 1662 |
| OLD | NEW |