| 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 library engine.element; | 3 library engine.element; |
| 4 import 'dart:collection'; | 4 import 'dart:collection'; |
| 5 import 'java_core.dart'; | 5 import 'java_core.dart'; |
| 6 import 'java_engine.dart'; | 6 import 'java_engine.dart'; |
| 7 import 'utilities_collection.dart'; | 7 import 'utilities_collection.dart'; |
| 8 import 'source.dart'; | 8 import 'source.dart'; |
| 9 import 'scanner.dart' show Keyword; | 9 import 'scanner.dart' show Keyword; |
| 10 import 'ast.dart' show Identifier, LibraryIdentifier; | 10 import 'ast.dart' show Identifier, LibraryIdentifier; |
| (...skipping 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1805 * @param name the name of this element | 1805 * @param name the name of this element |
| 1806 */ | 1806 */ |
| 1807 ClassElementImpl(Identifier name) : super.con1(name); | 1807 ClassElementImpl(Identifier name) : super.con1(name); |
| 1808 accept(ElementVisitor visitor) => visitor.visitClassElement(this); | 1808 accept(ElementVisitor visitor) => visitor.visitClassElement(this); |
| 1809 List<PropertyAccessorElement> get accessors => _accessors; | 1809 List<PropertyAccessorElement> get accessors => _accessors; |
| 1810 List<InterfaceType> get allSupertypes { | 1810 List<InterfaceType> get allSupertypes { |
| 1811 List<InterfaceType> list = new List<InterfaceType>(); | 1811 List<InterfaceType> list = new List<InterfaceType>(); |
| 1812 collectAllSupertypes(list); | 1812 collectAllSupertypes(list); |
| 1813 return new List.from(list); | 1813 return new List.from(list); |
| 1814 } | 1814 } |
| 1815 ElementImpl getChild(String identifier2) { | 1815 ElementImpl getChild(String identifier) { |
| 1816 for (PropertyAccessorElement accessor in _accessors) { | 1816 for (PropertyAccessorElement accessor in _accessors) { |
| 1817 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier2)
{ | 1817 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier)
{ |
| 1818 return accessor as PropertyAccessorElementImpl; | 1818 return accessor as PropertyAccessorElementImpl; |
| 1819 } | 1819 } |
| 1820 } | 1820 } |
| 1821 for (ConstructorElement constructor in _constructors) { | 1821 for (ConstructorElement constructor in _constructors) { |
| 1822 if (((constructor as ConstructorElementImpl)).identifier == identifier2) { | 1822 if (((constructor as ConstructorElementImpl)).identifier == identifier) { |
| 1823 return constructor as ConstructorElementImpl; | 1823 return constructor as ConstructorElementImpl; |
| 1824 } | 1824 } |
| 1825 } | 1825 } |
| 1826 for (FieldElement field in _fields) { | 1826 for (FieldElement field in _fields) { |
| 1827 if (((field as FieldElementImpl)).identifier == identifier2) { | 1827 if (((field as FieldElementImpl)).identifier == identifier) { |
| 1828 return field as FieldElementImpl; | 1828 return field as FieldElementImpl; |
| 1829 } | 1829 } |
| 1830 } | 1830 } |
| 1831 for (MethodElement method in _methods) { | 1831 for (MethodElement method in _methods) { |
| 1832 if (((method as MethodElementImpl)).identifier == identifier2) { | 1832 if (((method as MethodElementImpl)).identifier == identifier) { |
| 1833 return method as MethodElementImpl; | 1833 return method as MethodElementImpl; |
| 1834 } | 1834 } |
| 1835 } | 1835 } |
| 1836 for (TypeParameterElement typeParameter in _typeParameters) { | 1836 for (TypeParameterElement typeParameter in _typeParameters) { |
| 1837 if (((typeParameter as TypeParameterElementImpl)).identifier == identifier
2) { | 1837 if (((typeParameter as TypeParameterElementImpl)).identifier == identifier
) { |
| 1838 return typeParameter as TypeParameterElementImpl; | 1838 return typeParameter as TypeParameterElementImpl; |
| 1839 } | 1839 } |
| 1840 } | 1840 } |
| 1841 return null; | 1841 return null; |
| 1842 } | 1842 } |
| 1843 List<ConstructorElement> get constructors => _constructors; | 1843 List<ConstructorElement> get constructors => _constructors; |
| 1844 | 1844 |
| 1845 /** | 1845 /** |
| 1846 * Given some name, this returns the [FieldElement] with the matching name, if
there is no | 1846 * Given some name, this returns the [FieldElement] with the matching name, if
there is no |
| 1847 * such field, then `null` is returned. | 1847 * such field, then `null` is returned. |
| 1848 * | 1848 * |
| 1849 * @param name some name to lookup a field element with | 1849 * @param name some name to lookup a field element with |
| 1850 * @return the matching field element, or `null` if no such element was found | 1850 * @return the matching field element, or `null` if no such element was found |
| 1851 */ | 1851 */ |
| 1852 FieldElement getField(String name2) { | 1852 FieldElement getField(String name) { |
| 1853 for (FieldElement fieldElement in _fields) { | 1853 for (FieldElement fieldElement in _fields) { |
| 1854 if (name2 == fieldElement.name) { | 1854 if (name == fieldElement.name) { |
| 1855 return fieldElement; | 1855 return fieldElement; |
| 1856 } | 1856 } |
| 1857 } | 1857 } |
| 1858 return null; | 1858 return null; |
| 1859 } | 1859 } |
| 1860 List<FieldElement> get fields => _fields; | 1860 List<FieldElement> get fields => _fields; |
| 1861 PropertyAccessorElement getGetter(String getterName) { | 1861 PropertyAccessorElement getGetter(String getterName) { |
| 1862 for (PropertyAccessorElement accessor in _accessors) { | 1862 for (PropertyAccessorElement accessor in _accessors) { |
| 1863 if (accessor.isGetter && accessor.name == getterName) { | 1863 if (accessor.isGetter && accessor.name == getterName) { |
| 1864 return accessor; | 1864 return accessor; |
| 1865 } | 1865 } |
| 1866 } | 1866 } |
| 1867 return null; | 1867 return null; |
| 1868 } | 1868 } |
| 1869 List<InterfaceType> get interfaces => _interfaces; | 1869 List<InterfaceType> get interfaces => _interfaces; |
| 1870 ElementKind get kind => ElementKind.CLASS; | 1870 ElementKind get kind => ElementKind.CLASS; |
| 1871 MethodElement getMethod(String methodName) { | 1871 MethodElement getMethod(String methodName) { |
| 1872 for (MethodElement method in _methods) { | 1872 for (MethodElement method in _methods) { |
| 1873 if (method.name == methodName) { | 1873 if (method.name == methodName) { |
| 1874 return method; | 1874 return method; |
| 1875 } | 1875 } |
| 1876 } | 1876 } |
| 1877 return null; | 1877 return null; |
| 1878 } | 1878 } |
| 1879 List<MethodElement> get methods => _methods; | 1879 List<MethodElement> get methods => _methods; |
| 1880 List<InterfaceType> get mixins => _mixins; | 1880 List<InterfaceType> get mixins => _mixins; |
| 1881 ConstructorElement getNamedConstructor(String name2) { | 1881 ConstructorElement getNamedConstructor(String name) { |
| 1882 for (ConstructorElement element in constructors) { | 1882 for (ConstructorElement element in constructors) { |
| 1883 String elementName = element.name; | 1883 String elementName = element.name; |
| 1884 if (elementName != null && elementName == name2) { | 1884 if (elementName != null && elementName == name) { |
| 1885 return element; | 1885 return element; |
| 1886 } | 1886 } |
| 1887 } | 1887 } |
| 1888 return null; | 1888 return null; |
| 1889 } | 1889 } |
| 1890 PropertyAccessorElement getSetter(String setterName) { | 1890 PropertyAccessorElement getSetter(String setterName) { |
| 1891 if (!setterName.endsWith("=")) { | 1891 if (!setterName.endsWith("=")) { |
| 1892 setterName += '='; | 1892 setterName += '='; |
| 1893 } | 1893 } |
| 1894 for (PropertyAccessorElement accessor in _accessors) { | 1894 for (PropertyAccessorElement accessor in _accessors) { |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2027 */ | 2027 */ |
| 2028 void set abstract(bool isAbstract) { | 2028 void set abstract(bool isAbstract) { |
| 2029 setModifier(Modifier.ABSTRACT, isAbstract); | 2029 setModifier(Modifier.ABSTRACT, isAbstract); |
| 2030 } | 2030 } |
| 2031 | 2031 |
| 2032 /** | 2032 /** |
| 2033 * Set the accessors contained in this class to the given accessors. | 2033 * Set the accessors contained in this class to the given accessors. |
| 2034 * | 2034 * |
| 2035 * @param accessors the accessors contained in this class | 2035 * @param accessors the accessors contained in this class |
| 2036 */ | 2036 */ |
| 2037 void set accessors(List<PropertyAccessorElement> accessors2) { | 2037 void set accessors(List<PropertyAccessorElement> accessors) { |
| 2038 for (PropertyAccessorElement accessor in accessors2) { | 2038 for (PropertyAccessorElement accessor in accessors) { |
| 2039 ((accessor as PropertyAccessorElementImpl)).enclosingElement = this; | 2039 ((accessor as PropertyAccessorElementImpl)).enclosingElement = this; |
| 2040 } | 2040 } |
| 2041 this._accessors = accessors2; | 2041 this._accessors = accessors; |
| 2042 } | 2042 } |
| 2043 | 2043 |
| 2044 /** | 2044 /** |
| 2045 * Set the constructors contained in this class to the given constructors. | 2045 * Set the constructors contained in this class to the given constructors. |
| 2046 * | 2046 * |
| 2047 * @param constructors the constructors contained in this class | 2047 * @param constructors the constructors contained in this class |
| 2048 */ | 2048 */ |
| 2049 void set constructors(List<ConstructorElement> constructors2) { | 2049 void set constructors(List<ConstructorElement> constructors) { |
| 2050 for (ConstructorElement constructor in constructors2) { | 2050 for (ConstructorElement constructor in constructors) { |
| 2051 ((constructor as ConstructorElementImpl)).enclosingElement = this; | 2051 ((constructor as ConstructorElementImpl)).enclosingElement = this; |
| 2052 } | 2052 } |
| 2053 this._constructors = constructors2; | 2053 this._constructors = constructors; |
| 2054 } | 2054 } |
| 2055 | 2055 |
| 2056 /** | 2056 /** |
| 2057 * Set the fields contained in this class to the given fields. | 2057 * Set the fields contained in this class to the given fields. |
| 2058 * | 2058 * |
| 2059 * @param fields the fields contained in this class | 2059 * @param fields the fields contained in this class |
| 2060 */ | 2060 */ |
| 2061 void set fields(List<FieldElement> fields2) { | 2061 void set fields(List<FieldElement> fields) { |
| 2062 for (FieldElement field in fields2) { | 2062 for (FieldElement field in fields) { |
| 2063 ((field as FieldElementImpl)).enclosingElement = this; | 2063 ((field as FieldElementImpl)).enclosingElement = this; |
| 2064 } | 2064 } |
| 2065 this._fields = fields2; | 2065 this._fields = fields; |
| 2066 } | 2066 } |
| 2067 | 2067 |
| 2068 /** | 2068 /** |
| 2069 * Set whether this class references 'super' to the given value. | 2069 * Set whether this class references 'super' to the given value. |
| 2070 * | 2070 * |
| 2071 * @param isReferencedSuper `true` references 'super' | 2071 * @param isReferencedSuper `true` references 'super' |
| 2072 */ | 2072 */ |
| 2073 void set hasReferenceToSuper2(bool isReferencedSuper) { | 2073 void set hasReferenceToSuper2(bool isReferencedSuper) { |
| 2074 setModifier(Modifier.REFERENCES_SUPER, isReferencedSuper); | 2074 setModifier(Modifier.REFERENCES_SUPER, isReferencedSuper); |
| 2075 } | 2075 } |
| 2076 | 2076 |
| 2077 /** | 2077 /** |
| 2078 * Set the interfaces that are implemented by this class to the given types. | 2078 * Set the interfaces that are implemented by this class to the given types. |
| 2079 * | 2079 * |
| 2080 * @param the interfaces that are implemented by this class | 2080 * @param the interfaces that are implemented by this class |
| 2081 */ | 2081 */ |
| 2082 void set interfaces(List<InterfaceType> interfaces2) { | 2082 void set interfaces(List<InterfaceType> interfaces) { |
| 2083 this._interfaces = interfaces2; | 2083 this._interfaces = interfaces; |
| 2084 } | 2084 } |
| 2085 | 2085 |
| 2086 /** | 2086 /** |
| 2087 * Set the methods contained in this class to the given methods. | 2087 * Set the methods contained in this class to the given methods. |
| 2088 * | 2088 * |
| 2089 * @param methods the methods contained in this class | 2089 * @param methods the methods contained in this class |
| 2090 */ | 2090 */ |
| 2091 void set methods(List<MethodElement> methods2) { | 2091 void set methods(List<MethodElement> methods) { |
| 2092 for (MethodElement method in methods2) { | 2092 for (MethodElement method in methods) { |
| 2093 ((method as MethodElementImpl)).enclosingElement = this; | 2093 ((method as MethodElementImpl)).enclosingElement = this; |
| 2094 } | 2094 } |
| 2095 this._methods = methods2; | 2095 this._methods = methods; |
| 2096 } | 2096 } |
| 2097 | 2097 |
| 2098 /** | 2098 /** |
| 2099 * Set the mixins that are applied to the class being extended in order to der
ive the superclass | 2099 * Set the mixins that are applied to the class being extended in order to der
ive the superclass |
| 2100 * of this class to the given types. | 2100 * of this class to the given types. |
| 2101 * | 2101 * |
| 2102 * @param mixins the mixins that are applied to derive the superclass of this
class | 2102 * @param mixins the mixins that are applied to derive the superclass of this
class |
| 2103 */ | 2103 */ |
| 2104 void set mixins(List<InterfaceType> mixins2) { | 2104 void set mixins(List<InterfaceType> mixins) { |
| 2105 this._mixins = mixins2; | 2105 this._mixins = mixins; |
| 2106 } | 2106 } |
| 2107 | 2107 |
| 2108 /** | 2108 /** |
| 2109 * Set the superclass of the class to the given type. | 2109 * Set the superclass of the class to the given type. |
| 2110 * | 2110 * |
| 2111 * @param supertype the superclass of the class | 2111 * @param supertype the superclass of the class |
| 2112 */ | 2112 */ |
| 2113 void set supertype(InterfaceType supertype2) { | 2113 void set supertype(InterfaceType supertype) { |
| 2114 this._supertype = supertype2; | 2114 this._supertype = supertype; |
| 2115 } | 2115 } |
| 2116 | 2116 |
| 2117 /** | 2117 /** |
| 2118 * Set the type defined by the class to the given type. | 2118 * Set the type defined by the class to the given type. |
| 2119 * | 2119 * |
| 2120 * @param type the type defined by the class | 2120 * @param type the type defined by the class |
| 2121 */ | 2121 */ |
| 2122 void set type(InterfaceType type2) { | 2122 void set type(InterfaceType type) { |
| 2123 this._type = type2; | 2123 this._type = type; |
| 2124 } | 2124 } |
| 2125 | 2125 |
| 2126 /** | 2126 /** |
| 2127 * Set whether this class is defined by a typedef construct to correspond to t
he given value. | 2127 * Set whether this class is defined by a typedef construct to correspond to t
he given value. |
| 2128 * | 2128 * |
| 2129 * @param isTypedef `true` if the class is defined by a typedef construct | 2129 * @param isTypedef `true` if the class is defined by a typedef construct |
| 2130 */ | 2130 */ |
| 2131 void set typedef(bool isTypedef) { | 2131 void set typedef(bool isTypedef) { |
| 2132 setModifier(Modifier.TYPEDEF, isTypedef); | 2132 setModifier(Modifier.TYPEDEF, isTypedef); |
| 2133 } | 2133 } |
| 2134 | 2134 |
| 2135 /** | 2135 /** |
| 2136 * Set the type parameters defined for this class to the given type parameters
. | 2136 * Set the type parameters defined for this class to the given type parameters
. |
| 2137 * | 2137 * |
| 2138 * @param typeParameters the type parameters defined for this class | 2138 * @param typeParameters the type parameters defined for this class |
| 2139 */ | 2139 */ |
| 2140 void set typeParameters(List<TypeParameterElement> typeParameters2) { | 2140 void set typeParameters(List<TypeParameterElement> typeParameters) { |
| 2141 for (TypeParameterElement typeParameter in typeParameters2) { | 2141 for (TypeParameterElement typeParameter in typeParameters) { |
| 2142 ((typeParameter as TypeParameterElementImpl)).enclosingElement = this; | 2142 ((typeParameter as TypeParameterElementImpl)).enclosingElement = this; |
| 2143 } | 2143 } |
| 2144 this._typeParameters = typeParameters2; | 2144 this._typeParameters = typeParameters; |
| 2145 } | 2145 } |
| 2146 | 2146 |
| 2147 /** | 2147 /** |
| 2148 * Set whether this class is a valid mixin to correspond to the given value. | 2148 * Set whether this class is a valid mixin to correspond to the given value. |
| 2149 * | 2149 * |
| 2150 * @param isValidMixin `true` if this class can be used as a mixin | 2150 * @param isValidMixin `true` if this class can be used as a mixin |
| 2151 */ | 2151 */ |
| 2152 void set validMixin(bool isValidMixin) { | 2152 void set validMixin(bool isValidMixin) { |
| 2153 setModifier(Modifier.MIXIN, isValidMixin); | 2153 setModifier(Modifier.MIXIN, isValidMixin); |
| 2154 } | 2154 } |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2260 | 2260 |
| 2261 /** | 2261 /** |
| 2262 * Initialize a newly created compilation unit element to have the given name. | 2262 * Initialize a newly created compilation unit element to have the given name. |
| 2263 * | 2263 * |
| 2264 * @param name the name of this element | 2264 * @param name the name of this element |
| 2265 */ | 2265 */ |
| 2266 CompilationUnitElementImpl(String name) : super.con2(name, -1); | 2266 CompilationUnitElementImpl(String name) : super.con2(name, -1); |
| 2267 accept(ElementVisitor visitor) => visitor.visitCompilationUnitElement(this); | 2267 accept(ElementVisitor visitor) => visitor.visitCompilationUnitElement(this); |
| 2268 bool operator ==(Object object) => object != null && runtimeType == object.run
timeType && _source == ((object as CompilationUnitElementImpl)).source; | 2268 bool operator ==(Object object) => object != null && runtimeType == object.run
timeType && _source == ((object as CompilationUnitElementImpl)).source; |
| 2269 List<PropertyAccessorElement> get accessors => _accessors; | 2269 List<PropertyAccessorElement> get accessors => _accessors; |
| 2270 ElementImpl getChild(String identifier2) { | 2270 ElementImpl getChild(String identifier) { |
| 2271 for (PropertyAccessorElement accessor in _accessors) { | 2271 for (PropertyAccessorElement accessor in _accessors) { |
| 2272 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier2)
{ | 2272 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier)
{ |
| 2273 return accessor as PropertyAccessorElementImpl; | 2273 return accessor as PropertyAccessorElementImpl; |
| 2274 } | 2274 } |
| 2275 } | 2275 } |
| 2276 for (VariableElement variable in _variables) { | 2276 for (VariableElement variable in _variables) { |
| 2277 if (((variable as VariableElementImpl)).identifier == identifier2) { | 2277 if (((variable as VariableElementImpl)).identifier == identifier) { |
| 2278 return variable as VariableElementImpl; | 2278 return variable as VariableElementImpl; |
| 2279 } | 2279 } |
| 2280 } | 2280 } |
| 2281 for (ExecutableElement function in _functions) { | 2281 for (ExecutableElement function in _functions) { |
| 2282 if (((function as ExecutableElementImpl)).identifier == identifier2) { | 2282 if (((function as ExecutableElementImpl)).identifier == identifier) { |
| 2283 return function as ExecutableElementImpl; | 2283 return function as ExecutableElementImpl; |
| 2284 } | 2284 } |
| 2285 } | 2285 } |
| 2286 for (FunctionTypeAliasElement typeAlias in _typeAliases) { | 2286 for (FunctionTypeAliasElement typeAlias in _typeAliases) { |
| 2287 if (((typeAlias as FunctionTypeAliasElementImpl)).identifier == identifier
2) { | 2287 if (((typeAlias as FunctionTypeAliasElementImpl)).identifier == identifier
) { |
| 2288 return typeAlias as FunctionTypeAliasElementImpl; | 2288 return typeAlias as FunctionTypeAliasElementImpl; |
| 2289 } | 2289 } |
| 2290 } | 2290 } |
| 2291 for (ClassElement type in _types) { | 2291 for (ClassElement type in _types) { |
| 2292 if (((type as ClassElementImpl)).identifier == identifier2) { | 2292 if (((type as ClassElementImpl)).identifier == identifier) { |
| 2293 return type as ClassElementImpl; | 2293 return type as ClassElementImpl; |
| 2294 } | 2294 } |
| 2295 } | 2295 } |
| 2296 return null; | 2296 return null; |
| 2297 } | 2297 } |
| 2298 LibraryElement get enclosingElement => super.enclosingElement as LibraryElemen
t; | 2298 LibraryElement get enclosingElement => super.enclosingElement as LibraryElemen
t; |
| 2299 List<FunctionElement> get functions => _functions; | 2299 List<FunctionElement> get functions => _functions; |
| 2300 List<FunctionTypeAliasElement> get functionTypeAliases => _typeAliases; | 2300 List<FunctionTypeAliasElement> get functionTypeAliases => _typeAliases; |
| 2301 String get identifier => source.encoding; | 2301 String get identifier => source.encoding; |
| 2302 ElementKind get kind => ElementKind.COMPILATION_UNIT; | 2302 ElementKind get kind => ElementKind.COMPILATION_UNIT; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2313 List<ClassElement> get types => _types; | 2313 List<ClassElement> get types => _types; |
| 2314 String get uri => _uri; | 2314 String get uri => _uri; |
| 2315 int get hashCode => _source.hashCode; | 2315 int get hashCode => _source.hashCode; |
| 2316 | 2316 |
| 2317 /** | 2317 /** |
| 2318 * Set the top-level accessors (getters and setters) contained in this compila
tion unit to the | 2318 * Set the top-level accessors (getters and setters) contained in this compila
tion unit to the |
| 2319 * given accessors. | 2319 * given accessors. |
| 2320 * | 2320 * |
| 2321 * @param the top-level accessors (getters and setters) contained in this comp
ilation unit | 2321 * @param the top-level accessors (getters and setters) contained in this comp
ilation unit |
| 2322 */ | 2322 */ |
| 2323 void set accessors(List<PropertyAccessorElement> accessors2) { | 2323 void set accessors(List<PropertyAccessorElement> accessors) { |
| 2324 for (PropertyAccessorElement accessor in accessors2) { | 2324 for (PropertyAccessorElement accessor in accessors) { |
| 2325 ((accessor as PropertyAccessorElementImpl)).enclosingElement = this; | 2325 ((accessor as PropertyAccessorElementImpl)).enclosingElement = this; |
| 2326 } | 2326 } |
| 2327 this._accessors = accessors2; | 2327 this._accessors = accessors; |
| 2328 } | 2328 } |
| 2329 | 2329 |
| 2330 /** | 2330 /** |
| 2331 * Set the top-level functions contained in this compilation unit to the given
functions. | 2331 * Set the top-level functions contained in this compilation unit to the given
functions. |
| 2332 * | 2332 * |
| 2333 * @param functions the top-level functions contained in this compilation unit | 2333 * @param functions the top-level functions contained in this compilation unit |
| 2334 */ | 2334 */ |
| 2335 void set functions(List<FunctionElement> functions2) { | 2335 void set functions(List<FunctionElement> functions) { |
| 2336 for (FunctionElement function in functions2) { | 2336 for (FunctionElement function in functions) { |
| 2337 ((function as FunctionElementImpl)).enclosingElement = this; | 2337 ((function as FunctionElementImpl)).enclosingElement = this; |
| 2338 } | 2338 } |
| 2339 this._functions = functions2; | 2339 this._functions = functions; |
| 2340 } | 2340 } |
| 2341 | 2341 |
| 2342 /** | 2342 /** |
| 2343 * Set the source that corresponds to this compilation unit to the given sourc
e. | 2343 * Set the source that corresponds to this compilation unit to the given sourc
e. |
| 2344 * | 2344 * |
| 2345 * @param source the source that corresponds to this compilation unit | 2345 * @param source the source that corresponds to this compilation unit |
| 2346 */ | 2346 */ |
| 2347 void set source(Source source2) { | 2347 void set source(Source source) { |
| 2348 this._source = source2; | 2348 this._source = source; |
| 2349 } | 2349 } |
| 2350 | 2350 |
| 2351 /** | 2351 /** |
| 2352 * Set the top-level variables contained in this compilation unit to the given
variables. | 2352 * Set the top-level variables contained in this compilation unit to the given
variables. |
| 2353 * | 2353 * |
| 2354 * @param variables the top-level variables contained in this compilation unit | 2354 * @param variables the top-level variables contained in this compilation unit |
| 2355 */ | 2355 */ |
| 2356 void set topLevelVariables(List<TopLevelVariableElement> variables2) { | 2356 void set topLevelVariables(List<TopLevelVariableElement> variables) { |
| 2357 for (TopLevelVariableElement field in variables2) { | 2357 for (TopLevelVariableElement field in variables) { |
| 2358 ((field as TopLevelVariableElementImpl)).enclosingElement = this; | 2358 ((field as TopLevelVariableElementImpl)).enclosingElement = this; |
| 2359 } | 2359 } |
| 2360 this._variables = variables2; | 2360 this._variables = variables; |
| 2361 } | 2361 } |
| 2362 | 2362 |
| 2363 /** | 2363 /** |
| 2364 * Set the function type aliases contained in this compilation unit to the giv
en type aliases. | 2364 * Set the function type aliases contained in this compilation unit to the giv
en type aliases. |
| 2365 * | 2365 * |
| 2366 * @param typeAliases the function type aliases contained in this compilation
unit | 2366 * @param typeAliases the function type aliases contained in this compilation
unit |
| 2367 */ | 2367 */ |
| 2368 void set typeAliases(List<FunctionTypeAliasElement> typeAliases2) { | 2368 void set typeAliases(List<FunctionTypeAliasElement> typeAliases) { |
| 2369 for (FunctionTypeAliasElement typeAlias in typeAliases2) { | 2369 for (FunctionTypeAliasElement typeAlias in typeAliases) { |
| 2370 ((typeAlias as FunctionTypeAliasElementImpl)).enclosingElement = this; | 2370 ((typeAlias as FunctionTypeAliasElementImpl)).enclosingElement = this; |
| 2371 } | 2371 } |
| 2372 this._typeAliases = typeAliases2; | 2372 this._typeAliases = typeAliases; |
| 2373 } | 2373 } |
| 2374 | 2374 |
| 2375 /** | 2375 /** |
| 2376 * Set the types contained in this compilation unit to the given types. | 2376 * Set the types contained in this compilation unit to the given types. |
| 2377 * | 2377 * |
| 2378 * @param types types contained in this compilation unit | 2378 * @param types types contained in this compilation unit |
| 2379 */ | 2379 */ |
| 2380 void set types(List<ClassElement> types2) { | 2380 void set types(List<ClassElement> types) { |
| 2381 for (ClassElement type in types2) { | 2381 for (ClassElement type in types) { |
| 2382 ((type as ClassElementImpl)).enclosingElement = this; | 2382 ((type as ClassElementImpl)).enclosingElement = this; |
| 2383 } | 2383 } |
| 2384 this._types = types2; | 2384 this._types = types; |
| 2385 } | 2385 } |
| 2386 | 2386 |
| 2387 /** | 2387 /** |
| 2388 * Set the URI that is specified by the "part" directive in the enclosing libr
ary. | 2388 * Set the URI that is specified by the "part" directive in the enclosing libr
ary. |
| 2389 * | 2389 * |
| 2390 * @param uri the URI that is specified by the "part" directive in the enclosi
ng library. | 2390 * @param uri the URI that is specified by the "part" directive in the enclosi
ng library. |
| 2391 */ | 2391 */ |
| 2392 void set uri(String uri2) { | 2392 void set uri(String uri) { |
| 2393 this._uri = uri2; | 2393 this._uri = uri; |
| 2394 } | 2394 } |
| 2395 void visitChildren(ElementVisitor visitor) { | 2395 void visitChildren(ElementVisitor visitor) { |
| 2396 super.visitChildren(visitor); | 2396 super.visitChildren(visitor); |
| 2397 safelyVisitChildren(_accessors, visitor); | 2397 safelyVisitChildren(_accessors, visitor); |
| 2398 safelyVisitChildren(_functions, visitor); | 2398 safelyVisitChildren(_functions, visitor); |
| 2399 safelyVisitChildren(_typeAliases, visitor); | 2399 safelyVisitChildren(_typeAliases, visitor); |
| 2400 safelyVisitChildren(_types, visitor); | 2400 safelyVisitChildren(_types, visitor); |
| 2401 safelyVisitChildren(_variables, visitor); | 2401 safelyVisitChildren(_variables, visitor); |
| 2402 } | 2402 } |
| 2403 void appendTo(JavaStringBuilder builder) { | 2403 void appendTo(JavaStringBuilder builder) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2419 */ | 2419 */ |
| 2420 EvaluationResultImpl _result; | 2420 EvaluationResultImpl _result; |
| 2421 | 2421 |
| 2422 /** | 2422 /** |
| 2423 * Initialize a newly created field element to have the given name. | 2423 * Initialize a newly created field element to have the given name. |
| 2424 * | 2424 * |
| 2425 * @param name the name of this element | 2425 * @param name the name of this element |
| 2426 */ | 2426 */ |
| 2427 ConstFieldElementImpl(Identifier name) : super.con1(name); | 2427 ConstFieldElementImpl(Identifier name) : super.con1(name); |
| 2428 EvaluationResultImpl get evaluationResult => _result; | 2428 EvaluationResultImpl get evaluationResult => _result; |
| 2429 void set evaluationResult(EvaluationResultImpl result2) { | 2429 void set evaluationResult(EvaluationResultImpl result) { |
| 2430 this._result = result2; | 2430 this._result = result; |
| 2431 } | 2431 } |
| 2432 } | 2432 } |
| 2433 /** | 2433 /** |
| 2434 * Instances of the class `ConstLocalVariableElementImpl` implement a | 2434 * Instances of the class `ConstLocalVariableElementImpl` implement a |
| 2435 * `LocalVariableElement` for a local 'const' variable that has an initializer. | 2435 * `LocalVariableElement` for a local 'const' variable that has an initializer. |
| 2436 * | 2436 * |
| 2437 * @coverage dart.engine.element | 2437 * @coverage dart.engine.element |
| 2438 */ | 2438 */ |
| 2439 class ConstLocalVariableElementImpl extends LocalVariableElementImpl { | 2439 class ConstLocalVariableElementImpl extends LocalVariableElementImpl { |
| 2440 | 2440 |
| 2441 /** | 2441 /** |
| 2442 * The result of evaluating this variable's initializer. | 2442 * The result of evaluating this variable's initializer. |
| 2443 */ | 2443 */ |
| 2444 EvaluationResultImpl _result; | 2444 EvaluationResultImpl _result; |
| 2445 | 2445 |
| 2446 /** | 2446 /** |
| 2447 * Initialize a newly created local variable element to have the given name. | 2447 * Initialize a newly created local variable element to have the given name. |
| 2448 * | 2448 * |
| 2449 * @param name the name of this element | 2449 * @param name the name of this element |
| 2450 */ | 2450 */ |
| 2451 ConstLocalVariableElementImpl(Identifier name) : super(name); | 2451 ConstLocalVariableElementImpl(Identifier name) : super(name); |
| 2452 EvaluationResultImpl get evaluationResult => _result; | 2452 EvaluationResultImpl get evaluationResult => _result; |
| 2453 void set evaluationResult(EvaluationResultImpl result2) { | 2453 void set evaluationResult(EvaluationResultImpl result) { |
| 2454 this._result = result2; | 2454 this._result = result; |
| 2455 } | 2455 } |
| 2456 } | 2456 } |
| 2457 /** | 2457 /** |
| 2458 * Instances of the class `ConstTopLevelVariableElementImpl` implement a | 2458 * Instances of the class `ConstTopLevelVariableElementImpl` implement a |
| 2459 * `TopLevelVariableElement` for a top-level 'const' variable that has an initia
lizer. | 2459 * `TopLevelVariableElement` for a top-level 'const' variable that has an initia
lizer. |
| 2460 */ | 2460 */ |
| 2461 class ConstTopLevelVariableElementImpl extends TopLevelVariableElementImpl { | 2461 class ConstTopLevelVariableElementImpl extends TopLevelVariableElementImpl { |
| 2462 | 2462 |
| 2463 /** | 2463 /** |
| 2464 * The result of evaluating this variable's initializer. | 2464 * The result of evaluating this variable's initializer. |
| 2465 */ | 2465 */ |
| 2466 EvaluationResultImpl _result; | 2466 EvaluationResultImpl _result; |
| 2467 | 2467 |
| 2468 /** | 2468 /** |
| 2469 * Initialize a newly created top-level variable element to have the given nam
e. | 2469 * Initialize a newly created top-level variable element to have the given nam
e. |
| 2470 * | 2470 * |
| 2471 * @param name the name of this element | 2471 * @param name the name of this element |
| 2472 */ | 2472 */ |
| 2473 ConstTopLevelVariableElementImpl(Identifier name) : super.con1(name); | 2473 ConstTopLevelVariableElementImpl(Identifier name) : super.con1(name); |
| 2474 EvaluationResultImpl get evaluationResult => _result; | 2474 EvaluationResultImpl get evaluationResult => _result; |
| 2475 void set evaluationResult(EvaluationResultImpl result2) { | 2475 void set evaluationResult(EvaluationResultImpl result) { |
| 2476 this._result = result2; | 2476 this._result = result; |
| 2477 } | 2477 } |
| 2478 } | 2478 } |
| 2479 /** | 2479 /** |
| 2480 * Instances of the class `ConstructorElementImpl` implement a `ConstructorEleme
nt`. | 2480 * Instances of the class `ConstructorElementImpl` implement a `ConstructorEleme
nt`. |
| 2481 * | 2481 * |
| 2482 * @coverage dart.engine.element | 2482 * @coverage dart.engine.element |
| 2483 */ | 2483 */ |
| 2484 class ConstructorElementImpl extends ExecutableElementImpl implements Constructo
rElement { | 2484 class ConstructorElementImpl extends ExecutableElementImpl implements Constructo
rElement { |
| 2485 | 2485 |
| 2486 /** | 2486 /** |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2535 */ | 2535 */ |
| 2536 void set factory(bool isFactory) { | 2536 void set factory(bool isFactory) { |
| 2537 setModifier(Modifier.FACTORY, isFactory); | 2537 setModifier(Modifier.FACTORY, isFactory); |
| 2538 } | 2538 } |
| 2539 | 2539 |
| 2540 /** | 2540 /** |
| 2541 * Sets the constructor to which this constructor is redirecting. | 2541 * Sets the constructor to which this constructor is redirecting. |
| 2542 * | 2542 * |
| 2543 * @param redirectedConstructor the constructor to which this constructor is r
edirecting | 2543 * @param redirectedConstructor the constructor to which this constructor is r
edirecting |
| 2544 */ | 2544 */ |
| 2545 void set redirectedConstructor(ConstructorElement redirectedConstructor2) { | 2545 void set redirectedConstructor(ConstructorElement redirectedConstructor) { |
| 2546 this._redirectedConstructor = redirectedConstructor2; | 2546 this._redirectedConstructor = redirectedConstructor; |
| 2547 } | 2547 } |
| 2548 void appendTo(JavaStringBuilder builder) { | 2548 void appendTo(JavaStringBuilder builder) { |
| 2549 builder.append(enclosingElement.displayName); | 2549 builder.append(enclosingElement.displayName); |
| 2550 String name = displayName; | 2550 String name = displayName; |
| 2551 if (name != null && !name.isEmpty) { | 2551 if (name != null && !name.isEmpty) { |
| 2552 builder.append("."); | 2552 builder.append("."); |
| 2553 builder.append(name); | 2553 builder.append(name); |
| 2554 } | 2554 } |
| 2555 super.appendTo(builder); | 2555 super.appendTo(builder); |
| 2556 } | 2556 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 2568 */ | 2568 */ |
| 2569 EvaluationResultImpl _result; | 2569 EvaluationResultImpl _result; |
| 2570 | 2570 |
| 2571 /** | 2571 /** |
| 2572 * Initialize a newly created parameter element to have the given name. | 2572 * Initialize a newly created parameter element to have the given name. |
| 2573 * | 2573 * |
| 2574 * @param name the name of this element | 2574 * @param name the name of this element |
| 2575 */ | 2575 */ |
| 2576 DefaultFieldFormalParameterElementImpl(Identifier name) : super(name); | 2576 DefaultFieldFormalParameterElementImpl(Identifier name) : super(name); |
| 2577 EvaluationResultImpl get evaluationResult => _result; | 2577 EvaluationResultImpl get evaluationResult => _result; |
| 2578 void set evaluationResult(EvaluationResultImpl result2) { | 2578 void set evaluationResult(EvaluationResultImpl result) { |
| 2579 this._result = result2; | 2579 this._result = result; |
| 2580 } | 2580 } |
| 2581 } | 2581 } |
| 2582 /** | 2582 /** |
| 2583 * Instances of the class `DefaultParameterElementImpl` implement a `ParameterEl
ement` | 2583 * Instances of the class `DefaultParameterElementImpl` implement a `ParameterEl
ement` |
| 2584 * for parameters that have an initializer. | 2584 * for parameters that have an initializer. |
| 2585 * | 2585 * |
| 2586 * @coverage dart.engine.element | 2586 * @coverage dart.engine.element |
| 2587 */ | 2587 */ |
| 2588 class DefaultParameterElementImpl extends ParameterElementImpl { | 2588 class DefaultParameterElementImpl extends ParameterElementImpl { |
| 2589 | 2589 |
| 2590 /** | 2590 /** |
| 2591 * The result of evaluating this variable's initializer. | 2591 * The result of evaluating this variable's initializer. |
| 2592 */ | 2592 */ |
| 2593 EvaluationResultImpl _result; | 2593 EvaluationResultImpl _result; |
| 2594 | 2594 |
| 2595 /** | 2595 /** |
| 2596 * Initialize a newly created parameter element to have the given name. | 2596 * Initialize a newly created parameter element to have the given name. |
| 2597 * | 2597 * |
| 2598 * @param name the name of this element | 2598 * @param name the name of this element |
| 2599 */ | 2599 */ |
| 2600 DefaultParameterElementImpl(Identifier name) : super.con1(name); | 2600 DefaultParameterElementImpl(Identifier name) : super.con1(name); |
| 2601 EvaluationResultImpl get evaluationResult => _result; | 2601 EvaluationResultImpl get evaluationResult => _result; |
| 2602 void set evaluationResult(EvaluationResultImpl result2) { | 2602 void set evaluationResult(EvaluationResultImpl result) { |
| 2603 this._result = result2; | 2603 this._result = result; |
| 2604 } | 2604 } |
| 2605 } | 2605 } |
| 2606 /** | 2606 /** |
| 2607 * Instances of the class `DynamicElementImpl` represent the synthetic element r
epresenting | 2607 * Instances of the class `DynamicElementImpl` represent the synthetic element r
epresenting |
| 2608 * the declaration of the type `dynamic`. | 2608 * the declaration of the type `dynamic`. |
| 2609 * | 2609 * |
| 2610 * @coverage dart.engine.element | 2610 * @coverage dart.engine.element |
| 2611 */ | 2611 */ |
| 2612 class DynamicElementImpl extends ElementImpl { | 2612 class DynamicElementImpl extends ElementImpl { |
| 2613 | 2613 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2763 return null; | 2763 return null; |
| 2764 } | 2764 } |
| 2765 return _enclosingElement.source; | 2765 return _enclosingElement.source; |
| 2766 } | 2766 } |
| 2767 int get hashCode { | 2767 int get hashCode { |
| 2768 if (_cachedHashCode == 0) { | 2768 if (_cachedHashCode == 0) { |
| 2769 _cachedHashCode = location.hashCode; | 2769 _cachedHashCode = location.hashCode; |
| 2770 } | 2770 } |
| 2771 return _cachedHashCode; | 2771 return _cachedHashCode; |
| 2772 } | 2772 } |
| 2773 bool isAccessibleIn(LibraryElement library2) { | 2773 bool isAccessibleIn(LibraryElement library) { |
| 2774 if (Identifier.isPrivateName(_name)) { | 2774 if (Identifier.isPrivateName(_name)) { |
| 2775 return library2 == library; | 2775 return library == this.library; |
| 2776 } | 2776 } |
| 2777 return true; | 2777 return true; |
| 2778 } | 2778 } |
| 2779 bool get isSynthetic => hasModifier(Modifier.SYNTHETIC); | 2779 bool get isSynthetic => hasModifier(Modifier.SYNTHETIC); |
| 2780 | 2780 |
| 2781 /** | 2781 /** |
| 2782 * Set the metadata associate with this element to the given array of annotati
ons. | 2782 * Set the metadata associate with this element to the given array of annotati
ons. |
| 2783 * | 2783 * |
| 2784 * @param metadata the metadata to be associated with this element | 2784 * @param metadata the metadata to be associated with this element |
| 2785 */ | 2785 */ |
| 2786 void set metadata(List<ElementAnnotation> metadata2) { | 2786 void set metadata(List<ElementAnnotation> metadata) { |
| 2787 this._metadata = metadata2; | 2787 this._metadata = metadata; |
| 2788 } | 2788 } |
| 2789 | 2789 |
| 2790 /** | 2790 /** |
| 2791 * Set the offset of the name of this element in the file that contains the de
claration of this | 2791 * Set the offset of the name of this element in the file that contains the de
claration of this |
| 2792 * element to the given value. This is normally done via the constructor, but
this method is | 2792 * element to the given value. This is normally done via the constructor, but
this method is |
| 2793 * provided to support unnamed constructors. | 2793 * provided to support unnamed constructors. |
| 2794 * | 2794 * |
| 2795 * @param nameOffset the offset to the beginning of the name | 2795 * @param nameOffset the offset to the beginning of the name |
| 2796 */ | 2796 */ |
| 2797 void set nameOffset(int nameOffset2) { | 2797 void set nameOffset(int nameOffset) { |
| 2798 this._nameOffset = nameOffset2; | 2798 this._nameOffset = nameOffset; |
| 2799 } | 2799 } |
| 2800 | 2800 |
| 2801 /** | 2801 /** |
| 2802 * Set whether this element is synthetic to correspond to the given value. | 2802 * Set whether this element is synthetic to correspond to the given value. |
| 2803 * | 2803 * |
| 2804 * @param isSynthetic `true` if the element is synthetic | 2804 * @param isSynthetic `true` if the element is synthetic |
| 2805 */ | 2805 */ |
| 2806 void set synthetic(bool isSynthetic) { | 2806 void set synthetic(bool isSynthetic) { |
| 2807 setModifier(Modifier.SYNTHETIC, isSynthetic); | 2807 setModifier(Modifier.SYNTHETIC, isSynthetic); |
| 2808 } | 2808 } |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3085 EmbeddedHtmlScriptElementImpl(XmlTagNode node) : super(node); | 3085 EmbeddedHtmlScriptElementImpl(XmlTagNode node) : super(node); |
| 3086 accept(ElementVisitor visitor) => visitor.visitEmbeddedHtmlScriptElement(this)
; | 3086 accept(ElementVisitor visitor) => visitor.visitEmbeddedHtmlScriptElement(this)
; |
| 3087 ElementKind get kind => ElementKind.EMBEDDED_HTML_SCRIPT; | 3087 ElementKind get kind => ElementKind.EMBEDDED_HTML_SCRIPT; |
| 3088 LibraryElement get scriptLibrary => _scriptLibrary; | 3088 LibraryElement get scriptLibrary => _scriptLibrary; |
| 3089 | 3089 |
| 3090 /** | 3090 /** |
| 3091 * Set the script library defined by the script tag's content. | 3091 * Set the script library defined by the script tag's content. |
| 3092 * | 3092 * |
| 3093 * @param scriptLibrary the library or `null` if none | 3093 * @param scriptLibrary the library or `null` if none |
| 3094 */ | 3094 */ |
| 3095 void set scriptLibrary(LibraryElementImpl scriptLibrary2) { | 3095 void set scriptLibrary(LibraryElementImpl scriptLibrary) { |
| 3096 scriptLibrary2.enclosingElement = this; | 3096 scriptLibrary.enclosingElement = this; |
| 3097 this._scriptLibrary = scriptLibrary2; | 3097 this._scriptLibrary = scriptLibrary; |
| 3098 } | 3098 } |
| 3099 void visitChildren(ElementVisitor visitor) { | 3099 void visitChildren(ElementVisitor visitor) { |
| 3100 safelyVisitChild(_scriptLibrary, visitor); | 3100 safelyVisitChild(_scriptLibrary, visitor); |
| 3101 } | 3101 } |
| 3102 } | 3102 } |
| 3103 /** | 3103 /** |
| 3104 * The abstract class `ExecutableElementImpl` implements the behavior common to | 3104 * The abstract class `ExecutableElementImpl` implements the behavior common to |
| 3105 * `ExecutableElement`s. | 3105 * `ExecutableElement`s. |
| 3106 * | 3106 * |
| 3107 * @coverage dart.engine.element | 3107 * @coverage dart.engine.element |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3151 ExecutableElementImpl.con1(Identifier name) : super.con1(name); | 3151 ExecutableElementImpl.con1(Identifier name) : super.con1(name); |
| 3152 | 3152 |
| 3153 /** | 3153 /** |
| 3154 * Initialize a newly created executable element to have the given name. | 3154 * Initialize a newly created executable element to have the given name. |
| 3155 * | 3155 * |
| 3156 * @param name the name of this element | 3156 * @param name the name of this element |
| 3157 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 3157 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 3158 * declaration of this element | 3158 * declaration of this element |
| 3159 */ | 3159 */ |
| 3160 ExecutableElementImpl.con2(String name, int nameOffset) : super.con2(name, nam
eOffset); | 3160 ExecutableElementImpl.con2(String name, int nameOffset) : super.con2(name, nam
eOffset); |
| 3161 ElementImpl getChild(String identifier2) { | 3161 ElementImpl getChild(String identifier) { |
| 3162 for (ExecutableElement function in _functions) { | 3162 for (ExecutableElement function in _functions) { |
| 3163 if (((function as ExecutableElementImpl)).identifier == identifier2) { | 3163 if (((function as ExecutableElementImpl)).identifier == identifier) { |
| 3164 return function as ExecutableElementImpl; | 3164 return function as ExecutableElementImpl; |
| 3165 } | 3165 } |
| 3166 } | 3166 } |
| 3167 for (LabelElement label in _labels) { | 3167 for (LabelElement label in _labels) { |
| 3168 if (((label as LabelElementImpl)).identifier == identifier2) { | 3168 if (((label as LabelElementImpl)).identifier == identifier) { |
| 3169 return label as LabelElementImpl; | 3169 return label as LabelElementImpl; |
| 3170 } | 3170 } |
| 3171 } | 3171 } |
| 3172 for (VariableElement variable in _localVariables) { | 3172 for (VariableElement variable in _localVariables) { |
| 3173 if (((variable as VariableElementImpl)).identifier == identifier2) { | 3173 if (((variable as VariableElementImpl)).identifier == identifier) { |
| 3174 return variable as VariableElementImpl; | 3174 return variable as VariableElementImpl; |
| 3175 } | 3175 } |
| 3176 } | 3176 } |
| 3177 for (ParameterElement parameter in _parameters) { | 3177 for (ParameterElement parameter in _parameters) { |
| 3178 if (((parameter as ParameterElementImpl)).identifier == identifier2) { | 3178 if (((parameter as ParameterElementImpl)).identifier == identifier) { |
| 3179 return parameter as ParameterElementImpl; | 3179 return parameter as ParameterElementImpl; |
| 3180 } | 3180 } |
| 3181 } | 3181 } |
| 3182 return null; | 3182 return null; |
| 3183 } | 3183 } |
| 3184 List<FunctionElement> get functions => _functions; | 3184 List<FunctionElement> get functions => _functions; |
| 3185 List<LabelElement> get labels => _labels; | 3185 List<LabelElement> get labels => _labels; |
| 3186 List<LocalVariableElement> get localVariables => _localVariables; | 3186 List<LocalVariableElement> get localVariables => _localVariables; |
| 3187 List<ParameterElement> get parameters => _parameters; | 3187 List<ParameterElement> get parameters => _parameters; |
| 3188 Type2 get returnType => _returnType; | 3188 Type2 get returnType => _returnType; |
| 3189 FunctionType get type => _type; | 3189 FunctionType get type => _type; |
| 3190 bool get isOperator => false; | 3190 bool get isOperator => false; |
| 3191 | 3191 |
| 3192 /** | 3192 /** |
| 3193 * Set the functions defined within this executable element to the given funct
ions. | 3193 * Set the functions defined within this executable element to the given funct
ions. |
| 3194 * | 3194 * |
| 3195 * @param functions the functions defined within this executable element | 3195 * @param functions the functions defined within this executable element |
| 3196 */ | 3196 */ |
| 3197 void set functions(List<FunctionElement> functions2) { | 3197 void set functions(List<FunctionElement> functions) { |
| 3198 for (FunctionElement function in functions2) { | 3198 for (FunctionElement function in functions) { |
| 3199 ((function as FunctionElementImpl)).enclosingElement = this; | 3199 ((function as FunctionElementImpl)).enclosingElement = this; |
| 3200 } | 3200 } |
| 3201 this._functions = functions2; | 3201 this._functions = functions; |
| 3202 } | 3202 } |
| 3203 | 3203 |
| 3204 /** | 3204 /** |
| 3205 * Set the labels defined within this executable element to the given labels. | 3205 * Set the labels defined within this executable element to the given labels. |
| 3206 * | 3206 * |
| 3207 * @param labels the labels defined within this executable element | 3207 * @param labels the labels defined within this executable element |
| 3208 */ | 3208 */ |
| 3209 void set labels(List<LabelElement> labels2) { | 3209 void set labels(List<LabelElement> labels) { |
| 3210 for (LabelElement label in labels2) { | 3210 for (LabelElement label in labels) { |
| 3211 ((label as LabelElementImpl)).enclosingElement = this; | 3211 ((label as LabelElementImpl)).enclosingElement = this; |
| 3212 } | 3212 } |
| 3213 this._labels = labels2; | 3213 this._labels = labels; |
| 3214 } | 3214 } |
| 3215 | 3215 |
| 3216 /** | 3216 /** |
| 3217 * Set the local variables defined within this executable element to the given
variables. | 3217 * Set the local variables defined within this executable element to the given
variables. |
| 3218 * | 3218 * |
| 3219 * @param localVariables the local variables defined within this executable el
ement | 3219 * @param localVariables the local variables defined within this executable el
ement |
| 3220 */ | 3220 */ |
| 3221 void set localVariables(List<LocalVariableElement> localVariables2) { | 3221 void set localVariables(List<LocalVariableElement> localVariables) { |
| 3222 for (LocalVariableElement variable in localVariables2) { | 3222 for (LocalVariableElement variable in localVariables) { |
| 3223 ((variable as LocalVariableElementImpl)).enclosingElement = this; | 3223 ((variable as LocalVariableElementImpl)).enclosingElement = this; |
| 3224 } | 3224 } |
| 3225 this._localVariables = localVariables2; | 3225 this._localVariables = localVariables; |
| 3226 } | 3226 } |
| 3227 | 3227 |
| 3228 /** | 3228 /** |
| 3229 * Set the parameters defined by this executable element to the given paramete
rs. | 3229 * Set the parameters defined by this executable element to the given paramete
rs. |
| 3230 * | 3230 * |
| 3231 * @param parameters the parameters defined by this executable element | 3231 * @param parameters the parameters defined by this executable element |
| 3232 */ | 3232 */ |
| 3233 void set parameters(List<ParameterElement> parameters2) { | 3233 void set parameters(List<ParameterElement> parameters) { |
| 3234 for (ParameterElement parameter in parameters2) { | 3234 for (ParameterElement parameter in parameters) { |
| 3235 ((parameter as ParameterElementImpl)).enclosingElement = this; | 3235 ((parameter as ParameterElementImpl)).enclosingElement = this; |
| 3236 } | 3236 } |
| 3237 this._parameters = parameters2; | 3237 this._parameters = parameters; |
| 3238 } | 3238 } |
| 3239 | 3239 |
| 3240 /** | 3240 /** |
| 3241 * Set the return type defined by this executable element. | 3241 * Set the return type defined by this executable element. |
| 3242 * | 3242 * |
| 3243 * @param returnType the return type defined by this executable element | 3243 * @param returnType the return type defined by this executable element |
| 3244 */ | 3244 */ |
| 3245 void set returnType(Type2 returnType2) { | 3245 void set returnType(Type2 returnType) { |
| 3246 this._returnType = returnType2; | 3246 this._returnType = returnType; |
| 3247 } | 3247 } |
| 3248 | 3248 |
| 3249 /** | 3249 /** |
| 3250 * Set the type of function defined by this executable element to the given ty
pe. | 3250 * Set the type of function defined by this executable element to the given ty
pe. |
| 3251 * | 3251 * |
| 3252 * @param type the type of function defined by this executable element | 3252 * @param type the type of function defined by this executable element |
| 3253 */ | 3253 */ |
| 3254 void set type(FunctionType type2) { | 3254 void set type(FunctionType type) { |
| 3255 this._type = type2; | 3255 this._type = type; |
| 3256 } | 3256 } |
| 3257 void visitChildren(ElementVisitor visitor) { | 3257 void visitChildren(ElementVisitor visitor) { |
| 3258 super.visitChildren(visitor); | 3258 super.visitChildren(visitor); |
| 3259 safelyVisitChildren(_functions, visitor); | 3259 safelyVisitChildren(_functions, visitor); |
| 3260 safelyVisitChildren(_labels, visitor); | 3260 safelyVisitChildren(_labels, visitor); |
| 3261 safelyVisitChildren(_localVariables, visitor); | 3261 safelyVisitChildren(_localVariables, visitor); |
| 3262 safelyVisitChildren(_parameters, visitor); | 3262 safelyVisitChildren(_parameters, visitor); |
| 3263 } | 3263 } |
| 3264 void appendTo(JavaStringBuilder builder) { | 3264 void appendTo(JavaStringBuilder builder) { |
| 3265 builder.append("("); | 3265 builder.append("("); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3309 LibraryElement get exportedLibrary => _exportedLibrary; | 3309 LibraryElement get exportedLibrary => _exportedLibrary; |
| 3310 ElementKind get kind => ElementKind.EXPORT; | 3310 ElementKind get kind => ElementKind.EXPORT; |
| 3311 String get uri => _uri; | 3311 String get uri => _uri; |
| 3312 | 3312 |
| 3313 /** | 3313 /** |
| 3314 * Set the combinators that were specified as part of the export directive to
the given array of | 3314 * Set the combinators that were specified as part of the export directive to
the given array of |
| 3315 * combinators. | 3315 * combinators. |
| 3316 * | 3316 * |
| 3317 * @param combinators the combinators that were specified as part of the expor
t directive | 3317 * @param combinators the combinators that were specified as part of the expor
t directive |
| 3318 */ | 3318 */ |
| 3319 void set combinators(List<NamespaceCombinator> combinators2) { | 3319 void set combinators(List<NamespaceCombinator> combinators) { |
| 3320 this._combinators = combinators2; | 3320 this._combinators = combinators; |
| 3321 } | 3321 } |
| 3322 | 3322 |
| 3323 /** | 3323 /** |
| 3324 * Set the library that is exported from this library by this import directive
to the given | 3324 * Set the library that is exported from this library by this import directive
to the given |
| 3325 * library. | 3325 * library. |
| 3326 * | 3326 * |
| 3327 * @param exportedLibrary the library that is exported from this library | 3327 * @param exportedLibrary the library that is exported from this library |
| 3328 */ | 3328 */ |
| 3329 void set exportedLibrary(LibraryElement exportedLibrary2) { | 3329 void set exportedLibrary(LibraryElement exportedLibrary) { |
| 3330 this._exportedLibrary = exportedLibrary2; | 3330 this._exportedLibrary = exportedLibrary; |
| 3331 } | 3331 } |
| 3332 | 3332 |
| 3333 /** | 3333 /** |
| 3334 * Set the URI that is specified by this directive. | 3334 * Set the URI that is specified by this directive. |
| 3335 * | 3335 * |
| 3336 * @param uri the URI that is specified by this directive. | 3336 * @param uri the URI that is specified by this directive. |
| 3337 */ | 3337 */ |
| 3338 void set uri(String uri2) { | 3338 void set uri(String uri) { |
| 3339 this._uri = uri2; | 3339 this._uri = uri; |
| 3340 } | 3340 } |
| 3341 void appendTo(JavaStringBuilder builder) { | 3341 void appendTo(JavaStringBuilder builder) { |
| 3342 builder.append("export "); | 3342 builder.append("export "); |
| 3343 ((_exportedLibrary as LibraryElementImpl)).appendTo(builder); | 3343 ((_exportedLibrary as LibraryElementImpl)).appendTo(builder); |
| 3344 } | 3344 } |
| 3345 String get identifier => _exportedLibrary.name; | 3345 String get identifier => _exportedLibrary.name; |
| 3346 } | 3346 } |
| 3347 /** | 3347 /** |
| 3348 * Instances of the class `ExternalHtmlScriptElementImpl` implement an | 3348 * Instances of the class `ExternalHtmlScriptElementImpl` implement an |
| 3349 * [ExternalHtmlScriptElement]. | 3349 * [ExternalHtmlScriptElement]. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3365 ExternalHtmlScriptElementImpl(XmlTagNode node) : super(node); | 3365 ExternalHtmlScriptElementImpl(XmlTagNode node) : super(node); |
| 3366 accept(ElementVisitor visitor) => visitor.visitExternalHtmlScriptElement(this)
; | 3366 accept(ElementVisitor visitor) => visitor.visitExternalHtmlScriptElement(this)
; |
| 3367 ElementKind get kind => ElementKind.EXTERNAL_HTML_SCRIPT; | 3367 ElementKind get kind => ElementKind.EXTERNAL_HTML_SCRIPT; |
| 3368 Source get scriptSource => _scriptSource; | 3368 Source get scriptSource => _scriptSource; |
| 3369 | 3369 |
| 3370 /** | 3370 /** |
| 3371 * Set the source specified in the `source` attribute. | 3371 * Set the source specified in the `source` attribute. |
| 3372 * | 3372 * |
| 3373 * @param scriptSource the script source or `null` if unspecified | 3373 * @param scriptSource the script source or `null` if unspecified |
| 3374 */ | 3374 */ |
| 3375 void set scriptSource(Source scriptSource2) { | 3375 void set scriptSource(Source scriptSource) { |
| 3376 this._scriptSource = scriptSource2; | 3376 this._scriptSource = scriptSource; |
| 3377 } | 3377 } |
| 3378 } | 3378 } |
| 3379 /** | 3379 /** |
| 3380 * Instances of the class `FieldElementImpl` implement a `FieldElement`. | 3380 * Instances of the class `FieldElementImpl` implement a `FieldElement`. |
| 3381 * | 3381 * |
| 3382 * @coverage dart.engine.element | 3382 * @coverage dart.engine.element |
| 3383 */ | 3383 */ |
| 3384 class FieldElementImpl extends PropertyInducingElementImpl implements FieldEleme
nt { | 3384 class FieldElementImpl extends PropertyInducingElementImpl implements FieldEleme
nt { |
| 3385 | 3385 |
| 3386 /** | 3386 /** |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3437 FieldFormalParameterElementImpl(Identifier name) : super.con1(name); | 3437 FieldFormalParameterElementImpl(Identifier name) : super.con1(name); |
| 3438 accept(ElementVisitor visitor) => visitor.visitFieldFormalParameterElement(thi
s); | 3438 accept(ElementVisitor visitor) => visitor.visitFieldFormalParameterElement(thi
s); |
| 3439 FieldElement get field => _field; | 3439 FieldElement get field => _field; |
| 3440 bool get isInitializingFormal => true; | 3440 bool get isInitializingFormal => true; |
| 3441 | 3441 |
| 3442 /** | 3442 /** |
| 3443 * Set the field element associated with this field formal parameter to the gi
ven element. | 3443 * Set the field element associated with this field formal parameter to the gi
ven element. |
| 3444 * | 3444 * |
| 3445 * @param field the new field element | 3445 * @param field the new field element |
| 3446 */ | 3446 */ |
| 3447 void set field(FieldElement field2) { | 3447 void set field(FieldElement field) { |
| 3448 this._field = field2; | 3448 this._field = field; |
| 3449 } | 3449 } |
| 3450 } | 3450 } |
| 3451 /** | 3451 /** |
| 3452 * Instances of the class `FunctionElementImpl` implement a `FunctionElement`. | 3452 * Instances of the class `FunctionElementImpl` implement a `FunctionElement`. |
| 3453 * | 3453 * |
| 3454 * @coverage dart.engine.element | 3454 * @coverage dart.engine.element |
| 3455 */ | 3455 */ |
| 3456 class FunctionElementImpl extends ExecutableElementImpl implements FunctionEleme
nt { | 3456 class FunctionElementImpl extends ExecutableElementImpl implements FunctionEleme
nt { |
| 3457 | 3457 |
| 3458 /** | 3458 /** |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3557 */ | 3557 */ |
| 3558 static List<FunctionTypeAliasElement> EMPTY_ARRAY = new List<FunctionTypeAlias
Element>(0); | 3558 static List<FunctionTypeAliasElement> EMPTY_ARRAY = new List<FunctionTypeAlias
Element>(0); |
| 3559 | 3559 |
| 3560 /** | 3560 /** |
| 3561 * Initialize a newly created type alias element to have the given name. | 3561 * Initialize a newly created type alias element to have the given name. |
| 3562 * | 3562 * |
| 3563 * @param name the name of this element | 3563 * @param name the name of this element |
| 3564 */ | 3564 */ |
| 3565 FunctionTypeAliasElementImpl(Identifier name) : super.con1(name); | 3565 FunctionTypeAliasElementImpl(Identifier name) : super.con1(name); |
| 3566 accept(ElementVisitor visitor) => visitor.visitFunctionTypeAliasElement(this); | 3566 accept(ElementVisitor visitor) => visitor.visitFunctionTypeAliasElement(this); |
| 3567 ElementImpl getChild(String identifier2) { | 3567 ElementImpl getChild(String identifier) { |
| 3568 for (VariableElement parameter in _parameters) { | 3568 for (VariableElement parameter in _parameters) { |
| 3569 if (((parameter as VariableElementImpl)).identifier == identifier2) { | 3569 if (((parameter as VariableElementImpl)).identifier == identifier) { |
| 3570 return parameter as VariableElementImpl; | 3570 return parameter as VariableElementImpl; |
| 3571 } | 3571 } |
| 3572 } | 3572 } |
| 3573 for (TypeParameterElement typeParameter in _typeParameters) { | 3573 for (TypeParameterElement typeParameter in _typeParameters) { |
| 3574 if (((typeParameter as TypeParameterElementImpl)).identifier == identifier
2) { | 3574 if (((typeParameter as TypeParameterElementImpl)).identifier == identifier
) { |
| 3575 return typeParameter as TypeParameterElementImpl; | 3575 return typeParameter as TypeParameterElementImpl; |
| 3576 } | 3576 } |
| 3577 } | 3577 } |
| 3578 return null; | 3578 return null; |
| 3579 } | 3579 } |
| 3580 CompilationUnitElement get enclosingElement => super.enclosingElement as Compi
lationUnitElement; | 3580 CompilationUnitElement get enclosingElement => super.enclosingElement as Compi
lationUnitElement; |
| 3581 ElementKind get kind => ElementKind.FUNCTION_TYPE_ALIAS; | 3581 ElementKind get kind => ElementKind.FUNCTION_TYPE_ALIAS; |
| 3582 List<ParameterElement> get parameters => _parameters; | 3582 List<ParameterElement> get parameters => _parameters; |
| 3583 Type2 get returnType => _returnType; | 3583 Type2 get returnType => _returnType; |
| 3584 FunctionType get type => _type; | 3584 FunctionType get type => _type; |
| 3585 List<TypeParameterElement> get typeParameters => _typeParameters; | 3585 List<TypeParameterElement> get typeParameters => _typeParameters; |
| 3586 | 3586 |
| 3587 /** | 3587 /** |
| 3588 * Set the parameters defined by this type alias to the given parameters. | 3588 * Set the parameters defined by this type alias to the given parameters. |
| 3589 * | 3589 * |
| 3590 * @param parameters the parameters defined by this type alias | 3590 * @param parameters the parameters defined by this type alias |
| 3591 */ | 3591 */ |
| 3592 void set parameters(List<ParameterElement> parameters2) { | 3592 void set parameters(List<ParameterElement> parameters) { |
| 3593 if (parameters2 != null) { | 3593 if (parameters != null) { |
| 3594 for (ParameterElement parameter in parameters2) { | 3594 for (ParameterElement parameter in parameters) { |
| 3595 ((parameter as ParameterElementImpl)).enclosingElement = this; | 3595 ((parameter as ParameterElementImpl)).enclosingElement = this; |
| 3596 } | 3596 } |
| 3597 } | 3597 } |
| 3598 this._parameters = parameters2; | 3598 this._parameters = parameters; |
| 3599 } | 3599 } |
| 3600 | 3600 |
| 3601 /** | 3601 /** |
| 3602 * Set the return type defined by this type alias. | 3602 * Set the return type defined by this type alias. |
| 3603 * | 3603 * |
| 3604 * @param returnType the return type defined by this type alias | 3604 * @param returnType the return type defined by this type alias |
| 3605 */ | 3605 */ |
| 3606 void set returnType(Type2 returnType2) { | 3606 void set returnType(Type2 returnType) { |
| 3607 this._returnType = returnType2; | 3607 this._returnType = returnType; |
| 3608 } | 3608 } |
| 3609 | 3609 |
| 3610 /** | 3610 /** |
| 3611 * Set the type of function defined by this type alias to the given type. | 3611 * Set the type of function defined by this type alias to the given type. |
| 3612 * | 3612 * |
| 3613 * @param type the type of function defined by this type alias | 3613 * @param type the type of function defined by this type alias |
| 3614 */ | 3614 */ |
| 3615 void set type(FunctionType type2) { | 3615 void set type(FunctionType type) { |
| 3616 this._type = type2; | 3616 this._type = type; |
| 3617 } | 3617 } |
| 3618 | 3618 |
| 3619 /** | 3619 /** |
| 3620 * Set the type parameters defined for this type to the given parameters. | 3620 * Set the type parameters defined for this type to the given parameters. |
| 3621 * | 3621 * |
| 3622 * @param typeParameters the type parameters defined for this type | 3622 * @param typeParameters the type parameters defined for this type |
| 3623 */ | 3623 */ |
| 3624 void set typeParameters(List<TypeParameterElement> typeParameters2) { | 3624 void set typeParameters(List<TypeParameterElement> typeParameters) { |
| 3625 for (TypeParameterElement typeParameter in typeParameters2) { | 3625 for (TypeParameterElement typeParameter in typeParameters) { |
| 3626 ((typeParameter as TypeParameterElementImpl)).enclosingElement = this; | 3626 ((typeParameter as TypeParameterElementImpl)).enclosingElement = this; |
| 3627 } | 3627 } |
| 3628 this._typeParameters = typeParameters2; | 3628 this._typeParameters = typeParameters; |
| 3629 } | 3629 } |
| 3630 | 3630 |
| 3631 /** | 3631 /** |
| 3632 * Set the parameters defined by this type alias to the given parameters witho
ut becoming the | 3632 * Set the parameters defined by this type alias to the given parameters witho
ut becoming the |
| 3633 * parent of the parameters. This should only be used by the [TypeResolverVisi
tor] when | 3633 * parent of the parameters. This should only be used by the [TypeResolverVisi
tor] when |
| 3634 * creating a synthetic type alias. | 3634 * creating a synthetic type alias. |
| 3635 * | 3635 * |
| 3636 * @param parameters the parameters defined by this type alias | 3636 * @param parameters the parameters defined by this type alias |
| 3637 */ | 3637 */ |
| 3638 void shareParameters(List<ParameterElement> parameters2) { | 3638 void shareParameters(List<ParameterElement> parameters) { |
| 3639 this._parameters = parameters2; | 3639 this._parameters = parameters; |
| 3640 } | 3640 } |
| 3641 | 3641 |
| 3642 /** | 3642 /** |
| 3643 * Set the type parameters defined for this type to the given parameters witho
ut becoming the | 3643 * Set the type parameters defined for this type to the given parameters witho
ut becoming the |
| 3644 * parent of the parameters. This should only be used by the [TypeResolverVisi
tor] when | 3644 * parent of the parameters. This should only be used by the [TypeResolverVisi
tor] when |
| 3645 * creating a synthetic type alias. | 3645 * creating a synthetic type alias. |
| 3646 * | 3646 * |
| 3647 * @param typeParameters the type parameters defined for this type | 3647 * @param typeParameters the type parameters defined for this type |
| 3648 */ | 3648 */ |
| 3649 void shareTypeParameters(List<TypeParameterElement> typeParameters2) { | 3649 void shareTypeParameters(List<TypeParameterElement> typeParameters) { |
| 3650 this._typeParameters = typeParameters2; | 3650 this._typeParameters = typeParameters; |
| 3651 } | 3651 } |
| 3652 void visitChildren(ElementVisitor visitor) { | 3652 void visitChildren(ElementVisitor visitor) { |
| 3653 super.visitChildren(visitor); | 3653 super.visitChildren(visitor); |
| 3654 safelyVisitChildren(_parameters, visitor); | 3654 safelyVisitChildren(_parameters, visitor); |
| 3655 safelyVisitChildren(_typeParameters, visitor); | 3655 safelyVisitChildren(_typeParameters, visitor); |
| 3656 } | 3656 } |
| 3657 void appendTo(JavaStringBuilder builder) { | 3657 void appendTo(JavaStringBuilder builder) { |
| 3658 builder.append("typedef "); | 3658 builder.append("typedef "); |
| 3659 builder.append(displayName); | 3659 builder.append(displayName); |
| 3660 int typeParameterCount = _typeParameters.length; | 3660 int typeParameterCount = _typeParameters.length; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3697 */ | 3697 */ |
| 3698 List<String> _hiddenNames = StringUtilities.EMPTY_ARRAY; | 3698 List<String> _hiddenNames = StringUtilities.EMPTY_ARRAY; |
| 3699 List<String> get hiddenNames => _hiddenNames; | 3699 List<String> get hiddenNames => _hiddenNames; |
| 3700 | 3700 |
| 3701 /** | 3701 /** |
| 3702 * Set the names that are not to be made visible in the importing library even
if they are defined | 3702 * Set the names that are not to be made visible in the importing library even
if they are defined |
| 3703 * in the imported library to the given names. | 3703 * in the imported library to the given names. |
| 3704 * | 3704 * |
| 3705 * @param hiddenNames the names that are not to be made visible in the importi
ng library | 3705 * @param hiddenNames the names that are not to be made visible in the importi
ng library |
| 3706 */ | 3706 */ |
| 3707 void set hiddenNames(List<String> hiddenNames2) { | 3707 void set hiddenNames(List<String> hiddenNames) { |
| 3708 this._hiddenNames = hiddenNames2; | 3708 this._hiddenNames = hiddenNames; |
| 3709 } | 3709 } |
| 3710 String toString() { | 3710 String toString() { |
| 3711 JavaStringBuilder builder = new JavaStringBuilder(); | 3711 JavaStringBuilder builder = new JavaStringBuilder(); |
| 3712 builder.append("show "); | 3712 builder.append("show "); |
| 3713 int count = _hiddenNames.length; | 3713 int count = _hiddenNames.length; |
| 3714 for (int i = 0; i < count; i++) { | 3714 for (int i = 0; i < count; i++) { |
| 3715 if (i > 0) { | 3715 if (i > 0) { |
| 3716 builder.append(", "); | 3716 builder.append(", "); |
| 3717 } | 3717 } |
| 3718 builder.append(_hiddenNames[i]); | 3718 builder.append(_hiddenNames[i]); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3762 ElementKind get kind => ElementKind.HTML; | 3762 ElementKind get kind => ElementKind.HTML; |
| 3763 List<HtmlScriptElement> get scripts => _scripts; | 3763 List<HtmlScriptElement> get scripts => _scripts; |
| 3764 Source get source => _source; | 3764 Source get source => _source; |
| 3765 int get hashCode => _source.hashCode; | 3765 int get hashCode => _source.hashCode; |
| 3766 | 3766 |
| 3767 /** | 3767 /** |
| 3768 * Set the scripts contained in the HTML file to the given scripts. | 3768 * Set the scripts contained in the HTML file to the given scripts. |
| 3769 * | 3769 * |
| 3770 * @param scripts the scripts | 3770 * @param scripts the scripts |
| 3771 */ | 3771 */ |
| 3772 void set scripts(List<HtmlScriptElement> scripts2) { | 3772 void set scripts(List<HtmlScriptElement> scripts) { |
| 3773 if (scripts2.length == 0) { | 3773 if (scripts.length == 0) { |
| 3774 scripts2 = HtmlScriptElementImpl.EMPTY_ARRAY; | 3774 scripts = HtmlScriptElementImpl.EMPTY_ARRAY; |
| 3775 } | 3775 } |
| 3776 for (HtmlScriptElement script in scripts2) { | 3776 for (HtmlScriptElement script in scripts) { |
| 3777 ((script as HtmlScriptElementImpl)).enclosingElement = this; | 3777 ((script as HtmlScriptElementImpl)).enclosingElement = this; |
| 3778 } | 3778 } |
| 3779 this._scripts = scripts2; | 3779 this._scripts = scripts; |
| 3780 } | 3780 } |
| 3781 | 3781 |
| 3782 /** | 3782 /** |
| 3783 * Set the source that corresponds to this HTML file to the given source. | 3783 * Set the source that corresponds to this HTML file to the given source. |
| 3784 * | 3784 * |
| 3785 * @param source the source that corresponds to this HTML file | 3785 * @param source the source that corresponds to this HTML file |
| 3786 */ | 3786 */ |
| 3787 void set source(Source source2) { | 3787 void set source(Source source) { |
| 3788 this._source = source2; | 3788 this._source = source; |
| 3789 } | 3789 } |
| 3790 void visitChildren(ElementVisitor visitor) { | 3790 void visitChildren(ElementVisitor visitor) { |
| 3791 super.visitChildren(visitor); | 3791 super.visitChildren(visitor); |
| 3792 safelyVisitChildren(_scripts, visitor); | 3792 safelyVisitChildren(_scripts, visitor); |
| 3793 } | 3793 } |
| 3794 void appendTo(JavaStringBuilder builder) { | 3794 void appendTo(JavaStringBuilder builder) { |
| 3795 if (_source == null) { | 3795 if (_source == null) { |
| 3796 builder.append("{HTML file}"); | 3796 builder.append("{HTML file}"); |
| 3797 } else { | 3797 } else { |
| 3798 builder.append(_source.fullName); | 3798 builder.append(_source.fullName); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3857 ElementKind get kind => ElementKind.IMPORT; | 3857 ElementKind get kind => ElementKind.IMPORT; |
| 3858 PrefixElement get prefix => _prefix; | 3858 PrefixElement get prefix => _prefix; |
| 3859 String get uri => _uri; | 3859 String get uri => _uri; |
| 3860 | 3860 |
| 3861 /** | 3861 /** |
| 3862 * Set the combinators that were specified as part of the import directive to
the given array of | 3862 * Set the combinators that were specified as part of the import directive to
the given array of |
| 3863 * combinators. | 3863 * combinators. |
| 3864 * | 3864 * |
| 3865 * @param combinators the combinators that were specified as part of the impor
t directive | 3865 * @param combinators the combinators that were specified as part of the impor
t directive |
| 3866 */ | 3866 */ |
| 3867 void set combinators(List<NamespaceCombinator> combinators2) { | 3867 void set combinators(List<NamespaceCombinator> combinators) { |
| 3868 this._combinators = combinators2; | 3868 this._combinators = combinators; |
| 3869 } | 3869 } |
| 3870 | 3870 |
| 3871 /** | 3871 /** |
| 3872 * Set the library that is imported into this library by this import directive
to the given | 3872 * Set the library that is imported into this library by this import directive
to the given |
| 3873 * library. | 3873 * library. |
| 3874 * | 3874 * |
| 3875 * @param importedLibrary the library that is imported into this library | 3875 * @param importedLibrary the library that is imported into this library |
| 3876 */ | 3876 */ |
| 3877 void set importedLibrary(LibraryElement importedLibrary2) { | 3877 void set importedLibrary(LibraryElement importedLibrary) { |
| 3878 this._importedLibrary = importedLibrary2; | 3878 this._importedLibrary = importedLibrary; |
| 3879 } | 3879 } |
| 3880 | 3880 |
| 3881 /** | 3881 /** |
| 3882 * Set the prefix that was specified as part of the import directive to the gi
ven prefix. | 3882 * Set the prefix that was specified as part of the import directive to the gi
ven prefix. |
| 3883 * | 3883 * |
| 3884 * @param prefix the prefix that was specified as part of the import directive | 3884 * @param prefix the prefix that was specified as part of the import directive |
| 3885 */ | 3885 */ |
| 3886 void set prefix(PrefixElement prefix2) { | 3886 void set prefix(PrefixElement prefix) { |
| 3887 this._prefix = prefix2; | 3887 this._prefix = prefix; |
| 3888 } | 3888 } |
| 3889 | 3889 |
| 3890 /** | 3890 /** |
| 3891 * Set the URI that is specified by this directive. | 3891 * Set the URI that is specified by this directive. |
| 3892 * | 3892 * |
| 3893 * @param uri the URI that is specified by this directive. | 3893 * @param uri the URI that is specified by this directive. |
| 3894 */ | 3894 */ |
| 3895 void set uri(String uri2) { | 3895 void set uri(String uri) { |
| 3896 this._uri = uri2; | 3896 this._uri = uri; |
| 3897 } | 3897 } |
| 3898 void visitChildren(ElementVisitor visitor) { | 3898 void visitChildren(ElementVisitor visitor) { |
| 3899 super.visitChildren(visitor); | 3899 super.visitChildren(visitor); |
| 3900 safelyVisitChild(_prefix, visitor); | 3900 safelyVisitChild(_prefix, visitor); |
| 3901 } | 3901 } |
| 3902 void appendTo(JavaStringBuilder builder) { | 3902 void appendTo(JavaStringBuilder builder) { |
| 3903 builder.append("import "); | 3903 builder.append("import "); |
| 3904 ((_importedLibrary as LibraryElementImpl)).appendTo(builder); | 3904 ((_importedLibrary as LibraryElementImpl)).appendTo(builder); |
| 3905 } | 3905 } |
| 3906 String get identifier => ((_importedLibrary as LibraryElementImpl)).identifier
; | 3906 String get identifier => ((_importedLibrary as LibraryElementImpl)).identifier
; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4023 * Initialize a newly created library element to have the given name. | 4023 * Initialize a newly created library element to have the given name. |
| 4024 * | 4024 * |
| 4025 * @param context the analysis context in which the library is defined | 4025 * @param context the analysis context in which the library is defined |
| 4026 * @param name the name of this element | 4026 * @param name the name of this element |
| 4027 */ | 4027 */ |
| 4028 LibraryElementImpl(AnalysisContext context, LibraryIdentifier name) : super.co
n1(name) { | 4028 LibraryElementImpl(AnalysisContext context, LibraryIdentifier name) : super.co
n1(name) { |
| 4029 this._context = context; | 4029 this._context = context; |
| 4030 } | 4030 } |
| 4031 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this); | 4031 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this); |
| 4032 bool operator ==(Object object) => object != null && runtimeType == object.run
timeType && _definingCompilationUnit == ((object as LibraryElementImpl)).definin
gCompilationUnit; | 4032 bool operator ==(Object object) => object != null && runtimeType == object.run
timeType && _definingCompilationUnit == ((object as LibraryElementImpl)).definin
gCompilationUnit; |
| 4033 ElementImpl getChild(String identifier2) { | 4033 ElementImpl getChild(String identifier) { |
| 4034 if (((_definingCompilationUnit as CompilationUnitElementImpl)).identifier ==
identifier2) { | 4034 if (((_definingCompilationUnit as CompilationUnitElementImpl)).identifier ==
identifier) { |
| 4035 return _definingCompilationUnit as CompilationUnitElementImpl; | 4035 return _definingCompilationUnit as CompilationUnitElementImpl; |
| 4036 } | 4036 } |
| 4037 for (CompilationUnitElement part in _parts) { | 4037 for (CompilationUnitElement part in _parts) { |
| 4038 if (((part as CompilationUnitElementImpl)).identifier == identifier2) { | 4038 if (((part as CompilationUnitElementImpl)).identifier == identifier) { |
| 4039 return part as CompilationUnitElementImpl; | 4039 return part as CompilationUnitElementImpl; |
| 4040 } | 4040 } |
| 4041 } | 4041 } |
| 4042 for (ImportElement importElement in _imports) { | 4042 for (ImportElement importElement in _imports) { |
| 4043 if (((importElement as ImportElementImpl)).identifier == identifier2) { | 4043 if (((importElement as ImportElementImpl)).identifier == identifier) { |
| 4044 return importElement as ImportElementImpl; | 4044 return importElement as ImportElementImpl; |
| 4045 } | 4045 } |
| 4046 } | 4046 } |
| 4047 for (ExportElement exportElement in _exports) { | 4047 for (ExportElement exportElement in _exports) { |
| 4048 if (((exportElement as ExportElementImpl)).identifier == identifier2) { | 4048 if (((exportElement as ExportElementImpl)).identifier == identifier) { |
| 4049 return exportElement as ExportElementImpl; | 4049 return exportElement as ExportElementImpl; |
| 4050 } | 4050 } |
| 4051 } | 4051 } |
| 4052 return null; | 4052 return null; |
| 4053 } | 4053 } |
| 4054 AnalysisContext get context => _context; | 4054 AnalysisContext get context => _context; |
| 4055 CompilationUnitElement get definingCompilationUnit => _definingCompilationUnit
; | 4055 CompilationUnitElement get definingCompilationUnit => _definingCompilationUnit
; |
| 4056 FunctionElement get entryPoint => _entryPoint; | 4056 FunctionElement get entryPoint => _entryPoint; |
| 4057 List<LibraryElement> get exportedLibraries { | 4057 List<LibraryElement> get exportedLibraries { |
| 4058 Set<LibraryElement> libraries = new Set<LibraryElement>(); | 4058 Set<LibraryElement> libraries = new Set<LibraryElement>(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4116 bool isUpToDate2(int timeStamp) { | 4116 bool isUpToDate2(int timeStamp) { |
| 4117 Set<LibraryElement> visitedLibraries = new Set(); | 4117 Set<LibraryElement> visitedLibraries = new Set(); |
| 4118 return isUpToDate(this, timeStamp, visitedLibraries); | 4118 return isUpToDate(this, timeStamp, visitedLibraries); |
| 4119 } | 4119 } |
| 4120 | 4120 |
| 4121 /** | 4121 /** |
| 4122 * Set the compilation unit that defines this library to the given compilation
unit. | 4122 * Set the compilation unit that defines this library to the given compilation
unit. |
| 4123 * | 4123 * |
| 4124 * @param definingCompilationUnit the compilation unit that defines this libra
ry | 4124 * @param definingCompilationUnit the compilation unit that defines this libra
ry |
| 4125 */ | 4125 */ |
| 4126 void set definingCompilationUnit(CompilationUnitElement definingCompilationUni
t2) { | 4126 void set definingCompilationUnit(CompilationUnitElement definingCompilationUni
t) { |
| 4127 ((definingCompilationUnit2 as CompilationUnitElementImpl)).enclosingElement
= this; | 4127 ((definingCompilationUnit as CompilationUnitElementImpl)).enclosingElement =
this; |
| 4128 this._definingCompilationUnit = definingCompilationUnit2; | 4128 this._definingCompilationUnit = definingCompilationUnit; |
| 4129 } | 4129 } |
| 4130 | 4130 |
| 4131 /** | 4131 /** |
| 4132 * Set the entry point for this library to the given function. | 4132 * Set the entry point for this library to the given function. |
| 4133 * | 4133 * |
| 4134 * @param entryPoint the entry point for this library | 4134 * @param entryPoint the entry point for this library |
| 4135 */ | 4135 */ |
| 4136 void set entryPoint(FunctionElement entryPoint2) { | 4136 void set entryPoint(FunctionElement entryPoint) { |
| 4137 this._entryPoint = entryPoint2; | 4137 this._entryPoint = entryPoint; |
| 4138 } | 4138 } |
| 4139 | 4139 |
| 4140 /** | 4140 /** |
| 4141 * Set the specifications of all of the exports defined in this library to the
given array. | 4141 * Set the specifications of all of the exports defined in this library to the
given array. |
| 4142 * | 4142 * |
| 4143 * @param exports the specifications of all of the exports defined in this lib
rary | 4143 * @param exports the specifications of all of the exports defined in this lib
rary |
| 4144 */ | 4144 */ |
| 4145 void set exports(List<ExportElement> exports2) { | 4145 void set exports(List<ExportElement> exports) { |
| 4146 for (ExportElement exportElement in exports2) { | 4146 for (ExportElement exportElement in exports) { |
| 4147 ((exportElement as ExportElementImpl)).enclosingElement = this; | 4147 ((exportElement as ExportElementImpl)).enclosingElement = this; |
| 4148 } | 4148 } |
| 4149 this._exports = exports2; | 4149 this._exports = exports; |
| 4150 } | 4150 } |
| 4151 | 4151 |
| 4152 /** | 4152 /** |
| 4153 * Set the specifications of all of the imports defined in this library to the
given array. | 4153 * Set the specifications of all of the imports defined in this library to the
given array. |
| 4154 * | 4154 * |
| 4155 * @param imports the specifications of all of the imports defined in this lib
rary | 4155 * @param imports the specifications of all of the imports defined in this lib
rary |
| 4156 */ | 4156 */ |
| 4157 void set imports(List<ImportElement> imports2) { | 4157 void set imports(List<ImportElement> imports) { |
| 4158 for (ImportElement importElement in imports2) { | 4158 for (ImportElement importElement in imports) { |
| 4159 ((importElement as ImportElementImpl)).enclosingElement = this; | 4159 ((importElement as ImportElementImpl)).enclosingElement = this; |
| 4160 PrefixElementImpl prefix = importElement.prefix as PrefixElementImpl; | 4160 PrefixElementImpl prefix = importElement.prefix as PrefixElementImpl; |
| 4161 if (prefix != null) { | 4161 if (prefix != null) { |
| 4162 prefix.enclosingElement = this; | 4162 prefix.enclosingElement = this; |
| 4163 } | 4163 } |
| 4164 } | 4164 } |
| 4165 this._imports = imports2; | 4165 this._imports = imports; |
| 4166 } | 4166 } |
| 4167 | 4167 |
| 4168 /** | 4168 /** |
| 4169 * Set the compilation units that are included in this library using a `part`
directive. | 4169 * Set the compilation units that are included in this library using a `part`
directive. |
| 4170 * | 4170 * |
| 4171 * @param parts the compilation units that are included in this library using
a `part` | 4171 * @param parts the compilation units that are included in this library using
a `part` |
| 4172 * directive | 4172 * directive |
| 4173 */ | 4173 */ |
| 4174 void set parts(List<CompilationUnitElement> parts2) { | 4174 void set parts(List<CompilationUnitElement> parts) { |
| 4175 for (CompilationUnitElement compilationUnit in parts2) { | 4175 for (CompilationUnitElement compilationUnit in parts) { |
| 4176 ((compilationUnit as CompilationUnitElementImpl)).enclosingElement = this; | 4176 ((compilationUnit as CompilationUnitElementImpl)).enclosingElement = this; |
| 4177 } | 4177 } |
| 4178 this._parts = parts2; | 4178 this._parts = parts; |
| 4179 } | 4179 } |
| 4180 void visitChildren(ElementVisitor visitor) { | 4180 void visitChildren(ElementVisitor visitor) { |
| 4181 super.visitChildren(visitor); | 4181 super.visitChildren(visitor); |
| 4182 safelyVisitChild(_definingCompilationUnit, visitor); | 4182 safelyVisitChild(_definingCompilationUnit, visitor); |
| 4183 safelyVisitChildren(_exports, visitor); | 4183 safelyVisitChildren(_exports, visitor); |
| 4184 safelyVisitChildren(_imports, visitor); | 4184 safelyVisitChildren(_imports, visitor); |
| 4185 safelyVisitChildren(_parts, visitor); | 4185 safelyVisitChildren(_parts, visitor); |
| 4186 } | 4186 } |
| 4187 | 4187 |
| 4188 /** | 4188 /** |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4586 void setDefaultValueRange(int offset, int length) { | 4586 void setDefaultValueRange(int offset, int length) { |
| 4587 _defaultValueRangeOffset = offset; | 4587 _defaultValueRangeOffset = offset; |
| 4588 _defaultValueRangeLength = length; | 4588 _defaultValueRangeLength = length; |
| 4589 } | 4589 } |
| 4590 | 4590 |
| 4591 /** | 4591 /** |
| 4592 * Set the kind of this parameter to the given kind. | 4592 * Set the kind of this parameter to the given kind. |
| 4593 * | 4593 * |
| 4594 * @param parameterKind the new kind of this parameter | 4594 * @param parameterKind the new kind of this parameter |
| 4595 */ | 4595 */ |
| 4596 void set parameterKind(ParameterKind parameterKind2) { | 4596 void set parameterKind(ParameterKind parameterKind) { |
| 4597 this._parameterKind = parameterKind2; | 4597 this._parameterKind = parameterKind; |
| 4598 } | 4598 } |
| 4599 | 4599 |
| 4600 /** | 4600 /** |
| 4601 * Set the parameters defined by this executable element to the given paramete
rs. | 4601 * Set the parameters defined by this executable element to the given paramete
rs. |
| 4602 * | 4602 * |
| 4603 * @param parameters the parameters defined by this executable element | 4603 * @param parameters the parameters defined by this executable element |
| 4604 */ | 4604 */ |
| 4605 void set parameters(List<ParameterElement> parameters2) { | 4605 void set parameters(List<ParameterElement> parameters) { |
| 4606 for (ParameterElement parameter in parameters2) { | 4606 for (ParameterElement parameter in parameters) { |
| 4607 ((parameter as ParameterElementImpl)).enclosingElement = this; | 4607 ((parameter as ParameterElementImpl)).enclosingElement = this; |
| 4608 } | 4608 } |
| 4609 this._parameters = parameters2; | 4609 this._parameters = parameters; |
| 4610 } | 4610 } |
| 4611 | 4611 |
| 4612 /** | 4612 /** |
| 4613 * Set the visible range for this element to the range starting at the given o
ffset with the given | 4613 * Set the visible range for this element to the range starting at the given o
ffset with the given |
| 4614 * length. | 4614 * length. |
| 4615 * | 4615 * |
| 4616 * @param offset the offset to the beginning of the visible range for this ele
ment | 4616 * @param offset the offset to the beginning of the visible range for this ele
ment |
| 4617 * @param length the length of the visible range for this element, or `-1` if
this element | 4617 * @param length the length of the visible range for this element, or `-1` if
this element |
| 4618 * does not have a visible range | 4618 * does not have a visible range |
| 4619 */ | 4619 */ |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4671 accept(ElementVisitor visitor) => visitor.visitPrefixElement(this); | 4671 accept(ElementVisitor visitor) => visitor.visitPrefixElement(this); |
| 4672 LibraryElement get enclosingElement => super.enclosingElement as LibraryElemen
t; | 4672 LibraryElement get enclosingElement => super.enclosingElement as LibraryElemen
t; |
| 4673 List<LibraryElement> get importedLibraries => _importedLibraries; | 4673 List<LibraryElement> get importedLibraries => _importedLibraries; |
| 4674 ElementKind get kind => ElementKind.PREFIX; | 4674 ElementKind get kind => ElementKind.PREFIX; |
| 4675 | 4675 |
| 4676 /** | 4676 /** |
| 4677 * Set the libraries that are imported using this prefix to the given librarie
s. | 4677 * Set the libraries that are imported using this prefix to the given librarie
s. |
| 4678 * | 4678 * |
| 4679 * @param importedLibraries the libraries that are imported using this prefix | 4679 * @param importedLibraries the libraries that are imported using this prefix |
| 4680 */ | 4680 */ |
| 4681 void set importedLibraries(List<LibraryElement> importedLibraries2) { | 4681 void set importedLibraries(List<LibraryElement> importedLibraries) { |
| 4682 for (LibraryElement library in importedLibraries2) { | 4682 for (LibraryElement library in importedLibraries) { |
| 4683 ((library as LibraryElementImpl)).enclosingElement = this; | 4683 ((library as LibraryElementImpl)).enclosingElement = this; |
| 4684 } | 4684 } |
| 4685 this._importedLibraries = importedLibraries2; | 4685 this._importedLibraries = importedLibraries; |
| 4686 } | 4686 } |
| 4687 void appendTo(JavaStringBuilder builder) { | 4687 void appendTo(JavaStringBuilder builder) { |
| 4688 builder.append("as "); | 4688 builder.append("as "); |
| 4689 super.appendTo(builder); | 4689 super.appendTo(builder); |
| 4690 } | 4690 } |
| 4691 String get identifier => "_${super.identifier}"; |
| 4691 } | 4692 } |
| 4692 /** | 4693 /** |
| 4693 * Instances of the class `PropertyAccessorElementImpl` implement a | 4694 * Instances of the class `PropertyAccessorElementImpl` implement a |
| 4694 * `PropertyAccessorElement`. | 4695 * `PropertyAccessorElement`. |
| 4695 * | 4696 * |
| 4696 * @coverage dart.engine.element | 4697 * @coverage dart.engine.element |
| 4697 */ | 4698 */ |
| 4698 class PropertyAccessorElementImpl extends ExecutableElementImpl implements Prope
rtyAccessorElement { | 4699 class PropertyAccessorElementImpl extends ExecutableElementImpl implements Prope
rtyAccessorElement { |
| 4699 | 4700 |
| 4700 /** | 4701 /** |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4790 */ | 4791 */ |
| 4791 void set static(bool isStatic) { | 4792 void set static(bool isStatic) { |
| 4792 setModifier(Modifier.STATIC, isStatic); | 4793 setModifier(Modifier.STATIC, isStatic); |
| 4793 } | 4794 } |
| 4794 | 4795 |
| 4795 /** | 4796 /** |
| 4796 * Set the variable associated with this accessor to the given variable. | 4797 * Set the variable associated with this accessor to the given variable. |
| 4797 * | 4798 * |
| 4798 * @param variable the variable associated with this accessor | 4799 * @param variable the variable associated with this accessor |
| 4799 */ | 4800 */ |
| 4800 void set variable(PropertyInducingElement variable2) { | 4801 void set variable(PropertyInducingElement variable) { |
| 4801 this._variable = variable2; | 4802 this._variable = variable; |
| 4802 } | 4803 } |
| 4803 void appendTo(JavaStringBuilder builder) { | 4804 void appendTo(JavaStringBuilder builder) { |
| 4804 builder.append(isGetter ? "get " : "set "); | 4805 builder.append(isGetter ? "get " : "set "); |
| 4805 builder.append(variable.displayName); | 4806 builder.append(variable.displayName); |
| 4806 super.appendTo(builder); | 4807 super.appendTo(builder); |
| 4807 } | 4808 } |
| 4808 } | 4809 } |
| 4809 /** | 4810 /** |
| 4810 * Instances of the class `PropertyInducingElementImpl` implement a | 4811 * Instances of the class `PropertyInducingElementImpl` implement a |
| 4811 * `PropertyInducingElement`. | 4812 * `PropertyInducingElement`. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4846 synthetic = true; | 4847 synthetic = true; |
| 4847 } | 4848 } |
| 4848 PropertyAccessorElement get getter => _getter; | 4849 PropertyAccessorElement get getter => _getter; |
| 4849 PropertyAccessorElement get setter => _setter; | 4850 PropertyAccessorElement get setter => _setter; |
| 4850 | 4851 |
| 4851 /** | 4852 /** |
| 4852 * Set the getter associated with this element to the given accessor. | 4853 * Set the getter associated with this element to the given accessor. |
| 4853 * | 4854 * |
| 4854 * @param getter the getter associated with this element | 4855 * @param getter the getter associated with this element |
| 4855 */ | 4856 */ |
| 4856 void set getter(PropertyAccessorElement getter2) { | 4857 void set getter(PropertyAccessorElement getter) { |
| 4857 this._getter = getter2; | 4858 this._getter = getter; |
| 4858 } | 4859 } |
| 4859 | 4860 |
| 4860 /** | 4861 /** |
| 4861 * Set the setter associated with this element to the given accessor. | 4862 * Set the setter associated with this element to the given accessor. |
| 4862 * | 4863 * |
| 4863 * @param setter the setter associated with this element | 4864 * @param setter the setter associated with this element |
| 4864 */ | 4865 */ |
| 4865 void set setter(PropertyAccessorElement setter2) { | 4866 void set setter(PropertyAccessorElement setter) { |
| 4866 this._setter = setter2; | 4867 this._setter = setter; |
| 4867 } | 4868 } |
| 4868 } | 4869 } |
| 4869 /** | 4870 /** |
| 4870 * Instances of the class `ShowElementCombinatorImpl` implement a | 4871 * Instances of the class `ShowElementCombinatorImpl` implement a |
| 4871 * [ShowElementCombinator]. | 4872 * [ShowElementCombinator]. |
| 4872 * | 4873 * |
| 4873 * @coverage dart.engine.element | 4874 * @coverage dart.engine.element |
| 4874 */ | 4875 */ |
| 4875 class ShowElementCombinatorImpl implements ShowElementCombinator { | 4876 class ShowElementCombinatorImpl implements ShowElementCombinator { |
| 4876 | 4877 |
| 4877 /** | 4878 /** |
| 4878 * The names that are to be made visible in the importing library if they are
defined in the | 4879 * The names that are to be made visible in the importing library if they are
defined in the |
| 4879 * imported library. | 4880 * imported library. |
| 4880 */ | 4881 */ |
| 4881 List<String> _shownNames = StringUtilities.EMPTY_ARRAY; | 4882 List<String> _shownNames = StringUtilities.EMPTY_ARRAY; |
| 4882 List<String> get shownNames => _shownNames; | 4883 List<String> get shownNames => _shownNames; |
| 4883 | 4884 |
| 4884 /** | 4885 /** |
| 4885 * Set the names that are to be made visible in the importing library if they
are defined in the | 4886 * Set the names that are to be made visible in the importing library if they
are defined in the |
| 4886 * imported library to the given names. | 4887 * imported library to the given names. |
| 4887 * | 4888 * |
| 4888 * @param shownNames the names that are to be made visible in the importing li
brary | 4889 * @param shownNames the names that are to be made visible in the importing li
brary |
| 4889 */ | 4890 */ |
| 4890 void set shownNames(List<String> shownNames2) { | 4891 void set shownNames(List<String> shownNames) { |
| 4891 this._shownNames = shownNames2; | 4892 this._shownNames = shownNames; |
| 4892 } | 4893 } |
| 4893 String toString() { | 4894 String toString() { |
| 4894 JavaStringBuilder builder = new JavaStringBuilder(); | 4895 JavaStringBuilder builder = new JavaStringBuilder(); |
| 4895 builder.append("show "); | 4896 builder.append("show "); |
| 4896 int count = _shownNames.length; | 4897 int count = _shownNames.length; |
| 4897 for (int i = 0; i < count; i++) { | 4898 for (int i = 0; i < count; i++) { |
| 4898 if (i > 0) { | 4899 if (i > 0) { |
| 4899 builder.append(", "); | 4900 builder.append(", "); |
| 4900 } | 4901 } |
| 4901 builder.append(_shownNames[i]); | 4902 builder.append(_shownNames[i]); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4965 accept(ElementVisitor visitor) => visitor.visitTypeParameterElement(this); | 4966 accept(ElementVisitor visitor) => visitor.visitTypeParameterElement(this); |
| 4966 Type2 get bound => _bound; | 4967 Type2 get bound => _bound; |
| 4967 ElementKind get kind => ElementKind.TYPE_PARAMETER; | 4968 ElementKind get kind => ElementKind.TYPE_PARAMETER; |
| 4968 TypeParameterType get type => _type; | 4969 TypeParameterType get type => _type; |
| 4969 | 4970 |
| 4970 /** | 4971 /** |
| 4971 * Set the type representing the bound associated with this parameter to the g
iven type. | 4972 * Set the type representing the bound associated with this parameter to the g
iven type. |
| 4972 * | 4973 * |
| 4973 * @param bound the type representing the bound associated with this parameter | 4974 * @param bound the type representing the bound associated with this parameter |
| 4974 */ | 4975 */ |
| 4975 void set bound(Type2 bound2) { | 4976 void set bound(Type2 bound) { |
| 4976 this._bound = bound2; | 4977 this._bound = bound; |
| 4977 } | 4978 } |
| 4978 | 4979 |
| 4979 /** | 4980 /** |
| 4980 * Set the type defined by this type parameter to the given type | 4981 * Set the type defined by this type parameter to the given type |
| 4981 * | 4982 * |
| 4982 * @param type the type defined by this type parameter | 4983 * @param type the type defined by this type parameter |
| 4983 */ | 4984 */ |
| 4984 void set type(TypeParameterType type2) { | 4985 void set type(TypeParameterType type) { |
| 4985 this._type = type2; | 4986 this._type = type; |
| 4986 } | 4987 } |
| 4987 void appendTo(JavaStringBuilder builder) { | 4988 void appendTo(JavaStringBuilder builder) { |
| 4988 builder.append(displayName); | 4989 builder.append(displayName); |
| 4989 if (_bound != null) { | 4990 if (_bound != null) { |
| 4990 builder.append(" extends "); | 4991 builder.append(" extends "); |
| 4991 builder.append(_bound); | 4992 builder.append(_bound); |
| 4992 } | 4993 } |
| 4993 } | 4994 } |
| 4994 } | 4995 } |
| 4995 /** | 4996 /** |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5070 */ | 5071 */ |
| 5071 void set final2(bool isFinal) { | 5072 void set final2(bool isFinal) { |
| 5072 setModifier(Modifier.FINAL, isFinal); | 5073 setModifier(Modifier.FINAL, isFinal); |
| 5073 } | 5074 } |
| 5074 | 5075 |
| 5075 /** | 5076 /** |
| 5076 * Set the function representing this variable's initializer to the given func
tion. | 5077 * Set the function representing this variable's initializer to the given func
tion. |
| 5077 * | 5078 * |
| 5078 * @param initializer the function representing this variable's initializer | 5079 * @param initializer the function representing this variable's initializer |
| 5079 */ | 5080 */ |
| 5080 void set initializer(FunctionElement initializer2) { | 5081 void set initializer(FunctionElement initializer) { |
| 5081 if (initializer2 != null) { | 5082 if (initializer != null) { |
| 5082 ((initializer2 as FunctionElementImpl)).enclosingElement = this; | 5083 ((initializer as FunctionElementImpl)).enclosingElement = this; |
| 5083 } | 5084 } |
| 5084 this._initializer = initializer2; | 5085 this._initializer = initializer; |
| 5085 } | 5086 } |
| 5086 | 5087 |
| 5087 /** | 5088 /** |
| 5088 * Set the declared type of this variable to the given type. | 5089 * Set the declared type of this variable to the given type. |
| 5089 * | 5090 * |
| 5090 * @param type the declared type of this variable | 5091 * @param type the declared type of this variable |
| 5091 */ | 5092 */ |
| 5092 void set type(Type2 type2) { | 5093 void set type(Type2 type) { |
| 5093 this._type = type2; | 5094 this._type = type; |
| 5094 } | 5095 } |
| 5095 void visitChildren(ElementVisitor visitor) { | 5096 void visitChildren(ElementVisitor visitor) { |
| 5096 super.visitChildren(visitor); | 5097 super.visitChildren(visitor); |
| 5097 safelyVisitChild(_initializer, visitor); | 5098 safelyVisitChild(_initializer, visitor); |
| 5098 } | 5099 } |
| 5099 void appendTo(JavaStringBuilder builder) { | 5100 void appendTo(JavaStringBuilder builder) { |
| 5100 builder.append(type); | 5101 builder.append(type); |
| 5101 builder.append(" "); | 5102 builder.append(" "); |
| 5102 builder.append(displayName); | 5103 builder.append(displayName); |
| 5103 } | 5104 } |
| (...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6006 } | 6007 } |
| 6007 } | 6008 } |
| 6008 return s.returnType == VoidTypeImpl.instance || t.returnType.isAssignableTo(
s.returnType); | 6009 return s.returnType == VoidTypeImpl.instance || t.returnType.isAssignableTo(
s.returnType); |
| 6009 } | 6010 } |
| 6010 | 6011 |
| 6011 /** | 6012 /** |
| 6012 * Set the actual types of the type arguments to the given types. | 6013 * Set the actual types of the type arguments to the given types. |
| 6013 * | 6014 * |
| 6014 * @param typeArguments the actual types of the type arguments | 6015 * @param typeArguments the actual types of the type arguments |
| 6015 */ | 6016 */ |
| 6016 void set typeArguments(List<Type2> typeArguments2) { | 6017 void set typeArguments(List<Type2> typeArguments) { |
| 6017 this._typeArguments = typeArguments2; | 6018 this._typeArguments = typeArguments; |
| 6018 } | 6019 } |
| 6019 FunctionTypeImpl substitute3(List<Type2> argumentTypes) => substitute2(argumen
tTypes, typeArguments); | 6020 FunctionTypeImpl substitute3(List<Type2> argumentTypes) => substitute2(argumen
tTypes, typeArguments); |
| 6020 FunctionTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterT
ypes) { | 6021 FunctionTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterT
ypes) { |
| 6021 if (argumentTypes.length != parameterTypes.length) { | 6022 if (argumentTypes.length != parameterTypes.length) { |
| 6022 throw new IllegalArgumentException("argumentTypes.length (${argumentTypes.
length}) != parameterTypes.length (${parameterTypes.length})"); | 6023 throw new IllegalArgumentException("argumentTypes.length (${argumentTypes.
length}) != parameterTypes.length (${parameterTypes.length})"); |
| 6023 } | 6024 } |
| 6024 if (argumentTypes.length == 0) { | 6025 if (argumentTypes.length == 0) { |
| 6025 return this; | 6026 return this; |
| 6026 } | 6027 } |
| 6027 Element element = this.element; | 6028 Element element = this.element; |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6473 } | 6474 } |
| 6474 bool isMoreSpecificThan(Type2 type) { | 6475 bool isMoreSpecificThan(Type2 type) { |
| 6475 if (identical(type, DynamicTypeImpl.instance)) { | 6476 if (identical(type, DynamicTypeImpl.instance)) { |
| 6476 return true; | 6477 return true; |
| 6477 } else if (type is! InterfaceType) { | 6478 } else if (type is! InterfaceType) { |
| 6478 return false; | 6479 return false; |
| 6479 } | 6480 } |
| 6480 return isMoreSpecificThan2(type as InterfaceType, new Set<ClassElement>()); | 6481 return isMoreSpecificThan2(type as InterfaceType, new Set<ClassElement>()); |
| 6481 } | 6482 } |
| 6482 bool get isObject => element.supertype == null; | 6483 bool get isObject => element.supertype == null; |
| 6483 bool isSubtypeOf(Type2 type2) { | 6484 bool isSubtypeOf(Type2 type) { |
| 6484 if (identical(type2, DynamicTypeImpl.instance)) { | 6485 if (identical(type, DynamicTypeImpl.instance)) { |
| 6485 return true; | 6486 return true; |
| 6486 } else if (type2 is TypeParameterType) { | 6487 } else if (type is TypeParameterType) { |
| 6487 return true; | 6488 return true; |
| 6488 } else if (type2 is FunctionType) { | 6489 } else if (type is FunctionType) { |
| 6489 ClassElement element = this.element; | 6490 ClassElement element = this.element; |
| 6490 MethodElement callMethod = element.lookUpMethod("call", element.library); | 6491 MethodElement callMethod = element.lookUpMethod("call", element.library); |
| 6491 if (callMethod != null) { | 6492 if (callMethod != null) { |
| 6492 return callMethod.type.isSubtypeOf(type2); | 6493 return callMethod.type.isSubtypeOf(type); |
| 6493 } | 6494 } |
| 6494 return false; | 6495 return false; |
| 6495 } else if (type2 is! InterfaceType) { | 6496 } else if (type is! InterfaceType) { |
| 6496 return false; | 6497 return false; |
| 6497 } else if (this == type2) { | 6498 } else if (this == type) { |
| 6498 return true; | 6499 return true; |
| 6499 } | 6500 } |
| 6500 return isSubtypeOf2(type2 as InterfaceType, new Set<ClassElement>()); | 6501 return isSubtypeOf2(type as InterfaceType, new Set<ClassElement>()); |
| 6501 } | 6502 } |
| 6502 ConstructorElement lookUpConstructor(String constructorName, LibraryElement li
brary) { | 6503 ConstructorElement lookUpConstructor(String constructorName, LibraryElement li
brary) { |
| 6503 ConstructorElement constructorElement; | 6504 ConstructorElement constructorElement; |
| 6504 if (constructorName == null) { | 6505 if (constructorName == null) { |
| 6505 constructorElement = element.unnamedConstructor; | 6506 constructorElement = element.unnamedConstructor; |
| 6506 } else { | 6507 } else { |
| 6507 constructorElement = element.getNamedConstructor(constructorName); | 6508 constructorElement = element.getNamedConstructor(constructorName); |
| 6508 } | 6509 } |
| 6509 if (constructorElement == null || !constructorElement.isAccessibleIn(library
)) { | 6510 if (constructorElement == null || !constructorElement.isAccessibleIn(library
)) { |
| 6510 return null; | 6511 return null; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6612 supertypeElement = supertype == null ? null : supertype.element; | 6613 supertypeElement = supertype == null ? null : supertype.element; |
| 6613 } | 6614 } |
| 6614 return null; | 6615 return null; |
| 6615 } | 6616 } |
| 6616 | 6617 |
| 6617 /** | 6618 /** |
| 6618 * Set the actual types of the type arguments to those in the given array. | 6619 * Set the actual types of the type arguments to those in the given array. |
| 6619 * | 6620 * |
| 6620 * @param typeArguments the actual types of the type arguments | 6621 * @param typeArguments the actual types of the type arguments |
| 6621 */ | 6622 */ |
| 6622 void set typeArguments(List<Type2> typeArguments2) { | 6623 void set typeArguments(List<Type2> typeArguments) { |
| 6623 this._typeArguments = typeArguments2; | 6624 this._typeArguments = typeArguments; |
| 6624 } | 6625 } |
| 6625 InterfaceTypeImpl substitute4(List<Type2> argumentTypes) => substitute2(argume
ntTypes, typeArguments); | 6626 InterfaceTypeImpl substitute4(List<Type2> argumentTypes) => substitute2(argume
ntTypes, typeArguments); |
| 6626 InterfaceTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameter
Types) { | 6627 InterfaceTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameter
Types) { |
| 6627 if (argumentTypes.length != parameterTypes.length) { | 6628 if (argumentTypes.length != parameterTypes.length) { |
| 6628 throw new IllegalArgumentException("argumentTypes.length (${argumentTypes.
length}) != parameterTypes.length (${parameterTypes.length})"); | 6629 throw new IllegalArgumentException("argumentTypes.length (${argumentTypes.
length}) != parameterTypes.length (${parameterTypes.length})"); |
| 6629 } | 6630 } |
| 6630 if (argumentTypes.length == 0 || _typeArguments.length == 0) { | 6631 if (argumentTypes.length == 0 || _typeArguments.length == 0) { |
| 6631 return this; | 6632 return this; |
| 6632 } | 6633 } |
| 6633 List<Type2> newTypeArguments = TypeImpl.substitute(_typeArguments, argumentT
ypes, parameterTypes); | 6634 List<Type2> newTypeArguments = TypeImpl.substitute(_typeArguments, argumentT
ypes, parameterTypes); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 6652 builder.append(">"); | 6653 builder.append(">"); |
| 6653 } | 6654 } |
| 6654 } | 6655 } |
| 6655 bool isMoreSpecificThan2(InterfaceType s, Set<ClassElement> visitedClasses) { | 6656 bool isMoreSpecificThan2(InterfaceType s, Set<ClassElement> visitedClasses) { |
| 6656 if (this == s) { | 6657 if (this == s) { |
| 6657 return true; | 6658 return true; |
| 6658 } | 6659 } |
| 6659 if (s.isDirectSupertypeOf(this)) { | 6660 if (s.isDirectSupertypeOf(this)) { |
| 6660 return true; | 6661 return true; |
| 6661 } | 6662 } |
| 6662 ClassElement tElement = element; | 6663 ClassElement tElement = this.element; |
| 6663 ClassElement sElement = s.element; | 6664 ClassElement sElement = s.element; |
| 6664 if (tElement == sElement) { | 6665 if (tElement == sElement) { |
| 6665 List<Type2> tArguments = typeArguments; | 6666 List<Type2> tArguments = typeArguments; |
| 6666 List<Type2> sArguments = s.typeArguments; | 6667 List<Type2> sArguments = s.typeArguments; |
| 6667 if (tArguments.length != sArguments.length) { | 6668 if (tArguments.length != sArguments.length) { |
| 6668 return false; | 6669 return false; |
| 6669 } | 6670 } |
| 6670 for (int i = 0; i < tArguments.length; i++) { | 6671 for (int i = 0; i < tArguments.length; i++) { |
| 6671 if (!tArguments[i].isMoreSpecificThan(sArguments[i])) { | 6672 if (!tArguments[i].isMoreSpecificThan(sArguments[i])) { |
| 6672 return false; | 6673 return false; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 6688 return true; | 6689 return true; |
| 6689 } | 6690 } |
| 6690 } | 6691 } |
| 6691 for (InterfaceType mixinType in element.mixins) { | 6692 for (InterfaceType mixinType in element.mixins) { |
| 6692 if (((mixinType as InterfaceTypeImpl)).isMoreSpecificThan2(s, visitedClass
es)) { | 6693 if (((mixinType as InterfaceTypeImpl)).isMoreSpecificThan2(s, visitedClass
es)) { |
| 6693 return true; | 6694 return true; |
| 6694 } | 6695 } |
| 6695 } | 6696 } |
| 6696 return false; | 6697 return false; |
| 6697 } | 6698 } |
| 6698 bool isSubtypeOf2(InterfaceType type2, Set<ClassElement> visitedClasses) { | 6699 bool isSubtypeOf2(InterfaceType type, Set<ClassElement> visitedClasses) { |
| 6699 InterfaceType typeT = this; | 6700 InterfaceType typeT = this; |
| 6700 InterfaceType typeS = type2; | 6701 InterfaceType typeS = type; |
| 6701 ClassElement elementT = element; | 6702 ClassElement elementT = element; |
| 6702 if (elementT == null || visitedClasses.contains(elementT)) { | 6703 if (elementT == null || visitedClasses.contains(elementT)) { |
| 6703 return false; | 6704 return false; |
| 6704 } | 6705 } |
| 6705 javaSetAdd(visitedClasses, elementT); | 6706 javaSetAdd(visitedClasses, elementT); |
| 6706 typeT = substitute2(_typeArguments, elementT.type.typeArguments); | 6707 typeT = substitute2(_typeArguments, elementT.type.typeArguments); |
| 6707 if (typeT == typeS) { | 6708 if (typeT == typeS) { |
| 6708 return true; | 6709 return true; |
| 6709 } else if (elementT == typeS.element) { | 6710 } else if (elementT == typeS.element) { |
| 6710 List<Type2> typeTArgs = typeT.typeArguments; | 6711 List<Type2> typeTArgs = typeT.typeArguments; |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7502 } | 7503 } |
| 7503 /** | 7504 /** |
| 7504 * The interface `VoidType` defines the behavior of the unique object representi
ng the type | 7505 * The interface `VoidType` defines the behavior of the unique object representi
ng the type |
| 7505 * `void`. | 7506 * `void`. |
| 7506 * | 7507 * |
| 7507 * @coverage dart.engine.type | 7508 * @coverage dart.engine.type |
| 7508 */ | 7509 */ |
| 7509 abstract class VoidType implements Type2 { | 7510 abstract class VoidType implements Type2 { |
| 7510 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); | 7511 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); |
| 7511 } | 7512 } |
| OLD | NEW |