| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 | 3 |
| 4 library engine.element; | 4 library engine.element; |
| 5 | 5 |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 import 'java_core.dart'; | 7 import 'java_core.dart'; |
| 8 import 'java_engine.dart'; | 8 import 'java_engine.dart'; |
| 9 import 'utilities_collection.dart'; | 9 import 'utilities_collection.dart'; |
| 10 import 'source.dart'; | 10 import 'source.dart'; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 List<InterfaceType> get allSupertypes; | 38 List<InterfaceType> get allSupertypes; |
| 39 | 39 |
| 40 /** | 40 /** |
| 41 * Return an array containing all of the constructors declared in this class. | 41 * Return an array containing all of the constructors declared in this class. |
| 42 * | 42 * |
| 43 * @return the constructors declared in this class | 43 * @return the constructors declared in this class |
| 44 */ | 44 */ |
| 45 List<ConstructorElement> get constructors; | 45 List<ConstructorElement> get constructors; |
| 46 | 46 |
| 47 /** | 47 /** |
| 48 * Return the field (synthetic or explicit) defined in this class that has the
given name, or |
| 49 * `null` if this class does not define a field with the given name. |
| 50 * |
| 51 * @param fieldName the name of the field to be returned |
| 52 * @return the field with the given name that is defined in this class |
| 53 */ |
| 54 FieldElement getField(String fieldName); |
| 55 |
| 56 /** |
| 48 * Return an array containing all of the fields declared in this class. | 57 * Return an array containing all of the fields declared in this class. |
| 49 * | 58 * |
| 50 * @return the fields declared in this class | 59 * @return the fields declared in this class |
| 51 */ | 60 */ |
| 52 List<FieldElement> get fields; | 61 List<FieldElement> get fields; |
| 53 | 62 |
| 54 /** | 63 /** |
| 55 * Return the element representing the getter with the given name that is decl
ared in this class, | 64 * Return the element representing the getter with the given name that is decl
ared in this class, |
| 56 * or `null` if this class does not declare a getter with the given name. | 65 * or `null` if this class does not declare a getter with the given name. |
| 57 * | 66 * |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 */ | 696 */ |
| 688 bool get isProxy; | 697 bool get isProxy; |
| 689 } | 698 } |
| 690 | 699 |
| 691 /** | 700 /** |
| 692 * The enumeration `ElementKind` defines the various kinds of elements in the el
ement model. | 701 * The enumeration `ElementKind` defines the various kinds of elements in the el
ement model. |
| 693 * | 702 * |
| 694 * @coverage dart.engine.element | 703 * @coverage dart.engine.element |
| 695 */ | 704 */ |
| 696 class ElementKind extends Enum<ElementKind> { | 705 class ElementKind extends Enum<ElementKind> { |
| 697 static final ElementKind CLASS = new ElementKind('CLASS', 0, "class"); | 706 static final ElementKind ANGULAR_FILTER = new ElementKind('ANGULAR_FILTER', 0,
"Angular filter"); |
| 698 | 707 |
| 699 static final ElementKind COMPILATION_UNIT = new ElementKind('COMPILATION_UNIT'
, 1, "compilation unit"); | 708 static final ElementKind ANGULAR_COMPONENT = new ElementKind('ANGULAR_COMPONEN
T', 1, "Angular component"); |
| 700 | 709 |
| 701 static final ElementKind CONSTRUCTOR = new ElementKind('CONSTRUCTOR', 2, "cons
tructor"); | 710 static final ElementKind ANGULAR_CONTROLLER = new ElementKind('ANGULAR_CONTROL
LER', 2, "Angular controller"); |
| 702 | 711 |
| 703 static final ElementKind DYNAMIC = new ElementKind('DYNAMIC', 3, "<dynamic>"); | 712 static final ElementKind ANGULAR_MODULE = new ElementKind('ANGULAR_MODULE', 3,
"Angular module"); |
| 704 | 713 |
| 705 static final ElementKind EMBEDDED_HTML_SCRIPT = new ElementKind('EMBEDDED_HTML
_SCRIPT', 4, "embedded html script"); | 714 static final ElementKind ANGULAR_PROPERTY = new ElementKind('ANGULAR_PROPERTY'
, 4, "Angular property"); |
| 706 | 715 |
| 707 static final ElementKind ERROR = new ElementKind('ERROR', 5, "<error>"); | 716 static final ElementKind CLASS = new ElementKind('CLASS', 5, "class"); |
| 708 | 717 |
| 709 static final ElementKind EXPORT = new ElementKind('EXPORT', 6, "export directi
ve"); | 718 static final ElementKind COMPILATION_UNIT = new ElementKind('COMPILATION_UNIT'
, 6, "compilation unit"); |
| 710 | 719 |
| 711 static final ElementKind EXTERNAL_HTML_SCRIPT = new ElementKind('EXTERNAL_HTML
_SCRIPT', 7, "external html script"); | 720 static final ElementKind CONSTRUCTOR = new ElementKind('CONSTRUCTOR', 7, "cons
tructor"); |
| 712 | 721 |
| 713 static final ElementKind FIELD = new ElementKind('FIELD', 8, "field"); | 722 static final ElementKind DYNAMIC = new ElementKind('DYNAMIC', 8, "<dynamic>"); |
| 714 | 723 |
| 715 static final ElementKind FUNCTION = new ElementKind('FUNCTION', 9, "function")
; | 724 static final ElementKind EMBEDDED_HTML_SCRIPT = new ElementKind('EMBEDDED_HTML
_SCRIPT', 9, "embedded html script"); |
| 716 | 725 |
| 717 static final ElementKind GETTER = new ElementKind('GETTER', 10, "getter"); | 726 static final ElementKind ERROR = new ElementKind('ERROR', 10, "<error>"); |
| 718 | 727 |
| 719 static final ElementKind HTML = new ElementKind('HTML', 11, "html"); | 728 static final ElementKind EXPORT = new ElementKind('EXPORT', 11, "export direct
ive"); |
| 720 | 729 |
| 721 static final ElementKind IMPORT = new ElementKind('IMPORT', 12, "import direct
ive"); | 730 static final ElementKind EXTERNAL_HTML_SCRIPT = new ElementKind('EXTERNAL_HTML
_SCRIPT', 12, "external html script"); |
| 722 | 731 |
| 723 static final ElementKind LABEL = new ElementKind('LABEL', 13, "label"); | 732 static final ElementKind FIELD = new ElementKind('FIELD', 13, "field"); |
| 724 | 733 |
| 725 static final ElementKind LIBRARY = new ElementKind('LIBRARY', 14, "library"); | 734 static final ElementKind FUNCTION = new ElementKind('FUNCTION', 14, "function"
); |
| 726 | 735 |
| 727 static final ElementKind LOCAL_VARIABLE = new ElementKind('LOCAL_VARIABLE', 15
, "local variable"); | 736 static final ElementKind GETTER = new ElementKind('GETTER', 15, "getter"); |
| 728 | 737 |
| 729 static final ElementKind METHOD = new ElementKind('METHOD', 16, "method"); | 738 static final ElementKind HTML = new ElementKind('HTML', 16, "html"); |
| 730 | 739 |
| 731 static final ElementKind NAME = new ElementKind('NAME', 17, "<name>"); | 740 static final ElementKind IMPORT = new ElementKind('IMPORT', 17, "import direct
ive"); |
| 732 | 741 |
| 733 static final ElementKind PARAMETER = new ElementKind('PARAMETER', 18, "paramet
er"); | 742 static final ElementKind LABEL = new ElementKind('LABEL', 18, "label"); |
| 734 | 743 |
| 735 static final ElementKind PREFIX = new ElementKind('PREFIX', 19, "import prefix
"); | 744 static final ElementKind LIBRARY = new ElementKind('LIBRARY', 19, "library"); |
| 736 | 745 |
| 737 static final ElementKind SETTER = new ElementKind('SETTER', 20, "setter"); | 746 static final ElementKind LOCAL_VARIABLE = new ElementKind('LOCAL_VARIABLE', 20
, "local variable"); |
| 738 | 747 |
| 739 static final ElementKind TOP_LEVEL_VARIABLE = new ElementKind('TOP_LEVEL_VARIA
BLE', 21, "top level variable"); | 748 static final ElementKind METHOD = new ElementKind('METHOD', 21, "method"); |
| 740 | 749 |
| 741 static final ElementKind FUNCTION_TYPE_ALIAS = new ElementKind('FUNCTION_TYPE_
ALIAS', 22, "function type alias"); | 750 static final ElementKind NAME = new ElementKind('NAME', 22, "<name>"); |
| 742 | 751 |
| 743 static final ElementKind TYPE_PARAMETER = new ElementKind('TYPE_PARAMETER', 23
, "type parameter"); | 752 static final ElementKind PARAMETER = new ElementKind('PARAMETER', 23, "paramet
er"); |
| 744 | 753 |
| 745 static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 24, "<universe
>"); | 754 static final ElementKind PREFIX = new ElementKind('PREFIX', 24, "import prefix
"); |
| 755 |
| 756 static final ElementKind SETTER = new ElementKind('SETTER', 25, "setter"); |
| 757 |
| 758 static final ElementKind TOP_LEVEL_VARIABLE = new ElementKind('TOP_LEVEL_VARIA
BLE', 26, "top level variable"); |
| 759 |
| 760 static final ElementKind FUNCTION_TYPE_ALIAS = new ElementKind('FUNCTION_TYPE_
ALIAS', 27, "function type alias"); |
| 761 |
| 762 static final ElementKind TYPE_PARAMETER = new ElementKind('TYPE_PARAMETER', 28
, "type parameter"); |
| 763 |
| 764 static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 29, "<universe
>"); |
| 746 | 765 |
| 747 static final List<ElementKind> values = [ | 766 static final List<ElementKind> values = [ |
| 767 ANGULAR_FILTER, |
| 768 ANGULAR_COMPONENT, |
| 769 ANGULAR_CONTROLLER, |
| 770 ANGULAR_MODULE, |
| 771 ANGULAR_PROPERTY, |
| 748 CLASS, | 772 CLASS, |
| 749 COMPILATION_UNIT, | 773 COMPILATION_UNIT, |
| 750 CONSTRUCTOR, | 774 CONSTRUCTOR, |
| 751 DYNAMIC, | 775 DYNAMIC, |
| 752 EMBEDDED_HTML_SCRIPT, | 776 EMBEDDED_HTML_SCRIPT, |
| 753 ERROR, | 777 ERROR, |
| 754 EXPORT, | 778 EXPORT, |
| 755 EXTERNAL_HTML_SCRIPT, | 779 EXTERNAL_HTML_SCRIPT, |
| 756 FIELD, | 780 FIELD, |
| 757 FUNCTION, | 781 FUNCTION, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 String get encoding; | 838 String get encoding; |
| 815 } | 839 } |
| 816 | 840 |
| 817 /** | 841 /** |
| 818 * The interface `ElementVisitor` defines the behavior of objects that can be us
ed to visit an | 842 * The interface `ElementVisitor` defines the behavior of objects that can be us
ed to visit an |
| 819 * element structure. | 843 * element structure. |
| 820 * | 844 * |
| 821 * @coverage dart.engine.element | 845 * @coverage dart.engine.element |
| 822 */ | 846 */ |
| 823 abstract class ElementVisitor<R> { | 847 abstract class ElementVisitor<R> { |
| 848 R visitAngularComponentElement(AngularComponentElement element); |
| 849 |
| 850 R visitAngularControllerElement(AngularControllerElement element); |
| 851 |
| 852 R visitAngularFilterElement(AngularFilterElement element); |
| 853 |
| 854 R visitAngularModuleElement(AngularModuleElement element); |
| 855 |
| 856 R visitAngularPropertyElement(AngularPropertyElement element); |
| 857 |
| 824 R visitClassElement(ClassElement element); | 858 R visitClassElement(ClassElement element); |
| 825 | 859 |
| 826 R visitCompilationUnitElement(CompilationUnitElement element); | 860 R visitCompilationUnitElement(CompilationUnitElement element); |
| 827 | 861 |
| 828 R visitConstructorElement(ConstructorElement element); | 862 R visitConstructorElement(ConstructorElement element); |
| 829 | 863 |
| 830 R visitEmbeddedHtmlScriptElement(EmbeddedHtmlScriptElement element); | 864 R visitEmbeddedHtmlScriptElement(EmbeddedHtmlScriptElement element); |
| 831 | 865 |
| 832 R visitExportElement(ExportElement element); | 866 R visitExportElement(ExportElement element); |
| 833 | 867 |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1342 SourceRange get visibleRange; | 1376 SourceRange get visibleRange; |
| 1343 } | 1377 } |
| 1344 | 1378 |
| 1345 /** | 1379 /** |
| 1346 * The interface `LocalVariableElement` defines the behavior common to elements
that represent | 1380 * The interface `LocalVariableElement` defines the behavior common to elements
that represent |
| 1347 * a local variable. | 1381 * a local variable. |
| 1348 * | 1382 * |
| 1349 * @coverage dart.engine.element | 1383 * @coverage dart.engine.element |
| 1350 */ | 1384 */ |
| 1351 abstract class LocalVariableElement implements LocalElement, VariableElement { | 1385 abstract class LocalVariableElement implements LocalElement, VariableElement { |
| 1386 /** |
| 1387 * Return an array containing all of the toolkit specific objects attached to
this variable. |
| 1388 * |
| 1389 * @return the toolkit objects attached to this variable |
| 1390 */ |
| 1391 List<ToolkitObjectElement> get toolkitObjects; |
| 1352 } | 1392 } |
| 1353 | 1393 |
| 1354 /** | 1394 /** |
| 1355 * The interface `MethodElement` defines the behavior of elements that represent
a method | 1395 * The interface `MethodElement` defines the behavior of elements that represent
a method |
| 1356 * defined within a type. | 1396 * defined within a type. |
| 1357 * | 1397 * |
| 1358 * @coverage dart.engine.element | 1398 * @coverage dart.engine.element |
| 1359 */ | 1399 */ |
| 1360 abstract class MethodElement implements ClassMemberElement, ExecutableElement { | 1400 abstract class MethodElement implements ClassMemberElement, ExecutableElement { |
| 1361 /** | 1401 /** |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1803 /** | 1843 /** |
| 1804 * The interface `AngularFilterElement` defines the Angular filter described by | 1844 * The interface `AngularFilterElement` defines the Angular filter described by |
| 1805 * <code>NgFilter</code> annotation. | 1845 * <code>NgFilter</code> annotation. |
| 1806 * | 1846 * |
| 1807 * @coverage dart.engine.element | 1847 * @coverage dart.engine.element |
| 1808 */ | 1848 */ |
| 1809 abstract class AngularFilterElement implements AngularElement { | 1849 abstract class AngularFilterElement implements AngularElement { |
| 1810 } | 1850 } |
| 1811 | 1851 |
| 1812 /** | 1852 /** |
| 1813 * The interface `AngularControllerElement` defines a single property in | 1853 * The interface `AngularModuleElement` defines a single DI <code>Module</code>. |
| 1854 * |
| 1855 * @coverage dart.engine.element |
| 1856 */ |
| 1857 abstract class AngularModuleElement implements AngularElement { |
| 1858 /** |
| 1859 * An empty array of module elements. |
| 1860 */ |
| 1861 static final List<AngularModuleElement> EMPTY_ARRAY = []; |
| 1862 |
| 1863 /** |
| 1864 * Returns the child modules installed into this module using <code>install</c
ode>. |
| 1865 * |
| 1866 * @return the installed child modules |
| 1867 */ |
| 1868 List<AngularModuleElement> get childModules; |
| 1869 |
| 1870 /** |
| 1871 * Returns the keys injected into this module using <code>type()</code> and <c
ode>value()</code> |
| 1872 * invocations. |
| 1873 * |
| 1874 * @return the injected types |
| 1875 */ |
| 1876 List<ClassElement> get keyTypes; |
| 1877 } |
| 1878 |
| 1879 /** |
| 1880 * The interface `AngularPropertyElement` defines a single property in |
| 1814 * [AngularComponentElement]. | 1881 * [AngularComponentElement]. |
| 1815 * | 1882 * |
| 1816 * @coverage dart.engine.element | 1883 * @coverage dart.engine.element |
| 1817 */ | 1884 */ |
| 1818 abstract class AngularPropertyElement implements AngularElement { | 1885 abstract class AngularPropertyElement implements AngularElement { |
| 1819 /** | 1886 /** |
| 1887 * An empty array of property elements. |
| 1888 */ |
| 1889 static final List<AngularPropertyElement> EMPTY_ARRAY = []; |
| 1890 |
| 1891 /** |
| 1820 * Returns the field this property is mapped to. | 1892 * Returns the field this property is mapped to. |
| 1821 * | 1893 * |
| 1822 * @return the field this property is mapped to. | 1894 * @return the field this property is mapped to. |
| 1823 */ | 1895 */ |
| 1824 FieldElement get field; | 1896 FieldElement get field; |
| 1825 | 1897 |
| 1826 /** | 1898 /** |
| 1827 * Return the offset of the field name of this property in the [getSource]. | 1899 * Return the offset of the field name of this property in the property map. |
| 1828 * | 1900 * |
| 1829 * @return the offset of the field name of this property | 1901 * @return the offset of the field name of this property |
| 1830 */ | 1902 */ |
| 1831 int get fieldNameOffset; | 1903 int get fieldNameOffset; |
| 1832 | 1904 |
| 1833 /** | 1905 /** |
| 1834 * Returns the kind of this property. | 1906 * Returns the kind of this property. |
| 1835 * | 1907 * |
| 1836 * @return the kind of this property | 1908 * @return the kind of this property |
| 1837 */ | 1909 */ |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1961 * </pre> | 2033 * </pre> |
| 1962 * | 2034 * |
| 1963 * Subclasses that override a visit method must either invoke the overridden vis
it method or | 2035 * Subclasses that override a visit method must either invoke the overridden vis
it method or |
| 1964 * explicitly invoke the more general visit method. Failure to do so will cause
the visit methods | 2036 * explicitly invoke the more general visit method. Failure to do so will cause
the visit methods |
| 1965 * for superclasses of the element to not be invoked and will cause the children
of the visited node | 2037 * for superclasses of the element to not be invoked and will cause the children
of the visited node |
| 1966 * to not be visited. | 2038 * to not be visited. |
| 1967 * | 2039 * |
| 1968 * @coverage dart.engine.element | 2040 * @coverage dart.engine.element |
| 1969 */ | 2041 */ |
| 1970 class GeneralizingElementVisitor<R> implements ElementVisitor<R> { | 2042 class GeneralizingElementVisitor<R> implements ElementVisitor<R> { |
| 2043 R visitAngularComponentElement(AngularComponentElement element) => visitAngula
rSelectorElement(element); |
| 2044 |
| 2045 R visitAngularControllerElement(AngularControllerElement element) => visitAngu
larSelectorElement(element); |
| 2046 |
| 2047 R visitAngularElement(AngularElement element) => visitToolkitObjectElement(ele
ment); |
| 2048 |
| 2049 R visitAngularFilterElement(AngularFilterElement element) => visitAngularEleme
nt(element); |
| 2050 |
| 2051 R visitAngularModuleElement(AngularModuleElement element) => visitAngularEleme
nt(element); |
| 2052 |
| 2053 R visitAngularPropertyElement(AngularPropertyElement element) => visitAngularE
lement(element); |
| 2054 |
| 2055 R visitAngularSelectorElement(AngularSelectorElement element) => visitAngularE
lement(element); |
| 2056 |
| 1971 R visitClassElement(ClassElement element) => visitElement(element); | 2057 R visitClassElement(ClassElement element) => visitElement(element); |
| 1972 | 2058 |
| 1973 R visitCompilationUnitElement(CompilationUnitElement element) => visitElement(
element); | 2059 R visitCompilationUnitElement(CompilationUnitElement element) => visitElement(
element); |
| 1974 | 2060 |
| 1975 R visitConstructorElement(ConstructorElement element) => visitExecutableElemen
t(element); | 2061 R visitConstructorElement(ConstructorElement element) => visitExecutableElemen
t(element); |
| 1976 | 2062 |
| 1977 R visitElement(Element element) { | 2063 R visitElement(Element element) { |
| 1978 element.visitChildren(this); | 2064 element.visitChildren(this); |
| 1979 return null; | 2065 return null; |
| 1980 } | 2066 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2023 R visitMultiplyDefinedElement(MultiplyDefinedElement element) => visitElement(
element); | 2109 R visitMultiplyDefinedElement(MultiplyDefinedElement element) => visitElement(
element); |
| 2024 | 2110 |
| 2025 R visitParameterElement(ParameterElement element) => visitLocalElement(element
); | 2111 R visitParameterElement(ParameterElement element) => visitLocalElement(element
); |
| 2026 | 2112 |
| 2027 R visitPrefixElement(PrefixElement element) => visitElement(element); | 2113 R visitPrefixElement(PrefixElement element) => visitElement(element); |
| 2028 | 2114 |
| 2029 R visitPropertyAccessorElement(PropertyAccessorElement element) => visitExecut
ableElement(element); | 2115 R visitPropertyAccessorElement(PropertyAccessorElement element) => visitExecut
ableElement(element); |
| 2030 | 2116 |
| 2031 R visitPropertyInducingElement(PropertyInducingElement element) => visitVariab
leElement(element); | 2117 R visitPropertyInducingElement(PropertyInducingElement element) => visitVariab
leElement(element); |
| 2032 | 2118 |
| 2119 R visitToolkitObjectElement(ToolkitObjectElement element) => visitElement(elem
ent); |
| 2120 |
| 2033 R visitTopLevelVariableElement(TopLevelVariableElement element) => visitProper
tyInducingElement(element); | 2121 R visitTopLevelVariableElement(TopLevelVariableElement element) => visitProper
tyInducingElement(element); |
| 2034 | 2122 |
| 2035 R visitTypeParameterElement(TypeParameterElement element) => visitElement(elem
ent); | 2123 R visitTypeParameterElement(TypeParameterElement element) => visitElement(elem
ent); |
| 2036 | 2124 |
| 2037 R visitVariableElement(VariableElement element) => visitElement(element); | 2125 R visitVariableElement(VariableElement element) => visitElement(element); |
| 2038 } | 2126 } |
| 2039 | 2127 |
| 2040 /** | 2128 /** |
| 2041 * Instances of the class `RecursiveElementVisitor` implement an element visitor
that will | 2129 * Instances of the class `RecursiveElementVisitor` implement an element visitor
that will |
| 2042 * recursively visit all of the element in an element model. For example, using
an instance of this | 2130 * recursively visit all of the element in an element model. For example, using
an instance of this |
| 2043 * class to visit a [CompilationUnitElement] will also cause all of the types in
the | 2131 * class to visit a [CompilationUnitElement] will also cause all of the types in
the |
| 2044 * compilation unit to be visited. | 2132 * compilation unit to be visited. |
| 2045 * | 2133 * |
| 2046 * Subclasses that override a visit method must either invoke the overridden vis
it method or must | 2134 * Subclasses that override a visit method must either invoke the overridden vis
it method or must |
| 2047 * explicitly ask the visited element to visit its children. Failure to do so wi
ll cause the | 2135 * explicitly ask the visited element to visit its children. Failure to do so wi
ll cause the |
| 2048 * children of the visited element to not be visited. | 2136 * children of the visited element to not be visited. |
| 2049 * | 2137 * |
| 2050 * @coverage dart.engine.element | 2138 * @coverage dart.engine.element |
| 2051 */ | 2139 */ |
| 2052 class RecursiveElementVisitor<R> implements ElementVisitor<R> { | 2140 class RecursiveElementVisitor<R> implements ElementVisitor<R> { |
| 2141 R visitAngularComponentElement(AngularComponentElement element) { |
| 2142 element.visitChildren(this); |
| 2143 return null; |
| 2144 } |
| 2145 |
| 2146 R visitAngularControllerElement(AngularControllerElement element) { |
| 2147 element.visitChildren(this); |
| 2148 return null; |
| 2149 } |
| 2150 |
| 2151 R visitAngularFilterElement(AngularFilterElement element) { |
| 2152 element.visitChildren(this); |
| 2153 return null; |
| 2154 } |
| 2155 |
| 2156 R visitAngularModuleElement(AngularModuleElement element) { |
| 2157 element.visitChildren(this); |
| 2158 return null; |
| 2159 } |
| 2160 |
| 2161 R visitAngularPropertyElement(AngularPropertyElement element) { |
| 2162 element.visitChildren(this); |
| 2163 return null; |
| 2164 } |
| 2165 |
| 2053 R visitClassElement(ClassElement element) { | 2166 R visitClassElement(ClassElement element) { |
| 2054 element.visitChildren(this); | 2167 element.visitChildren(this); |
| 2055 return null; | 2168 return null; |
| 2056 } | 2169 } |
| 2057 | 2170 |
| 2058 R visitCompilationUnitElement(CompilationUnitElement element) { | 2171 R visitCompilationUnitElement(CompilationUnitElement element) { |
| 2059 element.visitChildren(this); | 2172 element.visitChildren(this); |
| 2060 return null; | 2173 return null; |
| 2061 } | 2174 } |
| 2062 | 2175 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2163 | 2276 |
| 2164 /** | 2277 /** |
| 2165 * Instances of the class `SimpleElementVisitor` implement an element visitor th
at will do | 2278 * Instances of the class `SimpleElementVisitor` implement an element visitor th
at will do |
| 2166 * nothing when visiting an element. It is intended to be a superclass for class
es that use the | 2279 * nothing when visiting an element. It is intended to be a superclass for class
es that use the |
| 2167 * visitor pattern primarily as a dispatch mechanism (and hence don't need to re
cursively visit a | 2280 * visitor pattern primarily as a dispatch mechanism (and hence don't need to re
cursively visit a |
| 2168 * whole structure) and that only need to visit a small number of element types. | 2281 * whole structure) and that only need to visit a small number of element types. |
| 2169 * | 2282 * |
| 2170 * @coverage dart.engine.element | 2283 * @coverage dart.engine.element |
| 2171 */ | 2284 */ |
| 2172 class SimpleElementVisitor<R> implements ElementVisitor<R> { | 2285 class SimpleElementVisitor<R> implements ElementVisitor<R> { |
| 2286 R visitAngularComponentElement(AngularComponentElement element) => null; |
| 2287 |
| 2288 R visitAngularControllerElement(AngularControllerElement element) => null; |
| 2289 |
| 2290 R visitAngularFilterElement(AngularFilterElement element) => null; |
| 2291 |
| 2292 R visitAngularModuleElement(AngularModuleElement element) => null; |
| 2293 |
| 2294 R visitAngularPropertyElement(AngularPropertyElement element) => null; |
| 2295 |
| 2173 R visitClassElement(ClassElement element) => null; | 2296 R visitClassElement(ClassElement element) => null; |
| 2174 | 2297 |
| 2175 R visitCompilationUnitElement(CompilationUnitElement element) => null; | 2298 R visitCompilationUnitElement(CompilationUnitElement element) => null; |
| 2176 | 2299 |
| 2177 R visitConstructorElement(ConstructorElement element) => null; | 2300 R visitConstructorElement(ConstructorElement element) => null; |
| 2178 | 2301 |
| 2179 R visitEmbeddedHtmlScriptElement(EmbeddedHtmlScriptElement element) => null; | 2302 R visitEmbeddedHtmlScriptElement(EmbeddedHtmlScriptElement element) => null; |
| 2180 | 2303 |
| 2181 R visitExportElement(ExportElement element) => null; | 2304 R visitExportElement(ExportElement element) => null; |
| 2182 | 2305 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2347 for (TypeParameterElement typeParameter in _typeParameters) { | 2470 for (TypeParameterElement typeParameter in _typeParameters) { |
| 2348 if ((typeParameter as TypeParameterElementImpl).identifier == identifier)
{ | 2471 if ((typeParameter as TypeParameterElementImpl).identifier == identifier)
{ |
| 2349 return typeParameter as TypeParameterElementImpl; | 2472 return typeParameter as TypeParameterElementImpl; |
| 2350 } | 2473 } |
| 2351 } | 2474 } |
| 2352 return null; | 2475 return null; |
| 2353 } | 2476 } |
| 2354 | 2477 |
| 2355 List<ConstructorElement> get constructors => _constructors; | 2478 List<ConstructorElement> get constructors => _constructors; |
| 2356 | 2479 |
| 2357 /** | |
| 2358 * Given some name, this returns the [FieldElement] with the matching name, if
there is no | |
| 2359 * such field, then `null` is returned. | |
| 2360 * | |
| 2361 * @param name some name to lookup a field element with | |
| 2362 * @return the matching field element, or `null` if no such element was found | |
| 2363 */ | |
| 2364 FieldElement getField(String name) { | 2480 FieldElement getField(String name) { |
| 2365 for (FieldElement fieldElement in _fields) { | 2481 for (FieldElement fieldElement in _fields) { |
| 2366 if (name == fieldElement.name) { | 2482 if (name == fieldElement.name) { |
| 2367 return fieldElement; | 2483 return fieldElement; |
| 2368 } | 2484 } |
| 2369 } | 2485 } |
| 2370 return null; | 2486 return null; |
| 2371 } | 2487 } |
| 2372 | 2488 |
| 2373 List<FieldElement> get fields => _fields; | 2489 List<FieldElement> get fields => _fields; |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2748 * compilation unit. | 2864 * compilation unit. |
| 2749 */ | 2865 */ |
| 2750 List<PropertyAccessorElement> _accessors = PropertyAccessorElementImpl.EMPTY_A
RRAY; | 2866 List<PropertyAccessorElement> _accessors = PropertyAccessorElementImpl.EMPTY_A
RRAY; |
| 2751 | 2867 |
| 2752 /** | 2868 /** |
| 2753 * An array containing all of the top-level functions contained in this compil
ation unit. | 2869 * An array containing all of the top-level functions contained in this compil
ation unit. |
| 2754 */ | 2870 */ |
| 2755 List<FunctionElement> _functions = FunctionElementImpl.EMPTY_ARRAY; | 2871 List<FunctionElement> _functions = FunctionElementImpl.EMPTY_ARRAY; |
| 2756 | 2872 |
| 2757 /** | 2873 /** |
| 2874 * A table mapping elements to associated toolkit objects. |
| 2875 */ |
| 2876 Map<Element, List<ToolkitObjectElement>> _toolkitObjects = {}; |
| 2877 |
| 2878 /** |
| 2758 * An array containing all of the function type aliases contained in this comp
ilation unit. | 2879 * An array containing all of the function type aliases contained in this comp
ilation unit. |
| 2759 */ | 2880 */ |
| 2760 List<FunctionTypeAliasElement> _typeAliases = FunctionTypeAliasElementImpl.EMP
TY_ARRAY; | 2881 List<FunctionTypeAliasElement> _typeAliases = FunctionTypeAliasElementImpl.EMP
TY_ARRAY; |
| 2761 | 2882 |
| 2762 /** | 2883 /** |
| 2763 * An array containing all of the types contained in this compilation unit. | 2884 * An array containing all of the types contained in this compilation unit. |
| 2764 */ | 2885 */ |
| 2765 List<ClassElement> _types = ClassElementImpl.EMPTY_ARRAY; | 2886 List<ClassElement> _types = ClassElementImpl.EMPTY_ARRAY; |
| 2766 | 2887 |
| 2767 /** | 2888 /** |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2914 | 3035 |
| 2915 void appendTo(JavaStringBuilder builder) { | 3036 void appendTo(JavaStringBuilder builder) { |
| 2916 if (source == null) { | 3037 if (source == null) { |
| 2917 builder.append("{compilation unit}"); | 3038 builder.append("{compilation unit}"); |
| 2918 } else { | 3039 } else { |
| 2919 builder.append(source.fullName); | 3040 builder.append(source.fullName); |
| 2920 } | 3041 } |
| 2921 } | 3042 } |
| 2922 | 3043 |
| 2923 String get identifier => source.encoding; | 3044 String get identifier => source.encoding; |
| 3045 |
| 3046 /** |
| 3047 * Returns the associated toolkit objects. |
| 3048 * |
| 3049 * @param element the [Element] to get toolkit objects for |
| 3050 * @return the associated toolkit objects, may be empty, but not `null` |
| 3051 */ |
| 3052 List<ToolkitObjectElement> getToolkitObjects(Element element) { |
| 3053 List<ToolkitObjectElement> objects = _toolkitObjects[element]; |
| 3054 if (objects != null) { |
| 3055 return objects; |
| 3056 } |
| 3057 return ToolkitObjectElement.EMPTY_ARRAY; |
| 3058 } |
| 3059 |
| 3060 /** |
| 3061 * Sets the toolkit objects that are associated with the given [Element]. |
| 3062 * |
| 3063 * @param element the [Element] to associate toolkit objects with |
| 3064 * @param objects the toolkit objects to associate |
| 3065 */ |
| 3066 void setToolkitObjects(Element element, List<ToolkitObjectElement> objects) { |
| 3067 for (ToolkitObjectElement toolkitObject in objects) { |
| 3068 (toolkitObject as ToolkitObjectElementImpl).enclosingElement = element; |
| 3069 } |
| 3070 _toolkitObjects[element] = objects; |
| 3071 } |
| 2924 } | 3072 } |
| 2925 | 3073 |
| 2926 /** | 3074 /** |
| 2927 * Instances of the class `ConstFieldElementImpl` implement a `FieldElement` for
a | 3075 * Instances of the class `ConstFieldElementImpl` implement a `FieldElement` for
a |
| 2928 * 'const' field that has an initializer. | 3076 * 'const' field that has an initializer. |
| 2929 */ | 3077 */ |
| 2930 class ConstFieldElementImpl extends FieldElementImpl { | 3078 class ConstFieldElementImpl extends FieldElementImpl { |
| 2931 /** | 3079 /** |
| 2932 * The result of evaluating this variable's initializer. | 3080 * The result of evaluating this variable's initializer. |
| 2933 */ | 3081 */ |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3432 if (_name == null) { | 3580 if (_name == null) { |
| 3433 builder.append("<unnamed "); | 3581 builder.append("<unnamed "); |
| 3434 builder.append(runtimeType.toString()); | 3582 builder.append(runtimeType.toString()); |
| 3435 builder.append(">"); | 3583 builder.append(">"); |
| 3436 } else { | 3584 } else { |
| 3437 builder.append(_name); | 3585 builder.append(_name); |
| 3438 } | 3586 } |
| 3439 } | 3587 } |
| 3440 | 3588 |
| 3441 /** | 3589 /** |
| 3590 * Set this [Element] as an enclosing for given. |
| 3591 * |
| 3592 * @param element the element to enclose, must be [ElementImpl] |
| 3593 */ |
| 3594 void encloseElement(ElementImpl element) { |
| 3595 element.enclosingElement = this; |
| 3596 } |
| 3597 |
| 3598 /** |
| 3442 * Return an identifier that uniquely identifies this element among the childr
en of this element's | 3599 * Return an identifier that uniquely identifies this element among the childr
en of this element's |
| 3443 * parent. | 3600 * parent. |
| 3444 * | 3601 * |
| 3445 * @return an identifier that uniquely identifies this element relative to its
parent | 3602 * @return an identifier that uniquely identifies this element relative to its
parent |
| 3446 */ | 3603 */ |
| 3447 String get identifier => name; | 3604 String get identifier => name; |
| 3448 | 3605 |
| 3449 /** | 3606 /** |
| 3450 * Return the resolved [ASTNode] of the given type enclosing [getNameOffset]. | 3607 * Return the resolved [ASTNode] of the given type enclosing [getNameOffset]. |
| 3451 */ | 3608 */ |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3945 void visitChildren(ElementVisitor visitor) { | 4102 void visitChildren(ElementVisitor visitor) { |
| 3946 super.visitChildren(visitor); | 4103 super.visitChildren(visitor); |
| 3947 safelyVisitChildren(_functions, visitor); | 4104 safelyVisitChildren(_functions, visitor); |
| 3948 safelyVisitChildren(_labels, visitor); | 4105 safelyVisitChildren(_labels, visitor); |
| 3949 safelyVisitChildren(_localVariables, visitor); | 4106 safelyVisitChildren(_localVariables, visitor); |
| 3950 safelyVisitChildren(_parameters, visitor); | 4107 safelyVisitChildren(_parameters, visitor); |
| 3951 } | 4108 } |
| 3952 | 4109 |
| 3953 void appendTo(JavaStringBuilder builder) { | 4110 void appendTo(JavaStringBuilder builder) { |
| 3954 builder.append("("); | 4111 builder.append("("); |
| 4112 String closing = null; |
| 4113 ParameterKind kind = ParameterKind.REQUIRED; |
| 3955 int parameterCount = _parameters.length; | 4114 int parameterCount = _parameters.length; |
| 3956 for (int i = 0; i < parameterCount; i++) { | 4115 for (int i = 0; i < parameterCount; i++) { |
| 3957 if (i > 0) { | 4116 if (i > 0) { |
| 3958 builder.append(", "); | 4117 builder.append(", "); |
| 3959 } | 4118 } |
| 3960 (_parameters[i] as ParameterElementImpl).appendTo(builder); | 4119 ParameterElementImpl parameter = _parameters[i] as ParameterElementImpl; |
| 4120 ParameterKind parameterKind = parameter.parameterKind; |
| 4121 if (parameterKind != kind) { |
| 4122 if (closing != null) { |
| 4123 builder.append(closing); |
| 4124 } |
| 4125 if (identical(parameterKind, ParameterKind.POSITIONAL)) { |
| 4126 builder.append("["); |
| 4127 closing = "]"; |
| 4128 } else if (identical(parameterKind, ParameterKind.NAMED)) { |
| 4129 builder.append("{"); |
| 4130 closing = "}"; |
| 4131 } else { |
| 4132 closing = null; |
| 4133 } |
| 4134 } |
| 4135 kind = parameterKind; |
| 4136 parameter.appendToWithoutDelimiters(builder); |
| 4137 } |
| 4138 if (closing != null) { |
| 4139 builder.append(closing); |
| 3961 } | 4140 } |
| 3962 builder.append(")"); | 4141 builder.append(")"); |
| 3963 if (type != null) { | 4142 if (type != null) { |
| 3964 builder.append(Element.RIGHT_ARROW); | 4143 builder.append(Element.RIGHT_ARROW); |
| 3965 builder.append(type.returnType); | 4144 builder.append(type.returnType); |
| 3966 } | 4145 } |
| 3967 } | 4146 } |
| 3968 } | 4147 } |
| 3969 | 4148 |
| 3970 /** | 4149 /** |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4433 /** | 4612 /** |
| 4434 * An empty array of HTML script elements. | 4613 * An empty array of HTML script elements. |
| 4435 */ | 4614 */ |
| 4436 static List<HtmlScriptElement> EMPTY_ARRAY = new List<HtmlScriptElement>(0); | 4615 static List<HtmlScriptElement> EMPTY_ARRAY = new List<HtmlScriptElement>(0); |
| 4437 | 4616 |
| 4438 /** | 4617 /** |
| 4439 * Initialize a newly created script element to have the specified tag name an
d offset. | 4618 * Initialize a newly created script element to have the specified tag name an
d offset. |
| 4440 * | 4619 * |
| 4441 * @param node the XML node from which this element is derived (not `null`) | 4620 * @param node the XML node from which this element is derived (not `null`) |
| 4442 */ | 4621 */ |
| 4443 HtmlScriptElementImpl(XmlTagNode node) : super.con2(node.tag.lexeme, node.tag.
offset); | 4622 HtmlScriptElementImpl(XmlTagNode node) : super.con2(node.tag, node.tagToken.of
fset); |
| 4444 } | 4623 } |
| 4445 | 4624 |
| 4446 /** | 4625 /** |
| 4447 * Instances of the class `ImportElementImpl` implement an [ImportElement]. | 4626 * Instances of the class `ImportElementImpl` implement an [ImportElement]. |
| 4448 * | 4627 * |
| 4449 * @coverage dart.engine.element | 4628 * @coverage dart.engine.element |
| 4450 */ | 4629 */ |
| 4451 class ImportElementImpl extends ElementImpl implements ImportElement { | 4630 class ImportElementImpl extends ElementImpl implements ImportElement { |
| 4452 /** | 4631 /** |
| 4453 * The offset of the character immediately following the last character of thi
s node's URI, may be | 4632 * The offset of the character immediately following the last character of thi
s node's URI, may be |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4907 * Initialize a newly created local variable element to have the given name. | 5086 * Initialize a newly created local variable element to have the given name. |
| 4908 * | 5087 * |
| 4909 * @param name the name of this element | 5088 * @param name the name of this element |
| 4910 */ | 5089 */ |
| 4911 LocalVariableElementImpl(Identifier name) : super.con1(name); | 5090 LocalVariableElementImpl(Identifier name) : super.con1(name); |
| 4912 | 5091 |
| 4913 accept(ElementVisitor visitor) => visitor.visitLocalVariableElement(this); | 5092 accept(ElementVisitor visitor) => visitor.visitLocalVariableElement(this); |
| 4914 | 5093 |
| 4915 ElementKind get kind => ElementKind.LOCAL_VARIABLE; | 5094 ElementKind get kind => ElementKind.LOCAL_VARIABLE; |
| 4916 | 5095 |
| 5096 List<ToolkitObjectElement> get toolkitObjects { |
| 5097 CompilationUnitElementImpl unit = getAncestor(CompilationUnitElementImpl); |
| 5098 if (unit == null) { |
| 5099 return ToolkitObjectElement.EMPTY_ARRAY; |
| 5100 } |
| 5101 return unit.getToolkitObjects(this); |
| 5102 } |
| 5103 |
| 4917 SourceRange get visibleRange { | 5104 SourceRange get visibleRange { |
| 4918 if (_visibleRangeLength < 0) { | 5105 if (_visibleRangeLength < 0) { |
| 4919 return null; | 5106 return null; |
| 4920 } | 5107 } |
| 4921 return new SourceRange(_visibleRangeOffset, _visibleRangeLength); | 5108 return new SourceRange(_visibleRangeOffset, _visibleRangeLength); |
| 4922 } | 5109 } |
| 4923 | 5110 |
| 4924 bool get isPotentiallyMutatedInClosure => _isPotentiallyMutatedInClosure2; | 5111 bool get isPotentiallyMutatedInClosure => _isPotentiallyMutatedInClosure2; |
| 4925 | 5112 |
| 4926 bool get isPotentiallyMutatedInScope => _isPotentiallyMutatedInScope2; | 5113 bool get isPotentiallyMutatedInScope => _isPotentiallyMutatedInScope2; |
| 4927 | 5114 |
| 4928 /** | 5115 /** |
| 4929 * Specifies that this variable is potentially mutated somewhere in closure. | 5116 * Specifies that this variable is potentially mutated somewhere in closure. |
| 4930 */ | 5117 */ |
| 4931 void markPotentiallyMutatedInClosure() { | 5118 void markPotentiallyMutatedInClosure() { |
| 4932 _isPotentiallyMutatedInClosure2 = true; | 5119 _isPotentiallyMutatedInClosure2 = true; |
| 4933 } | 5120 } |
| 4934 | 5121 |
| 4935 /** | 5122 /** |
| 4936 * Specifies that this variable is potentially mutated somewhere in its scope. | 5123 * Specifies that this variable is potentially mutated somewhere in its scope. |
| 4937 */ | 5124 */ |
| 4938 void markPotentiallyMutatedInScope() { | 5125 void markPotentiallyMutatedInScope() { |
| 4939 _isPotentiallyMutatedInScope2 = true; | 5126 _isPotentiallyMutatedInScope2 = true; |
| 4940 } | 5127 } |
| 4941 | 5128 |
| 4942 /** | 5129 /** |
| 5130 * Set the toolkit specific information objects attached to this variable. |
| 5131 * |
| 5132 * @param toolkitObjects the toolkit objects attached to this variable |
| 5133 */ |
| 5134 void set toolkitObjects(List<ToolkitObjectElement> toolkitObjects) { |
| 5135 CompilationUnitElementImpl unit = getAncestor(CompilationUnitElementImpl); |
| 5136 if (unit == null) { |
| 5137 return; |
| 5138 } |
| 5139 unit.setToolkitObjects(this, toolkitObjects); |
| 5140 } |
| 5141 |
| 5142 /** |
| 4943 * Set the visible range for this element to the range starting at the given o
ffset with the given | 5143 * Set the visible range for this element to the range starting at the given o
ffset with the given |
| 4944 * length. | 5144 * length. |
| 4945 * | 5145 * |
| 4946 * @param offset the offset to the beginning of the visible range for this ele
ment | 5146 * @param offset the offset to the beginning of the visible range for this ele
ment |
| 4947 * @param length the length of the visible range for this element, or `-1` if
this element | 5147 * @param length the length of the visible range for this element, or `-1` if
this element |
| 4948 * does not have a visible range | 5148 * does not have a visible range |
| 4949 */ | 5149 */ |
| 4950 void setVisibleRange(int offset, int length) { | 5150 void setVisibleRange(int offset, int length) { |
| 4951 _visibleRangeOffset = offset; | 5151 _visibleRangeOffset = offset; |
| 4952 _visibleRangeLength = length; | 5152 _visibleRangeLength = length; |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5404 if (parameterKind == ParameterKind.NAMED) { | 5604 if (parameterKind == ParameterKind.NAMED) { |
| 5405 left = "{"; | 5605 left = "{"; |
| 5406 right = "}"; | 5606 right = "}"; |
| 5407 } else if (parameterKind == ParameterKind.POSITIONAL) { | 5607 } else if (parameterKind == ParameterKind.POSITIONAL) { |
| 5408 left = "["; | 5608 left = "["; |
| 5409 right = "]"; | 5609 right = "]"; |
| 5410 } | 5610 } |
| 5411 break; | 5611 break; |
| 5412 } | 5612 } |
| 5413 builder.append(left); | 5613 builder.append(left); |
| 5614 appendToWithoutDelimiters(builder); |
| 5615 builder.append(right); |
| 5616 } |
| 5617 |
| 5618 /** |
| 5619 * Append the type and name of this parameter to the given builder. |
| 5620 * |
| 5621 * @param builder the builder to which the type and name are to be appended |
| 5622 */ |
| 5623 void appendToWithoutDelimiters(JavaStringBuilder builder) { |
| 5414 builder.append(type); | 5624 builder.append(type); |
| 5415 builder.append(" "); | 5625 builder.append(" "); |
| 5416 builder.append(displayName); | 5626 builder.append(displayName); |
| 5417 builder.append(right); | |
| 5418 } | 5627 } |
| 5419 } | 5628 } |
| 5420 | 5629 |
| 5421 /** | 5630 /** |
| 5422 * Instances of the class `PrefixElementImpl` implement a `PrefixElement`. | 5631 * Instances of the class `PrefixElementImpl` implement a `PrefixElement`. |
| 5423 * | 5632 * |
| 5424 * @coverage dart.engine.element | 5633 * @coverage dart.engine.element |
| 5425 */ | 5634 */ |
| 5426 class PrefixElementImpl extends ElementImpl implements PrefixElement { | 5635 class PrefixElementImpl extends ElementImpl implements PrefixElement { |
| 5427 /** | 5636 /** |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5887 } | 6096 } |
| 5888 | 6097 |
| 5889 void appendTo(JavaStringBuilder builder) { | 6098 void appendTo(JavaStringBuilder builder) { |
| 5890 builder.append(type); | 6099 builder.append(type); |
| 5891 builder.append(" "); | 6100 builder.append(" "); |
| 5892 builder.append(displayName); | 6101 builder.append(displayName); |
| 5893 } | 6102 } |
| 5894 } | 6103 } |
| 5895 | 6104 |
| 5896 /** | 6105 /** |
| 6106 * Implementation of `AngularComponentElement`. |
| 6107 * |
| 6108 * @coverage dart.engine.element |
| 6109 */ |
| 6110 class AngularComponentElementImpl extends AngularSelectorElementImpl implements
AngularComponentElement { |
| 6111 /** |
| 6112 * The array containing all of the properties declared by this component. |
| 6113 */ |
| 6114 List<AngularPropertyElement> _properties; |
| 6115 |
| 6116 /** |
| 6117 * The the CSS file URI. |
| 6118 */ |
| 6119 String styleUri; |
| 6120 |
| 6121 /** |
| 6122 * The offset of the [styleUri] in the [getSource]. |
| 6123 */ |
| 6124 int styleUriOffset = 0; |
| 6125 |
| 6126 /** |
| 6127 * The HTML template URI. |
| 6128 */ |
| 6129 String templateUri; |
| 6130 |
| 6131 /** |
| 6132 * The offset of the [templateUri] in the [getSource]. |
| 6133 */ |
| 6134 int templateUriOffset = 0; |
| 6135 |
| 6136 /** |
| 6137 * Initialize a newly created Angular component to have the given name. |
| 6138 * |
| 6139 * @param name the name of this element |
| 6140 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 6141 * declaration of this element |
| 6142 */ |
| 6143 AngularComponentElementImpl(String name, int nameOffset) : super(name, nameOff
set); |
| 6144 |
| 6145 accept(ElementVisitor visitor) => visitor.visitAngularComponentElement(this); |
| 6146 |
| 6147 ElementKind get kind => ElementKind.ANGULAR_COMPONENT; |
| 6148 |
| 6149 List<AngularPropertyElement> get properties => _properties; |
| 6150 |
| 6151 /** |
| 6152 * Set an array containing all of the properties declared by this component. |
| 6153 * |
| 6154 * @param properties the properties to set |
| 6155 */ |
| 6156 void set properties(List<AngularPropertyElement> properties) { |
| 6157 for (AngularPropertyElement property in properties) { |
| 6158 encloseElement(property as AngularPropertyElementImpl); |
| 6159 } |
| 6160 this._properties = properties; |
| 6161 } |
| 6162 } |
| 6163 |
| 6164 /** |
| 6165 * Implementation of `AngularControllerElement`. |
| 6166 * |
| 6167 * @coverage dart.engine.element |
| 6168 */ |
| 6169 class AngularControllerElementImpl extends AngularSelectorElementImpl implements
AngularControllerElement { |
| 6170 /** |
| 6171 * Initialize a newly created Angular controller to have the given name. |
| 6172 * |
| 6173 * @param name the name of this element |
| 6174 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 6175 * declaration of this element |
| 6176 */ |
| 6177 AngularControllerElementImpl(String name, int nameOffset) : super(name, nameOf
fset); |
| 6178 |
| 6179 accept(ElementVisitor visitor) => visitor.visitAngularControllerElement(this); |
| 6180 |
| 6181 ElementKind get kind => ElementKind.ANGULAR_CONTROLLER; |
| 6182 } |
| 6183 |
| 6184 /** |
| 6185 * Implementation of `AngularElement`. |
| 6186 * |
| 6187 * @coverage dart.engine.element |
| 6188 */ |
| 6189 abstract class AngularElementImpl extends ToolkitObjectElementImpl implements An
gularElement { |
| 6190 /** |
| 6191 * Initialize a newly created Angular element to have the given name. |
| 6192 * |
| 6193 * @param name the name of this element |
| 6194 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 6195 * declaration of this element |
| 6196 */ |
| 6197 AngularElementImpl(String name, int nameOffset) : super(name, nameOffset); |
| 6198 } |
| 6199 |
| 6200 /** |
| 6201 * Implementation of `AngularFilterElement`. |
| 6202 * |
| 6203 * @coverage dart.engine.element |
| 6204 */ |
| 6205 class AngularFilterElementImpl extends AngularElementImpl implements AngularFilt
erElement { |
| 6206 /** |
| 6207 * Initialize a newly created Angular filter to have the given name. |
| 6208 * |
| 6209 * @param name the name of this element |
| 6210 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 6211 * declaration of this element |
| 6212 */ |
| 6213 AngularFilterElementImpl(String name, int nameOffset) : super(name, nameOffset
); |
| 6214 |
| 6215 accept(ElementVisitor visitor) => visitor.visitAngularFilterElement(this); |
| 6216 |
| 6217 ElementKind get kind => ElementKind.ANGULAR_FILTER; |
| 6218 } |
| 6219 |
| 6220 /** |
| 6221 * Implementation of `AngularModuleElement`. |
| 6222 * |
| 6223 * @coverage dart.engine.element |
| 6224 */ |
| 6225 class AngularModuleElementImpl extends AngularElementImpl implements AngularModu
leElement { |
| 6226 /** |
| 6227 * The array containing all of the child modules. |
| 6228 */ |
| 6229 List<AngularModuleElement> childModules = AngularModuleElement.EMPTY_ARRAY; |
| 6230 |
| 6231 /** |
| 6232 * The array containing all of the types used as injection keys. |
| 6233 */ |
| 6234 List<ClassElement> keyTypes = ClassElementImpl.EMPTY_ARRAY; |
| 6235 |
| 6236 /** |
| 6237 * Initialize a newly created Angular module. |
| 6238 */ |
| 6239 AngularModuleElementImpl() : super(null, -1); |
| 6240 |
| 6241 accept(ElementVisitor visitor) => visitor.visitAngularModuleElement(this); |
| 6242 |
| 6243 ElementKind get kind => ElementKind.ANGULAR_MODULE; |
| 6244 } |
| 6245 |
| 6246 /** |
| 6247 * Implementation of `AngularPropertyElement`. |
| 6248 * |
| 6249 * @coverage dart.engine.element |
| 6250 */ |
| 6251 class AngularPropertyElementImpl extends AngularElementImpl implements AngularPr
opertyElement { |
| 6252 /** |
| 6253 * The [FieldElement] to which this property is bound. |
| 6254 */ |
| 6255 FieldElement field; |
| 6256 |
| 6257 /** |
| 6258 * The offset of the field name in the property map. |
| 6259 */ |
| 6260 int fieldNameOffset = -1; |
| 6261 |
| 6262 AngularPropertyKind propertyKind; |
| 6263 |
| 6264 /** |
| 6265 * Initialize a newly created Angular property to have the given name. |
| 6266 * |
| 6267 * @param name the name of this element |
| 6268 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 6269 * declaration of this element |
| 6270 */ |
| 6271 AngularPropertyElementImpl(String name, int nameOffset) : super(name, nameOffs
et); |
| 6272 |
| 6273 accept(ElementVisitor visitor) => visitor.visitAngularPropertyElement(this); |
| 6274 |
| 6275 ElementKind get kind => ElementKind.ANGULAR_PROPERTY; |
| 6276 } |
| 6277 |
| 6278 /** |
| 6279 * Implementation of `AngularSelectorElement`. |
| 6280 * |
| 6281 * @coverage dart.engine.element |
| 6282 */ |
| 6283 abstract class AngularSelectorElementImpl extends AngularElementImpl implements
AngularSelectorElement { |
| 6284 /** |
| 6285 * The selector of this element. |
| 6286 */ |
| 6287 AngularSelector selector; |
| 6288 |
| 6289 /** |
| 6290 * Initialize a newly created Angular element to have the given name. |
| 6291 * |
| 6292 * @param name the name of this element |
| 6293 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 6294 * declaration of this element |
| 6295 */ |
| 6296 AngularSelectorElementImpl(String name, int nameOffset) : super(name, nameOffs
et); |
| 6297 } |
| 6298 |
| 6299 /** |
| 6300 * Implementation of [AngularSelector] based on presence of attribute. |
| 6301 */ |
| 6302 class HasAttributeSelector implements AngularSelector { |
| 6303 final String attributeName; |
| 6304 |
| 6305 HasAttributeSelector(this.attributeName); |
| 6306 |
| 6307 bool apply(XmlTagNode node) => node.getAttribute(attributeName) != null; |
| 6308 } |
| 6309 |
| 6310 /** |
| 6311 * Implementation of [AngularSelector] based tag name. |
| 6312 */ |
| 6313 class IsTagSelector implements AngularSelector { |
| 6314 final String name; |
| 6315 |
| 6316 IsTagSelector(this.name); |
| 6317 |
| 6318 bool apply(XmlTagNode node) => node.tag == name; |
| 6319 } |
| 6320 |
| 6321 /** |
| 5897 * Instances of the class `ConstructorMember` represent a constructor element de
fined in a | 6322 * Instances of the class `ConstructorMember` represent a constructor element de
fined in a |
| 5898 * parameterized type where the values of the type parameters are known. | 6323 * parameterized type where the values of the type parameters are known. |
| 5899 */ | 6324 */ |
| 5900 class ConstructorMember extends ExecutableMember implements ConstructorElement { | 6325 class ConstructorMember extends ExecutableMember implements ConstructorElement { |
| 5901 /** | 6326 /** |
| 5902 * If the given constructor's type is different when any type parameters from
the defining type's | 6327 * If the given constructor's type is different when any type parameters from
the defining type's |
| 5903 * declaration are replaced with the actual type arguments from the defining t
ype, create a | 6328 * declaration are replaced with the actual type arguments from the defining t
ype, create a |
| 5904 * constructor member representing the given constructor. Return the member th
at was created, or | 6329 * constructor member representing the given constructor. Return the member th
at was created, or |
| 5905 * the base constructor if no member was created. | 6330 * the base constructor if no member was created. |
| 5906 * | 6331 * |
| (...skipping 2870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8777 | 9202 |
| 8778 /** | 9203 /** |
| 8779 * The interface `VoidType` defines the behavior of the unique object representi
ng the type | 9204 * The interface `VoidType` defines the behavior of the unique object representi
ng the type |
| 8780 * `void`. | 9205 * `void`. |
| 8781 * | 9206 * |
| 8782 * @coverage dart.engine.type | 9207 * @coverage dart.engine.type |
| 8783 */ | 9208 */ |
| 8784 abstract class VoidType implements Type2 { | 9209 abstract class VoidType implements Type2 { |
| 8785 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); | 9210 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); |
| 8786 } | 9211 } |
| OLD | NEW |