| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 | 3 |
| 4 library engine.element; | 4 library engine.element; |
| 5 | 5 |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 import 'java_core.dart'; | 7 import 'java_core.dart'; |
| 8 import 'java_engine.dart'; | 8 import 'java_engine.dart'; |
| 9 import 'source.dart'; | 9 import 'source.dart'; |
| 10 import 'scanner.dart' show Keyword; | 10 import 'scanner.dart' show Keyword; |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 * Return an array containing all of the parameters defined by this executable
element. | 476 * Return an array containing all of the parameters defined by this executable
element. |
| 477 * @return the parameters defined by this executable element | 477 * @return the parameters defined by this executable element |
| 478 */ | 478 */ |
| 479 List<ParameterElement> get parameters; | 479 List<ParameterElement> get parameters; |
| 480 /** | 480 /** |
| 481 * Return the type of function defined by this executable element. | 481 * Return the type of function defined by this executable element. |
| 482 * @return the type of function defined by this executable element | 482 * @return the type of function defined by this executable element |
| 483 */ | 483 */ |
| 484 FunctionType get type; | 484 FunctionType get type; |
| 485 /** | 485 /** |
| 486 * Return {@code true} if this executable element is an operator. The test may
be based on the |
| 487 * name of the executable element, in which case the result will be correct wh
en the name is |
| 488 * legal. |
| 489 * @return {@code true} if this executable element is an operator |
| 490 */ |
| 491 bool isOperator(); |
| 492 /** |
| 486 * Return {@code true} if this element is a static element. A static element i
s an element that is | 493 * Return {@code true} if this element is a static element. A static element i
s an element that is |
| 487 * not associated with a particular instance, but rather with an entire librar
y or class. | 494 * not associated with a particular instance, but rather with an entire librar
y or class. |
| 488 * @return {@code true} if this executable element is a static element | 495 * @return {@code true} if this executable element is a static element |
| 489 */ | 496 */ |
| 490 bool isStatic(); | 497 bool isStatic(); |
| 491 } | 498 } |
| 492 /** | 499 /** |
| 493 * The interface {@code ExportElement} defines the behavior of objects represent
ing information | 500 * The interface {@code ExportElement} defines the behavior of objects represent
ing information |
| 494 * about a single export directive within a library. | 501 * about a single export directive within a library. |
| 495 * @coverage dart.engine.element | 502 * @coverage dart.engine.element |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 * Return the type in which this method is defined. | 761 * Return the type in which this method is defined. |
| 755 * @return the type in which this method is defined | 762 * @return the type in which this method is defined |
| 756 */ | 763 */ |
| 757 ClassElement get enclosingElement; | 764 ClassElement get enclosingElement; |
| 758 /** | 765 /** |
| 759 * Return {@code true} if this method is abstract. Methods are abstract if the
y are not external | 766 * Return {@code true} if this method is abstract. Methods are abstract if the
y are not external |
| 760 * and have no body. | 767 * and have no body. |
| 761 * @return {@code true} if this method is abstract | 768 * @return {@code true} if this method is abstract |
| 762 */ | 769 */ |
| 763 bool isAbstract(); | 770 bool isAbstract(); |
| 764 /** | |
| 765 * Return {@code true} if this method is an operator. The test may be based on
the name of the | |
| 766 * method, in which case the result will be correct when the name is legal. | |
| 767 * @return {@code true} if this method is an operator | |
| 768 */ | |
| 769 bool isOperator(); | |
| 770 } | 771 } |
| 771 /** | 772 /** |
| 772 * The interface {@code MultiplyDefinedElement} defines the behavior of pseudo-e
lements that | 773 * The interface {@code MultiplyDefinedElement} defines the behavior of pseudo-e
lements that |
| 773 * represent multiple elements defined within a single scope that have the same
name. This situation | 774 * represent multiple elements defined within a single scope that have the same
name. This situation |
| 774 * is not allowed by the language, so objects implementing this interface always
represent an error. | 775 * is not allowed by the language, so objects implementing this interface always
represent an error. |
| 775 * As a result, most of the normal operations on elements do not make sense and
will return useless | 776 * As a result, most of the normal operations on elements do not make sense and
will return useless |
| 776 * results. | 777 * results. |
| 777 * @coverage dart.engine.element | 778 * @coverage dart.engine.element |
| 778 */ | 779 */ |
| 779 abstract class MultiplyDefinedElement implements Element { | 780 abstract class MultiplyDefinedElement implements Element { |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1668 for (ClassElement type in _types) { | 1669 for (ClassElement type in _types) { |
| 1669 if (((type as ClassElementImpl)).identifier == identifier26) { | 1670 if (((type as ClassElementImpl)).identifier == identifier26) { |
| 1670 return type as ClassElementImpl; | 1671 return type as ClassElementImpl; |
| 1671 } | 1672 } |
| 1672 } | 1673 } |
| 1673 return null; | 1674 return null; |
| 1674 } | 1675 } |
| 1675 LibraryElement get enclosingElement => super.enclosingElement as LibraryElemen
t; | 1676 LibraryElement get enclosingElement => super.enclosingElement as LibraryElemen
t; |
| 1676 List<FunctionElement> get functions => _functions; | 1677 List<FunctionElement> get functions => _functions; |
| 1677 List<FunctionTypeAliasElement> get functionTypeAliases => _typeAliases; | 1678 List<FunctionTypeAliasElement> get functionTypeAliases => _typeAliases; |
| 1678 String get identifier => source.fullName; | 1679 String get identifier => source.encoding; |
| 1679 ElementKind get kind => ElementKind.COMPILATION_UNIT; | 1680 ElementKind get kind => ElementKind.COMPILATION_UNIT; |
| 1680 Source get source => _source; | 1681 Source get source => _source; |
| 1681 List<TopLevelVariableElement> get topLevelVariables => _variables; | 1682 List<TopLevelVariableElement> get topLevelVariables => _variables; |
| 1682 List<ClassElement> get types => _types; | 1683 List<ClassElement> get types => _types; |
| 1683 int get hashCode => _source.hashCode; | 1684 int get hashCode => _source.hashCode; |
| 1684 /** | 1685 /** |
| 1685 * Set the top-level accessors (getters and setters) contained in this compila
tion unit to the | 1686 * Set the top-level accessors (getters and setters) contained in this compila
tion unit to the |
| 1686 * given accessors. | 1687 * given accessors. |
| 1687 * @param the top-level accessors (getters and setters) contained in this comp
ilation unit | 1688 * @param the top-level accessors (getters and setters) contained in this comp
ilation unit |
| 1688 */ | 1689 */ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1699 void set functions(List<FunctionElement> functions2) { | 1700 void set functions(List<FunctionElement> functions2) { |
| 1700 for (FunctionElement function in functions2) { | 1701 for (FunctionElement function in functions2) { |
| 1701 ((function as FunctionElementImpl)).enclosingElement = this; | 1702 ((function as FunctionElementImpl)).enclosingElement = this; |
| 1702 } | 1703 } |
| 1703 this._functions = functions2; | 1704 this._functions = functions2; |
| 1704 } | 1705 } |
| 1705 /** | 1706 /** |
| 1706 * Set the source that corresponds to this compilation unit to the given sourc
e. | 1707 * Set the source that corresponds to this compilation unit to the given sourc
e. |
| 1707 * @param source the source that corresponds to this compilation unit | 1708 * @param source the source that corresponds to this compilation unit |
| 1708 */ | 1709 */ |
| 1709 void set source(Source source7) { | 1710 void set source(Source source5) { |
| 1710 this._source = source7; | 1711 this._source = source5; |
| 1711 } | 1712 } |
| 1712 /** | 1713 /** |
| 1713 * Set the top-level variables contained in this compilation unit to the given
variables. | 1714 * Set the top-level variables contained in this compilation unit to the given
variables. |
| 1714 * @param variables the top-level variables contained in this compilation unit | 1715 * @param variables the top-level variables contained in this compilation unit |
| 1715 */ | 1716 */ |
| 1716 void set topLevelVariables(List<TopLevelVariableElement> variables2) { | 1717 void set topLevelVariables(List<TopLevelVariableElement> variables2) { |
| 1717 for (TopLevelVariableElement field in variables2) { | 1718 for (TopLevelVariableElement field in variables2) { |
| 1718 ((field as TopLevelVariableElementImpl)).enclosingElement = this; | 1719 ((field as TopLevelVariableElementImpl)).enclosingElement = this; |
| 1719 } | 1720 } |
| 1720 this._variables = variables2; | 1721 this._variables = variables2; |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1944 Set<Modifier> _modifiers; | 1945 Set<Modifier> _modifiers; |
| 1945 /** | 1946 /** |
| 1946 * An array containing all of the metadata associated with this element. | 1947 * An array containing all of the metadata associated with this element. |
| 1947 */ | 1948 */ |
| 1948 List<Annotation> _metadata = AnnotationImpl.EMPTY_ARRAY; | 1949 List<Annotation> _metadata = AnnotationImpl.EMPTY_ARRAY; |
| 1949 /** | 1950 /** |
| 1950 * Initialize a newly created element to have the given name. | 1951 * Initialize a newly created element to have the given name. |
| 1951 * @param name the name of this element | 1952 * @param name the name of this element |
| 1952 */ | 1953 */ |
| 1953 ElementImpl.con1(Identifier name25) { | 1954 ElementImpl.con1(Identifier name25) { |
| 1954 _jtd_constructor_174_impl(name25); | 1955 _jtd_constructor_178_impl(name25); |
| 1955 } | 1956 } |
| 1956 _jtd_constructor_174_impl(Identifier name25) { | 1957 _jtd_constructor_178_impl(Identifier name25) { |
| 1957 _jtd_constructor_175_impl(name25 == null ? "" : name25.name, name25 == null
? -1 : name25.offset); | 1958 _jtd_constructor_179_impl(name25 == null ? "" : name25.name, name25 == null
? -1 : name25.offset); |
| 1958 } | 1959 } |
| 1959 /** | 1960 /** |
| 1960 * Initialize a newly created element to have the given name. | 1961 * Initialize a newly created element to have the given name. |
| 1961 * @param name the name of this element | 1962 * @param name the name of this element |
| 1962 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 1963 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 1963 * declaration of this element | 1964 * declaration of this element |
| 1964 */ | 1965 */ |
| 1965 ElementImpl.con2(String name8, int nameOffset2) { | 1966 ElementImpl.con2(String name8, int nameOffset2) { |
| 1966 _jtd_constructor_175_impl(name8, nameOffset2); | 1967 _jtd_constructor_179_impl(name8, nameOffset2); |
| 1967 } | 1968 } |
| 1968 _jtd_constructor_175_impl(String name8, int nameOffset2) { | 1969 _jtd_constructor_179_impl(String name8, int nameOffset2) { |
| 1969 this._name = name8; | 1970 this._name = name8; |
| 1970 this._nameOffset = nameOffset2; | 1971 this._nameOffset = nameOffset2; |
| 1971 this._modifiers = new Set(); | 1972 this._modifiers = new Set(); |
| 1972 } | 1973 } |
| 1973 bool operator ==(Object object) => object != null && identical(object.runtimeT
ype, runtimeType) && ((object as Element)).location == location; | 1974 bool operator ==(Object object) => object != null && identical(object.runtimeT
ype, runtimeType) && ((object as Element)).location == location; |
| 1974 Element getAncestor(Type elementClass) { | 1975 Element getAncestor(Type elementClass) { |
| 1975 Element ancestor = _enclosingElement; | 1976 Element ancestor = _enclosingElement; |
| 1976 while (ancestor != null && !isInstanceOf(ancestor, elementClass)) { | 1977 while (ancestor != null && !isInstanceOf(ancestor, elementClass)) { |
| 1977 ancestor = ancestor.enclosingElement; | 1978 ancestor = ancestor.enclosingElement; |
| 1978 } | 1979 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 2007 if (Identifier.isPrivateName(_name)) { | 2008 if (Identifier.isPrivateName(_name)) { |
| 2008 return library21 == library; | 2009 return library21 == library; |
| 2009 } | 2010 } |
| 2010 return true; | 2011 return true; |
| 2011 } | 2012 } |
| 2012 bool isSynthetic() => hasModifier(Modifier.SYNTHETIC); | 2013 bool isSynthetic() => hasModifier(Modifier.SYNTHETIC); |
| 2013 /** | 2014 /** |
| 2014 * Set the metadata associate with this element to the given array of annotati
ons. | 2015 * Set the metadata associate with this element to the given array of annotati
ons. |
| 2015 * @param metadata the metadata to be associated with this element | 2016 * @param metadata the metadata to be associated with this element |
| 2016 */ | 2017 */ |
| 2017 void set metadata(List<Annotation> metadata2) { | 2018 void set metadata(List<Annotation> metadata3) { |
| 2018 this._metadata = metadata2; | 2019 this._metadata = metadata3; |
| 2019 } | 2020 } |
| 2020 /** | 2021 /** |
| 2021 * Set the offset of the name of this element in the file that contains the de
claration of this | 2022 * Set the offset of the name of this element in the file that contains the de
claration of this |
| 2022 * element to the given value. This is normally done via the constructor, but
this method is | 2023 * element to the given value. This is normally done via the constructor, but
this method is |
| 2023 * provided to support unnamed constructors. | 2024 * provided to support unnamed constructors. |
| 2024 * @param nameOffset the offset to the beginning of the name | 2025 * @param nameOffset the offset to the beginning of the name |
| 2025 */ | 2026 */ |
| 2026 void set nameOffset(int nameOffset3) { | 2027 void set nameOffset(int nameOffset3) { |
| 2027 this._nameOffset = nameOffset3; | 2028 this._nameOffset = nameOffset3; |
| 2028 } | 2029 } |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2119 List<String> _components; | 2120 List<String> _components; |
| 2120 /** | 2121 /** |
| 2121 * The character used to separate components in the encoded form. | 2122 * The character used to separate components in the encoded form. |
| 2122 */ | 2123 */ |
| 2123 static int _SEPARATOR_CHAR = 0x3B; | 2124 static int _SEPARATOR_CHAR = 0x3B; |
| 2124 /** | 2125 /** |
| 2125 * Initialize a newly created location to represent the given element. | 2126 * Initialize a newly created location to represent the given element. |
| 2126 * @param element the element whose location is being represented | 2127 * @param element the element whose location is being represented |
| 2127 */ | 2128 */ |
| 2128 ElementLocationImpl.con1(Element element) { | 2129 ElementLocationImpl.con1(Element element) { |
| 2129 _jtd_constructor_176_impl(element); | 2130 _jtd_constructor_180_impl(element); |
| 2130 } | 2131 } |
| 2131 _jtd_constructor_176_impl(Element element) { | 2132 _jtd_constructor_180_impl(Element element) { |
| 2132 List<String> components = new List<String>(); | 2133 List<String> components = new List<String>(); |
| 2133 Element ancestor = element; | 2134 Element ancestor = element; |
| 2134 while (ancestor != null) { | 2135 while (ancestor != null) { |
| 2135 components.insertRange(0, 1, ((ancestor as ElementImpl)).identifier); | 2136 components.insertRange(0, 1, ((ancestor as ElementImpl)).identifier); |
| 2136 ancestor = ancestor.enclosingElement; | 2137 ancestor = ancestor.enclosingElement; |
| 2137 } | 2138 } |
| 2138 this._components = new List.from(components); | 2139 this._components = new List.from(components); |
| 2139 } | 2140 } |
| 2140 /** | 2141 /** |
| 2141 * Initialize a newly created location from the given encoded form. | 2142 * Initialize a newly created location from the given encoded form. |
| 2142 * @param encoding the encoded form of a location | 2143 * @param encoding the encoded form of a location |
| 2143 */ | 2144 */ |
| 2144 ElementLocationImpl.con2(String encoding) { | 2145 ElementLocationImpl.con2(String encoding) { |
| 2145 _jtd_constructor_177_impl(encoding); | 2146 _jtd_constructor_181_impl(encoding); |
| 2146 } | 2147 } |
| 2147 _jtd_constructor_177_impl(String encoding) { | 2148 _jtd_constructor_181_impl(String encoding) { |
| 2148 this._components = decode(encoding); | 2149 this._components = decode(encoding); |
| 2149 } | 2150 } |
| 2150 bool operator ==(Object object) { | 2151 bool operator ==(Object object) { |
| 2151 if (object is! ElementLocationImpl) { | 2152 if (object is! ElementLocationImpl) { |
| 2152 return false; | 2153 return false; |
| 2153 } | 2154 } |
| 2154 ElementLocationImpl location = object as ElementLocationImpl; | 2155 ElementLocationImpl location = object as ElementLocationImpl; |
| 2155 return JavaArrays.equals(_components, location._components); | 2156 return JavaArrays.equals(_components, location._components); |
| 2156 } | 2157 } |
| 2157 /** | 2158 /** |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2276 FunctionType _type; | 2277 FunctionType _type; |
| 2277 /** | 2278 /** |
| 2278 * An empty array of executable elements. | 2279 * An empty array of executable elements. |
| 2279 */ | 2280 */ |
| 2280 static List<ExecutableElement> EMPTY_ARRAY = new List<ExecutableElement>(0); | 2281 static List<ExecutableElement> EMPTY_ARRAY = new List<ExecutableElement>(0); |
| 2281 /** | 2282 /** |
| 2282 * Initialize a newly created executable element to have the given name. | 2283 * Initialize a newly created executable element to have the given name. |
| 2283 * @param name the name of this element | 2284 * @param name the name of this element |
| 2284 */ | 2285 */ |
| 2285 ExecutableElementImpl.con1(Identifier name) : super.con1(name) { | 2286 ExecutableElementImpl.con1(Identifier name) : super.con1(name) { |
| 2286 _jtd_constructor_179_impl(name); | 2287 _jtd_constructor_183_impl(name); |
| 2287 } | 2288 } |
| 2288 _jtd_constructor_179_impl(Identifier name) { | 2289 _jtd_constructor_183_impl(Identifier name) { |
| 2289 } | 2290 } |
| 2290 /** | 2291 /** |
| 2291 * Initialize a newly created executable element to have the given name. | 2292 * Initialize a newly created executable element to have the given name. |
| 2292 * @param name the name of this element | 2293 * @param name the name of this element |
| 2293 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 2294 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 2294 * declaration of this element | 2295 * declaration of this element |
| 2295 */ | 2296 */ |
| 2296 ExecutableElementImpl.con2(String name, int nameOffset) : super.con2(name, nam
eOffset) { | 2297 ExecutableElementImpl.con2(String name, int nameOffset) : super.con2(name, nam
eOffset) { |
| 2297 _jtd_constructor_180_impl(name, nameOffset); | 2298 _jtd_constructor_184_impl(name, nameOffset); |
| 2298 } | 2299 } |
| 2299 _jtd_constructor_180_impl(String name, int nameOffset) { | 2300 _jtd_constructor_184_impl(String name, int nameOffset) { |
| 2300 } | 2301 } |
| 2301 ElementImpl getChild(String identifier27) { | 2302 ElementImpl getChild(String identifier27) { |
| 2302 for (ExecutableElement function in _functions) { | 2303 for (ExecutableElement function in _functions) { |
| 2303 if (((function as ExecutableElementImpl)).identifier == identifier27) { | 2304 if (((function as ExecutableElementImpl)).identifier == identifier27) { |
| 2304 return function as ExecutableElementImpl; | 2305 return function as ExecutableElementImpl; |
| 2305 } | 2306 } |
| 2306 } | 2307 } |
| 2307 for (LabelElement label in _labels) { | 2308 for (LabelElement label in _labels) { |
| 2308 if (((label as LabelElementImpl)).identifier == identifier27) { | 2309 if (((label as LabelElementImpl)).identifier == identifier27) { |
| 2309 return label as LabelElementImpl; | 2310 return label as LabelElementImpl; |
| 2310 } | 2311 } |
| 2311 } | 2312 } |
| 2312 for (VariableElement variable in _localVariables) { | 2313 for (VariableElement variable in _localVariables) { |
| 2313 if (((variable as VariableElementImpl)).identifier == identifier27) { | 2314 if (((variable as VariableElementImpl)).identifier == identifier27) { |
| 2314 return variable as VariableElementImpl; | 2315 return variable as VariableElementImpl; |
| 2315 } | 2316 } |
| 2316 } | 2317 } |
| 2317 for (ParameterElement parameter in _parameters) { | 2318 for (ParameterElement parameter in _parameters) { |
| 2318 if (((parameter as ParameterElementImpl)).identifier == identifier27) { | 2319 if (((parameter as ParameterElementImpl)).identifier == identifier27) { |
| 2319 return parameter as ParameterElementImpl; | 2320 return parameter as ParameterElementImpl; |
| 2320 } | 2321 } |
| 2321 } | 2322 } |
| 2322 return null; | 2323 return null; |
| 2323 } | 2324 } |
| 2324 List<FunctionElement> get functions => _functions; | 2325 List<FunctionElement> get functions => _functions; |
| 2325 List<LabelElement> get labels => _labels; | 2326 List<LabelElement> get labels => _labels; |
| 2326 List<LocalVariableElement> get localVariables => _localVariables; | 2327 List<LocalVariableElement> get localVariables => _localVariables; |
| 2327 List<ParameterElement> get parameters => _parameters; | 2328 List<ParameterElement> get parameters => _parameters; |
| 2328 FunctionType get type => _type; | 2329 FunctionType get type => _type; |
| 2330 bool isOperator() => false; |
| 2329 /** | 2331 /** |
| 2330 * Set the functions defined within this executable element to the given funct
ions. | 2332 * Set the functions defined within this executable element to the given funct
ions. |
| 2331 * @param functions the functions defined within this executable element | 2333 * @param functions the functions defined within this executable element |
| 2332 */ | 2334 */ |
| 2333 void set functions(List<FunctionElement> functions3) { | 2335 void set functions(List<FunctionElement> functions3) { |
| 2334 for (FunctionElement function in functions3) { | 2336 for (FunctionElement function in functions3) { |
| 2335 ((function as FunctionElementImpl)).enclosingElement = this; | 2337 ((function as FunctionElementImpl)).enclosingElement = this; |
| 2336 } | 2338 } |
| 2337 this._functions = functions3; | 2339 this._functions = functions3; |
| 2338 } | 2340 } |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2473 class FieldElementImpl extends PropertyInducingElementImpl implements FieldEleme
nt { | 2475 class FieldElementImpl extends PropertyInducingElementImpl implements FieldEleme
nt { |
| 2474 /** | 2476 /** |
| 2475 * An empty array of field elements. | 2477 * An empty array of field elements. |
| 2476 */ | 2478 */ |
| 2477 static List<FieldElement> EMPTY_ARRAY = new List<FieldElement>(0); | 2479 static List<FieldElement> EMPTY_ARRAY = new List<FieldElement>(0); |
| 2478 /** | 2480 /** |
| 2479 * Initialize a newly created field element to have the given name. | 2481 * Initialize a newly created field element to have the given name. |
| 2480 * @param name the name of this element | 2482 * @param name the name of this element |
| 2481 */ | 2483 */ |
| 2482 FieldElementImpl.con1(Identifier name) : super.con1(name) { | 2484 FieldElementImpl.con1(Identifier name) : super.con1(name) { |
| 2483 _jtd_constructor_183_impl(name); | 2485 _jtd_constructor_187_impl(name); |
| 2484 } | 2486 } |
| 2485 _jtd_constructor_183_impl(Identifier name) { | 2487 _jtd_constructor_187_impl(Identifier name) { |
| 2486 } | 2488 } |
| 2487 /** | 2489 /** |
| 2488 * Initialize a newly created synthetic field element to have the given name. | 2490 * Initialize a newly created synthetic field element to have the given name. |
| 2489 * @param name the name of this element | 2491 * @param name the name of this element |
| 2490 */ | 2492 */ |
| 2491 FieldElementImpl.con2(String name) : super.con2(name) { | 2493 FieldElementImpl.con2(String name) : super.con2(name) { |
| 2492 _jtd_constructor_184_impl(name); | 2494 _jtd_constructor_188_impl(name); |
| 2493 } | 2495 } |
| 2494 _jtd_constructor_184_impl(String name) { | 2496 _jtd_constructor_188_impl(String name) { |
| 2495 } | 2497 } |
| 2496 accept(ElementVisitor visitor) => visitor.visitFieldElement(this); | 2498 accept(ElementVisitor visitor) => visitor.visitFieldElement(this); |
| 2497 ClassElement get enclosingElement => super.enclosingElement as ClassElement; | 2499 ClassElement get enclosingElement => super.enclosingElement as ClassElement; |
| 2498 ElementKind get kind => ElementKind.FIELD; | 2500 ElementKind get kind => ElementKind.FIELD; |
| 2499 bool isStatic() => hasModifier(Modifier.STATIC); | 2501 bool isStatic() => hasModifier(Modifier.STATIC); |
| 2500 /** | 2502 /** |
| 2501 * Set whether this field is static to correspond to the given value. | 2503 * Set whether this field is static to correspond to the given value. |
| 2502 * @param isStatic {@code true} if the field is static | 2504 * @param isStatic {@code true} if the field is static |
| 2503 */ | 2505 */ |
| 2504 void set static(bool isStatic) { | 2506 void set static(bool isStatic) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2520 */ | 2522 */ |
| 2521 int _visibleRangeLength = -1; | 2523 int _visibleRangeLength = -1; |
| 2522 /** | 2524 /** |
| 2523 * An empty array of function elements. | 2525 * An empty array of function elements. |
| 2524 */ | 2526 */ |
| 2525 static List<FunctionElement> EMPTY_ARRAY = new List<FunctionElement>(0); | 2527 static List<FunctionElement> EMPTY_ARRAY = new List<FunctionElement>(0); |
| 2526 /** | 2528 /** |
| 2527 * Initialize a newly created synthetic function element. | 2529 * Initialize a newly created synthetic function element. |
| 2528 */ | 2530 */ |
| 2529 FunctionElementImpl() : super.con2("", -1) { | 2531 FunctionElementImpl() : super.con2("", -1) { |
| 2530 _jtd_constructor_185_impl(); | 2532 _jtd_constructor_189_impl(); |
| 2531 } | 2533 } |
| 2532 _jtd_constructor_185_impl() { | 2534 _jtd_constructor_189_impl() { |
| 2533 synthetic = true; | 2535 synthetic = true; |
| 2534 } | 2536 } |
| 2535 /** | 2537 /** |
| 2536 * Initialize a newly created function element to have the given name. | 2538 * Initialize a newly created function element to have the given name. |
| 2537 * @param name the name of this element | 2539 * @param name the name of this element |
| 2538 */ | 2540 */ |
| 2539 FunctionElementImpl.con1(Identifier name) : super.con1(name) { | 2541 FunctionElementImpl.con1(Identifier name) : super.con1(name) { |
| 2540 _jtd_constructor_186_impl(name); | 2542 _jtd_constructor_190_impl(name); |
| 2541 } | 2543 } |
| 2542 _jtd_constructor_186_impl(Identifier name) { | 2544 _jtd_constructor_190_impl(Identifier name) { |
| 2543 } | 2545 } |
| 2544 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this); | 2546 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this); |
| 2545 String get identifier => name; | 2547 String get identifier => name; |
| 2546 ElementKind get kind => ElementKind.FUNCTION; | 2548 ElementKind get kind => ElementKind.FUNCTION; |
| 2547 SourceRange get visibleRange { | 2549 SourceRange get visibleRange { |
| 2548 if (_visibleRangeLength < 0) { | 2550 if (_visibleRangeLength < 0) { |
| 2549 return null; | 2551 return null; |
| 2550 } | 2552 } |
| 2551 return new SourceRange(_visibleRangeOffset, _visibleRangeLength); | 2553 return new SourceRange(_visibleRangeOffset, _visibleRangeLength); |
| 2552 } | 2554 } |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2759 void set scripts(List<HtmlScriptElement> scripts2) { | 2761 void set scripts(List<HtmlScriptElement> scripts2) { |
| 2760 for (HtmlScriptElement script in scripts2) { | 2762 for (HtmlScriptElement script in scripts2) { |
| 2761 ((script as HtmlScriptElementImpl)).enclosingElement = this; | 2763 ((script as HtmlScriptElementImpl)).enclosingElement = this; |
| 2762 } | 2764 } |
| 2763 this._scripts = scripts2; | 2765 this._scripts = scripts2; |
| 2764 } | 2766 } |
| 2765 /** | 2767 /** |
| 2766 * Set the source that corresponds to this HTML file to the given source. | 2768 * Set the source that corresponds to this HTML file to the given source. |
| 2767 * @param source the source that corresponds to this HTML file | 2769 * @param source the source that corresponds to this HTML file |
| 2768 */ | 2770 */ |
| 2769 void set source(Source source8) { | 2771 void set source(Source source6) { |
| 2770 this._source = source8; | 2772 this._source = source6; |
| 2771 } | 2773 } |
| 2772 void visitChildren(ElementVisitor<Object> visitor) { | 2774 void visitChildren(ElementVisitor<Object> visitor) { |
| 2773 super.visitChildren(visitor); | 2775 super.visitChildren(visitor); |
| 2774 safelyVisitChildren(_scripts, visitor); | 2776 safelyVisitChildren(_scripts, visitor); |
| 2775 } | 2777 } |
| 2776 void appendTo(JavaStringBuilder builder) { | 2778 void appendTo(JavaStringBuilder builder) { |
| 2777 if (_source == null) { | 2779 if (_source == null) { |
| 2778 builder.append("{HTML file}"); | 2780 builder.append("{HTML file}"); |
| 2779 } else { | 2781 } else { |
| 2780 builder.append(_source.fullName); | 2782 builder.append(_source.fullName); |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2983 } | 2985 } |
| 2984 return null; | 2986 return null; |
| 2985 } | 2987 } |
| 2986 AnalysisContext get context => _context; | 2988 AnalysisContext get context => _context; |
| 2987 CompilationUnitElement get definingCompilationUnit => _definingCompilationUnit
; | 2989 CompilationUnitElement get definingCompilationUnit => _definingCompilationUnit
; |
| 2988 FunctionElement get entryPoint => _entryPoint; | 2990 FunctionElement get entryPoint => _entryPoint; |
| 2989 List<LibraryElement> get exportedLibraries { | 2991 List<LibraryElement> get exportedLibraries { |
| 2990 Set<LibraryElement> libraries = new Set<LibraryElement>(); | 2992 Set<LibraryElement> libraries = new Set<LibraryElement>(); |
| 2991 for (ExportElement element in _exports) { | 2993 for (ExportElement element in _exports) { |
| 2992 LibraryElement library = element.exportedLibrary; | 2994 LibraryElement library = element.exportedLibrary; |
| 2993 javaSetAdd(libraries, library); | 2995 if (library != null) { |
| 2996 javaSetAdd(libraries, library); |
| 2997 } |
| 2994 } | 2998 } |
| 2995 return new List.from(libraries); | 2999 return new List.from(libraries); |
| 2996 } | 3000 } |
| 2997 List<ExportElement> get exports => _exports; | 3001 List<ExportElement> get exports => _exports; |
| 2998 String get identifier => _definingCompilationUnit.source.fullName; | 3002 String get identifier => _definingCompilationUnit.source.encoding; |
| 2999 List<LibraryElement> get importedLibraries { | 3003 List<LibraryElement> get importedLibraries { |
| 3000 Set<LibraryElement> libraries = new Set<LibraryElement>(); | 3004 Set<LibraryElement> libraries = new Set<LibraryElement>(); |
| 3001 for (ImportElement element in _imports) { | 3005 for (ImportElement element in _imports) { |
| 3002 LibraryElement prefix = element.importedLibrary; | 3006 LibraryElement library = element.importedLibrary; |
| 3003 javaSetAdd(libraries, prefix); | 3007 if (library != null) { |
| 3008 javaSetAdd(libraries, library); |
| 3009 } |
| 3004 } | 3010 } |
| 3005 return new List.from(libraries); | 3011 return new List.from(libraries); |
| 3006 } | 3012 } |
| 3007 List<ImportElement> get imports => _imports; | 3013 List<ImportElement> get imports => _imports; |
| 3008 ElementKind get kind => ElementKind.LIBRARY; | 3014 ElementKind get kind => ElementKind.LIBRARY; |
| 3009 List<CompilationUnitElement> get parts => _parts; | 3015 List<CompilationUnitElement> get parts => _parts; |
| 3010 List<PrefixElement> get prefixes { | 3016 List<PrefixElement> get prefixes { |
| 3011 Set<PrefixElement> prefixes = new Set<PrefixElement>(); | 3017 Set<PrefixElement> prefixes = new Set<PrefixElement>(); |
| 3012 for (ImportElement element in _imports) { | 3018 for (ImportElement element in _imports) { |
| 3013 PrefixElement prefix4 = element.prefix; | 3019 PrefixElement prefix4 = element.prefix; |
| 3014 if (prefix4 != null) { | 3020 if (prefix4 != null) { |
| 3015 javaSetAdd(prefixes, prefix4); | 3021 javaSetAdd(prefixes, prefix4); |
| 3016 } | 3022 } |
| 3017 } | 3023 } |
| 3018 return new List.from(prefixes); | 3024 return new List.from(prefixes); |
| 3019 } | 3025 } |
| 3026 Source get source { |
| 3027 if (_definingCompilationUnit == null) { |
| 3028 return null; |
| 3029 } |
| 3030 return _definingCompilationUnit.source; |
| 3031 } |
| 3020 int get hashCode => _definingCompilationUnit.hashCode; | 3032 int get hashCode => _definingCompilationUnit.hashCode; |
| 3021 bool isBrowserApplication() => _entryPoint != null && isOrImportsBrowserLibrar
y(); | 3033 bool isBrowserApplication() => _entryPoint != null && isOrImportsBrowserLibrar
y(); |
| 3022 bool isDartCore() => name == "dart.core"; | 3034 bool isDartCore() => name == "dart.core"; |
| 3023 bool isUpToDate2(int timeStamp) { | 3035 bool isUpToDate2(int timeStamp) { |
| 3024 Set<LibraryElement> visitedLibraries = new Set(); | 3036 Set<LibraryElement> visitedLibraries = new Set(); |
| 3025 return isUpToDate(this, timeStamp, visitedLibraries); | 3037 return isUpToDate(this, timeStamp, visitedLibraries); |
| 3026 } | 3038 } |
| 3027 /** | 3039 /** |
| 3028 * Set the compilation unit that defines this library to the given compilation
unit. | 3040 * Set the compilation unit that defines this library to the given compilation
unit. |
| 3029 * @param definingCompilationUnit the compilation unit that defines this libra
ry | 3041 * @param definingCompilationUnit the compilation unit that defines this libra
ry |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3083 /** | 3095 /** |
| 3084 * Answer {@code true} if the receiver directly or indirectly imports the dart
:html libraries. | 3096 * Answer {@code true} if the receiver directly or indirectly imports the dart
:html libraries. |
| 3085 * @return {@code true} if the receiver directly or indirectly imports the dar
t:html libraries | 3097 * @return {@code true} if the receiver directly or indirectly imports the dar
t:html libraries |
| 3086 */ | 3098 */ |
| 3087 bool isOrImportsBrowserLibrary() { | 3099 bool isOrImportsBrowserLibrary() { |
| 3088 List<LibraryElement> visited = new List<LibraryElement>(); | 3100 List<LibraryElement> visited = new List<LibraryElement>(); |
| 3089 Source htmlLibSource = definingCompilationUnit.source.resolve("dart:html"); | 3101 Source htmlLibSource = definingCompilationUnit.source.resolve("dart:html"); |
| 3090 visited.add(this); | 3102 visited.add(this); |
| 3091 for (int index = 0; index < visited.length; index++) { | 3103 for (int index = 0; index < visited.length; index++) { |
| 3092 LibraryElement library = visited[index]; | 3104 LibraryElement library = visited[index]; |
| 3093 Source source12 = library.definingCompilationUnit.source; | 3105 Source source10 = library.definingCompilationUnit.source; |
| 3094 if (source12 == htmlLibSource) { | 3106 if (source10 == htmlLibSource) { |
| 3095 return true; | 3107 return true; |
| 3096 } | 3108 } |
| 3097 for (LibraryElement importedLibrary in library.importedLibraries) { | 3109 for (LibraryElement importedLibrary in library.importedLibraries) { |
| 3098 if (!visited.contains(importedLibrary)) { | 3110 if (!visited.contains(importedLibrary)) { |
| 3099 visited.add(importedLibrary); | 3111 visited.add(importedLibrary); |
| 3100 } | 3112 } |
| 3101 } | 3113 } |
| 3102 for (LibraryElement exportedLibrary in library.exportedLibraries) { | 3114 for (LibraryElement exportedLibrary in library.exportedLibraries) { |
| 3103 if (!visited.contains(exportedLibrary)) { | 3115 if (!visited.contains(exportedLibrary)) { |
| 3104 visited.add(exportedLibrary); | 3116 visited.add(exportedLibrary); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3164 class MethodElementImpl extends ExecutableElementImpl implements MethodElement { | 3176 class MethodElementImpl extends ExecutableElementImpl implements MethodElement { |
| 3165 /** | 3177 /** |
| 3166 * An empty array of method elements. | 3178 * An empty array of method elements. |
| 3167 */ | 3179 */ |
| 3168 static List<MethodElement> EMPTY_ARRAY = new List<MethodElement>(0); | 3180 static List<MethodElement> EMPTY_ARRAY = new List<MethodElement>(0); |
| 3169 /** | 3181 /** |
| 3170 * Initialize a newly created method element to have the given name. | 3182 * Initialize a newly created method element to have the given name. |
| 3171 * @param name the name of this element | 3183 * @param name the name of this element |
| 3172 */ | 3184 */ |
| 3173 MethodElementImpl.con1(Identifier name) : super.con1(name) { | 3185 MethodElementImpl.con1(Identifier name) : super.con1(name) { |
| 3174 _jtd_constructor_195_impl(name); | 3186 _jtd_constructor_199_impl(name); |
| 3175 } | 3187 } |
| 3176 _jtd_constructor_195_impl(Identifier name) { | 3188 _jtd_constructor_199_impl(Identifier name) { |
| 3177 } | 3189 } |
| 3178 /** | 3190 /** |
| 3179 * Initialize a newly created method element to have the given name. | 3191 * Initialize a newly created method element to have the given name. |
| 3180 * @param name the name of this element | 3192 * @param name the name of this element |
| 3181 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 3193 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 3182 * declaration of this element | 3194 * declaration of this element |
| 3183 */ | 3195 */ |
| 3184 MethodElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOff
set) { | 3196 MethodElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOff
set) { |
| 3185 _jtd_constructor_196_impl(name, nameOffset); | 3197 _jtd_constructor_200_impl(name, nameOffset); |
| 3186 } | 3198 } |
| 3187 _jtd_constructor_196_impl(String name, int nameOffset) { | 3199 _jtd_constructor_200_impl(String name, int nameOffset) { |
| 3188 } | 3200 } |
| 3189 accept(ElementVisitor visitor) => visitor.visitMethodElement(this); | 3201 accept(ElementVisitor visitor) => visitor.visitMethodElement(this); |
| 3190 ClassElement get enclosingElement => super.enclosingElement as ClassElement; | 3202 ClassElement get enclosingElement => super.enclosingElement as ClassElement; |
| 3191 ElementKind get kind => ElementKind.METHOD; | 3203 ElementKind get kind => ElementKind.METHOD; |
| 3192 bool isAbstract() => hasModifier(Modifier.ABSTRACT); | 3204 bool isAbstract() => hasModifier(Modifier.ABSTRACT); |
| 3193 bool isOperator() { | 3205 bool isOperator() { |
| 3194 String name14 = name; | 3206 String name14 = name; |
| 3195 if (name14.isEmpty) { | 3207 if (name14.isEmpty) { |
| 3196 return false; | 3208 return false; |
| 3197 } | 3209 } |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3460 PropertyInducingElement _variable; | 3472 PropertyInducingElement _variable; |
| 3461 /** | 3473 /** |
| 3462 * An empty array of property accessor elements. | 3474 * An empty array of property accessor elements. |
| 3463 */ | 3475 */ |
| 3464 static List<PropertyAccessorElement> EMPTY_ARRAY = new List<PropertyAccessorEl
ement>(0); | 3476 static List<PropertyAccessorElement> EMPTY_ARRAY = new List<PropertyAccessorEl
ement>(0); |
| 3465 /** | 3477 /** |
| 3466 * Initialize a newly created property accessor element to have the given name
. | 3478 * Initialize a newly created property accessor element to have the given name
. |
| 3467 * @param name the name of this element | 3479 * @param name the name of this element |
| 3468 */ | 3480 */ |
| 3469 PropertyAccessorElementImpl.con1(Identifier name) : super.con1(name) { | 3481 PropertyAccessorElementImpl.con1(Identifier name) : super.con1(name) { |
| 3470 _jtd_constructor_201_impl(name); | 3482 _jtd_constructor_205_impl(name); |
| 3471 } | 3483 } |
| 3472 _jtd_constructor_201_impl(Identifier name) { | 3484 _jtd_constructor_205_impl(Identifier name) { |
| 3473 } | 3485 } |
| 3474 /** | 3486 /** |
| 3475 * Initialize a newly created synthetic property accessor element to be associ
ated with the given | 3487 * Initialize a newly created synthetic property accessor element to be associ
ated with the given |
| 3476 * variable. | 3488 * variable. |
| 3477 * @param variable the variable with which this access is associated | 3489 * @param variable the variable with which this access is associated |
| 3478 */ | 3490 */ |
| 3479 PropertyAccessorElementImpl.con2(PropertyInducingElementImpl variable2) : supe
r.con2(variable2.name, -1) { | 3491 PropertyAccessorElementImpl.con2(PropertyInducingElementImpl variable2) : supe
r.con2(variable2.name, -1) { |
| 3480 _jtd_constructor_202_impl(variable2); | 3492 _jtd_constructor_206_impl(variable2); |
| 3481 } | 3493 } |
| 3482 _jtd_constructor_202_impl(PropertyInducingElementImpl variable2) { | 3494 _jtd_constructor_206_impl(PropertyInducingElementImpl variable2) { |
| 3483 this._variable = variable2; | 3495 this._variable = variable2; |
| 3484 synthetic = true; | 3496 synthetic = true; |
| 3485 } | 3497 } |
| 3486 accept(ElementVisitor visitor) => visitor.visitPropertyAccessorElement(this); | 3498 accept(ElementVisitor visitor) => visitor.visitPropertyAccessorElement(this); |
| 3487 bool operator ==(Object object) => super == object && identical(isGetter(), ((
object as PropertyAccessorElement)).isGetter()); | 3499 bool operator ==(Object object) => super == object && identical(isGetter(), ((
object as PropertyAccessorElement)).isGetter()); |
| 3488 ElementKind get kind { | 3500 ElementKind get kind { |
| 3489 if (isGetter()) { | 3501 if (isGetter()) { |
| 3490 return ElementKind.GETTER; | 3502 return ElementKind.GETTER; |
| 3491 } | 3503 } |
| 3492 return ElementKind.SETTER; | 3504 return ElementKind.SETTER; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3537 PropertyAccessorElement _setter; | 3549 PropertyAccessorElement _setter; |
| 3538 /** | 3550 /** |
| 3539 * An empty array of elements. | 3551 * An empty array of elements. |
| 3540 */ | 3552 */ |
| 3541 static List<PropertyInducingElement> EMPTY_ARRAY = new List<PropertyInducingEl
ement>(0); | 3553 static List<PropertyInducingElement> EMPTY_ARRAY = new List<PropertyInducingEl
ement>(0); |
| 3542 /** | 3554 /** |
| 3543 * Initialize a newly created element to have the given name. | 3555 * Initialize a newly created element to have the given name. |
| 3544 * @param name the name of this element | 3556 * @param name the name of this element |
| 3545 */ | 3557 */ |
| 3546 PropertyInducingElementImpl.con1(Identifier name) : super.con1(name) { | 3558 PropertyInducingElementImpl.con1(Identifier name) : super.con1(name) { |
| 3547 _jtd_constructor_203_impl(name); | 3559 _jtd_constructor_207_impl(name); |
| 3548 } | 3560 } |
| 3549 _jtd_constructor_203_impl(Identifier name) { | 3561 _jtd_constructor_207_impl(Identifier name) { |
| 3550 } | 3562 } |
| 3551 /** | 3563 /** |
| 3552 * Initialize a newly created synthetic element to have the given name. | 3564 * Initialize a newly created synthetic element to have the given name. |
| 3553 * @param name the name of this element | 3565 * @param name the name of this element |
| 3554 */ | 3566 */ |
| 3555 PropertyInducingElementImpl.con2(String name) : super.con2(name, -1) { | 3567 PropertyInducingElementImpl.con2(String name) : super.con2(name, -1) { |
| 3556 _jtd_constructor_204_impl(name); | 3568 _jtd_constructor_208_impl(name); |
| 3557 } | 3569 } |
| 3558 _jtd_constructor_204_impl(String name) { | 3570 _jtd_constructor_208_impl(String name) { |
| 3559 synthetic = true; | 3571 synthetic = true; |
| 3560 } | 3572 } |
| 3561 PropertyAccessorElement get getter => _getter; | 3573 PropertyAccessorElement get getter => _getter; |
| 3562 PropertyAccessorElement get setter => _setter; | 3574 PropertyAccessorElement get setter => _setter; |
| 3563 /** | 3575 /** |
| 3564 * Set the getter associated with this element to the given accessor. | 3576 * Set the getter associated with this element to the given accessor. |
| 3565 * @param getter the getter associated with this element | 3577 * @param getter the getter associated with this element |
| 3566 */ | 3578 */ |
| 3567 void set getter(PropertyAccessorElement getter2) { | 3579 void set getter(PropertyAccessorElement getter2) { |
| 3568 this._getter = getter2; | 3580 this._getter = getter2; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3619 class TopLevelVariableElementImpl extends PropertyInducingElementImpl implements
TopLevelVariableElement { | 3631 class TopLevelVariableElementImpl extends PropertyInducingElementImpl implements
TopLevelVariableElement { |
| 3620 /** | 3632 /** |
| 3621 * An empty array of top-level variable elements. | 3633 * An empty array of top-level variable elements. |
| 3622 */ | 3634 */ |
| 3623 static List<TopLevelVariableElement> EMPTY_ARRAY = new List<TopLevelVariableEl
ement>(0); | 3635 static List<TopLevelVariableElement> EMPTY_ARRAY = new List<TopLevelVariableEl
ement>(0); |
| 3624 /** | 3636 /** |
| 3625 * Initialize a newly created top-level variable element to have the given nam
e. | 3637 * Initialize a newly created top-level variable element to have the given nam
e. |
| 3626 * @param name the name of this element | 3638 * @param name the name of this element |
| 3627 */ | 3639 */ |
| 3628 TopLevelVariableElementImpl.con1(Identifier name) : super.con1(name) { | 3640 TopLevelVariableElementImpl.con1(Identifier name) : super.con1(name) { |
| 3629 _jtd_constructor_206_impl(name); | 3641 _jtd_constructor_210_impl(name); |
| 3630 } | 3642 } |
| 3631 _jtd_constructor_206_impl(Identifier name) { | 3643 _jtd_constructor_210_impl(Identifier name) { |
| 3632 } | 3644 } |
| 3633 /** | 3645 /** |
| 3634 * Initialize a newly created synthetic top-level variable element to have the
given name. | 3646 * Initialize a newly created synthetic top-level variable element to have the
given name. |
| 3635 * @param name the name of this element | 3647 * @param name the name of this element |
| 3636 */ | 3648 */ |
| 3637 TopLevelVariableElementImpl.con2(String name) : super.con2(name) { | 3649 TopLevelVariableElementImpl.con2(String name) : super.con2(name) { |
| 3638 _jtd_constructor_207_impl(name); | 3650 _jtd_constructor_211_impl(name); |
| 3639 } | 3651 } |
| 3640 _jtd_constructor_207_impl(String name) { | 3652 _jtd_constructor_211_impl(String name) { |
| 3641 } | 3653 } |
| 3642 accept(ElementVisitor visitor) => visitor.visitTopLevelVariableElement(this); | 3654 accept(ElementVisitor visitor) => visitor.visitTopLevelVariableElement(this); |
| 3643 ElementKind get kind => ElementKind.TOP_LEVEL_VARIABLE; | 3655 ElementKind get kind => ElementKind.TOP_LEVEL_VARIABLE; |
| 3644 bool isStatic() => true; | 3656 bool isStatic() => true; |
| 3645 } | 3657 } |
| 3646 /** | 3658 /** |
| 3647 * Instances of the class {@code TypeVariableElementImpl} implement a {@code Typ
eVariableElement}. | 3659 * Instances of the class {@code TypeVariableElementImpl} implement a {@code Typ
eVariableElement}. |
| 3648 * @coverage dart.engine.element | 3660 * @coverage dart.engine.element |
| 3649 */ | 3661 */ |
| 3650 class TypeVariableElementImpl extends ElementImpl implements TypeVariableElement
{ | 3662 class TypeVariableElementImpl extends ElementImpl implements TypeVariableElement
{ |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3709 FunctionElement _initializer; | 3721 FunctionElement _initializer; |
| 3710 /** | 3722 /** |
| 3711 * An empty array of variable elements. | 3723 * An empty array of variable elements. |
| 3712 */ | 3724 */ |
| 3713 static List<VariableElement> EMPTY_ARRAY = new List<VariableElement>(0); | 3725 static List<VariableElement> EMPTY_ARRAY = new List<VariableElement>(0); |
| 3714 /** | 3726 /** |
| 3715 * Initialize a newly created variable element to have the given name. | 3727 * Initialize a newly created variable element to have the given name. |
| 3716 * @param name the name of this element | 3728 * @param name the name of this element |
| 3717 */ | 3729 */ |
| 3718 VariableElementImpl.con1(Identifier name) : super.con1(name) { | 3730 VariableElementImpl.con1(Identifier name) : super.con1(name) { |
| 3719 _jtd_constructor_209_impl(name); | 3731 _jtd_constructor_213_impl(name); |
| 3720 } | 3732 } |
| 3721 _jtd_constructor_209_impl(Identifier name) { | 3733 _jtd_constructor_213_impl(Identifier name) { |
| 3722 } | 3734 } |
| 3723 /** | 3735 /** |
| 3724 * Initialize a newly created variable element to have the given name. | 3736 * Initialize a newly created variable element to have the given name. |
| 3725 * @param name the name of this element | 3737 * @param name the name of this element |
| 3726 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 3738 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 3727 * declaration of this element | 3739 * declaration of this element |
| 3728 */ | 3740 */ |
| 3729 VariableElementImpl.con2(String name, int nameOffset) : super.con2(name, nameO
ffset) { | 3741 VariableElementImpl.con2(String name, int nameOffset) : super.con2(name, nameO
ffset) { |
| 3730 _jtd_constructor_210_impl(name, nameOffset); | 3742 _jtd_constructor_214_impl(name, nameOffset); |
| 3731 } | 3743 } |
| 3732 _jtd_constructor_210_impl(String name, int nameOffset) { | 3744 _jtd_constructor_214_impl(String name, int nameOffset) { |
| 3733 } | 3745 } |
| 3734 /** | 3746 /** |
| 3735 * Return the result of evaluating this variable's initializer as a compile-ti
me constant | 3747 * Return the result of evaluating this variable's initializer as a compile-ti
me constant |
| 3736 * expression, or {@code null} if this variable is not a 'const' variable or d
oes not have an | 3748 * expression, or {@code null} if this variable is not a 'const' variable or d
oes not have an |
| 3737 * initializer. | 3749 * initializer. |
| 3738 * @return the result of evaluating this variable's initializer | 3750 * @return the result of evaluating this variable's initializer |
| 3739 */ | 3751 */ |
| 3740 EvaluationResultImpl get evaluationResult => null; | 3752 EvaluationResultImpl get evaluationResult => null; |
| 3741 FunctionElement get initializer => _initializer; | 3753 FunctionElement get initializer => _initializer; |
| 3742 Type2 get type => _type; | 3754 Type2 get type => _type; |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3915 /** | 3927 /** |
| 3916 * The type of object returned by this type of function. | 3928 * The type of object returned by this type of function. |
| 3917 */ | 3929 */ |
| 3918 Type2 _returnType = VoidTypeImpl.instance; | 3930 Type2 _returnType = VoidTypeImpl.instance; |
| 3919 /** | 3931 /** |
| 3920 * Initialize a newly created function type to be declared by the given elemen
t and to have the | 3932 * Initialize a newly created function type to be declared by the given elemen
t and to have the |
| 3921 * given name. | 3933 * given name. |
| 3922 * @param element the element representing the declaration of the function typ
e | 3934 * @param element the element representing the declaration of the function typ
e |
| 3923 */ | 3935 */ |
| 3924 FunctionTypeImpl.con1(ExecutableElement element) : super(element, element == n
ull ? null : element.name) { | 3936 FunctionTypeImpl.con1(ExecutableElement element) : super(element, element == n
ull ? null : element.name) { |
| 3925 _jtd_constructor_261_impl(element); | 3937 _jtd_constructor_265_impl(element); |
| 3926 } | 3938 } |
| 3927 _jtd_constructor_261_impl(ExecutableElement element) { | 3939 _jtd_constructor_265_impl(ExecutableElement element) { |
| 3928 } | 3940 } |
| 3929 /** | 3941 /** |
| 3930 * Initialize a newly created function type to be declared by the given elemen
t and to have the | 3942 * Initialize a newly created function type to be declared by the given elemen
t and to have the |
| 3931 * given name. | 3943 * given name. |
| 3932 * @param element the element representing the declaration of the function typ
e | 3944 * @param element the element representing the declaration of the function typ
e |
| 3933 */ | 3945 */ |
| 3934 FunctionTypeImpl.con2(FunctionTypeAliasElement element) : super(element, eleme
nt == null ? null : element.name) { | 3946 FunctionTypeImpl.con2(FunctionTypeAliasElement element) : super(element, eleme
nt == null ? null : element.name) { |
| 3935 _jtd_constructor_262_impl(element); | 3947 _jtd_constructor_266_impl(element); |
| 3936 } | 3948 } |
| 3937 _jtd_constructor_262_impl(FunctionTypeAliasElement element) { | 3949 _jtd_constructor_266_impl(FunctionTypeAliasElement element) { |
| 3938 } | 3950 } |
| 3939 bool operator ==(Object object) { | 3951 bool operator ==(Object object) { |
| 3940 if (object is! FunctionTypeImpl) { | 3952 if (object is! FunctionTypeImpl) { |
| 3941 return false; | 3953 return false; |
| 3942 } | 3954 } |
| 3943 FunctionTypeImpl otherType = object as FunctionTypeImpl; | 3955 FunctionTypeImpl otherType = object as FunctionTypeImpl; |
| 3944 return element == otherType.element && JavaArrays.equals(_normalParameterTyp
es, otherType._normalParameterTypes) && JavaArrays.equals(_optionalParameterType
s, otherType._optionalParameterTypes) && equals2(_namedParameterTypes, otherType
._namedParameterTypes); | 3956 return element == otherType.element && JavaArrays.equals(_normalParameterTyp
es, otherType._normalParameterTypes) && JavaArrays.equals(_optionalParameterType
s, otherType._optionalParameterTypes) && equals2(_namedParameterTypes, otherType
._namedParameterTypes); |
| 3945 } | 3957 } |
| 3946 Map<String, Type2> get namedParameterTypes => _namedParameterTypes; | 3958 Map<String, Type2> get namedParameterTypes => _namedParameterTypes; |
| 3947 List<Type2> get normalParameterTypes => _normalParameterTypes; | 3959 List<Type2> get normalParameterTypes => _normalParameterTypes; |
| 3948 List<Type2> get optionalParameterTypes => _optionalParameterTypes; | 3960 List<Type2> get optionalParameterTypes => _optionalParameterTypes; |
| 3949 Type2 get returnType => _returnType; | 3961 Type2 get returnType => _returnType; |
| 3950 List<Type2> get typeArguments => _typeArguments; | 3962 List<Type2> get typeArguments => _typeArguments; |
| 3951 int get hashCode { | 3963 int get hashCode { |
| 3952 Element element40 = element; | 3964 Element element44 = element; |
| 3953 if (element40 == null) { | 3965 if (element44 == null) { |
| 3954 return 0; | 3966 return 0; |
| 3955 } | 3967 } |
| 3956 return element40.hashCode; | 3968 return element44.hashCode; |
| 3957 } | 3969 } |
| 3958 bool isSubtypeOf(Type2 type) { | 3970 bool isSubtypeOf(Type2 type) { |
| 3959 if (type == null) { | 3971 if (type == null) { |
| 3960 return false; | 3972 return false; |
| 3961 } else if (identical(this, type) || type.isDynamic() || type.isDartCoreFunct
ion()) { | 3973 } else if (identical(this, type) || type.isDynamic() || type.isDartCoreFunct
ion()) { |
| 3962 return true; | 3974 return true; |
| 3963 } else if (type is! FunctionType) { | 3975 } else if (type is! FunctionType) { |
| 3964 return false; | 3976 return false; |
| 3965 } else if (this == type) { | 3977 } else if (this == type) { |
| 3966 return true; | 3978 return true; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4057 this._typeArguments = typeArguments4; | 4069 this._typeArguments = typeArguments4; |
| 4058 } | 4070 } |
| 4059 FunctionTypeImpl substitute4(List<Type2> argumentTypes) => substitute2(argumen
tTypes, typeArguments); | 4071 FunctionTypeImpl substitute4(List<Type2> argumentTypes) => substitute2(argumen
tTypes, typeArguments); |
| 4060 FunctionTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterT
ypes) { | 4072 FunctionTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterT
ypes) { |
| 4061 if (argumentTypes.length != parameterTypes.length) { | 4073 if (argumentTypes.length != parameterTypes.length) { |
| 4062 throw new IllegalArgumentException("argumentTypes.length (${argumentTypes.
length}) != parameterTypes.length (${parameterTypes.length})"); | 4074 throw new IllegalArgumentException("argumentTypes.length (${argumentTypes.
length}) != parameterTypes.length (${parameterTypes.length})"); |
| 4063 } | 4075 } |
| 4064 if (argumentTypes.length == 0) { | 4076 if (argumentTypes.length == 0) { |
| 4065 return this; | 4077 return this; |
| 4066 } | 4078 } |
| 4067 Element element41 = element; | 4079 Element element45 = element; |
| 4068 FunctionTypeImpl newType = (element41 is ExecutableElement) ? new FunctionTy
peImpl.con1((element41 as ExecutableElement)) : new FunctionTypeImpl.con2((eleme
nt41 as FunctionTypeAliasElement)); | 4080 FunctionTypeImpl newType = (element45 is ExecutableElement) ? new FunctionTy
peImpl.con1((element45 as ExecutableElement)) : new FunctionTypeImpl.con2((eleme
nt45 as FunctionTypeAliasElement)); |
| 4069 newType.returnType = _returnType.substitute2(argumentTypes, parameterTypes); | 4081 newType.returnType = _returnType.substitute2(argumentTypes, parameterTypes); |
| 4070 newType.normalParameterTypes = TypeImpl.substitute(_normalParameterTypes, ar
gumentTypes, parameterTypes); | 4082 newType.normalParameterTypes = TypeImpl.substitute(_normalParameterTypes, ar
gumentTypes, parameterTypes); |
| 4071 newType.optionalParameterTypes = TypeImpl.substitute(_optionalParameterTypes
, argumentTypes, parameterTypes); | 4083 newType.optionalParameterTypes = TypeImpl.substitute(_optionalParameterTypes
, argumentTypes, parameterTypes); |
| 4072 newType._namedParameterTypes = substitute3(_namedParameterTypes, argumentTyp
es, parameterTypes); | 4084 newType._namedParameterTypes = substitute3(_namedParameterTypes, argumentTyp
es, parameterTypes); |
| 4073 return newType; | 4085 return newType; |
| 4074 } | 4086 } |
| 4075 void appendTo(JavaStringBuilder builder) { | 4087 void appendTo(JavaStringBuilder builder) { |
| 4076 builder.append("("); | 4088 builder.append("("); |
| 4077 bool needsComma = false; | 4089 bool needsComma = false; |
| 4078 if (_normalParameterTypes.length > 0) { | 4090 if (_normalParameterTypes.length > 0) { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4191 /** | 4203 /** |
| 4192 * Returns the set of all superinterfaces of the passed {@link Type}. This is
a recursive method, | 4204 * Returns the set of all superinterfaces of the passed {@link Type}. This is
a recursive method, |
| 4193 * callers should call the public {@link #computeSuperinterfaceSet(Type)}. | 4205 * callers should call the public {@link #computeSuperinterfaceSet(Type)}. |
| 4194 * @param type the {@link Type} to compute the set of superinterfaces of | 4206 * @param type the {@link Type} to compute the set of superinterfaces of |
| 4195 * @param set a {@link HashSet} used recursively by this method | 4207 * @param set a {@link HashSet} used recursively by this method |
| 4196 * @return the {@link Set} of superinterfaces of the passed {@link Type} | 4208 * @return the {@link Set} of superinterfaces of the passed {@link Type} |
| 4197 * @see #computeSuperinterfaceSet(Type) | 4209 * @see #computeSuperinterfaceSet(Type) |
| 4198 * @see #getLeastUpperBound(Type) | 4210 * @see #getLeastUpperBound(Type) |
| 4199 */ | 4211 */ |
| 4200 static Set<InterfaceType> computeSuperinterfaceSet2(InterfaceType type, Set<In
terfaceType> set) { | 4212 static Set<InterfaceType> computeSuperinterfaceSet2(InterfaceType type, Set<In
terfaceType> set) { |
| 4201 Element element42 = type.element; | 4213 Element element46 = type.element; |
| 4202 if (element42 != null && element42 is ClassElement) { | 4214 if (element46 != null && element46 is ClassElement) { |
| 4203 ClassElement classElement = element42 as ClassElement; | 4215 ClassElement classElement = element46 as ClassElement; |
| 4204 List<InterfaceType> superinterfaces = classElement.interfaces; | 4216 List<InterfaceType> superinterfaces = classElement.interfaces; |
| 4205 for (InterfaceType superinterface in superinterfaces) { | 4217 for (InterfaceType superinterface in superinterfaces) { |
| 4206 javaSetAdd(set, superinterface); | 4218 javaSetAdd(set, superinterface); |
| 4207 computeSuperinterfaceSet2(superinterface, set); | 4219 computeSuperinterfaceSet2(superinterface, set); |
| 4208 } | 4220 } |
| 4209 InterfaceType supertype4 = classElement.supertype; | 4221 InterfaceType supertype4 = classElement.supertype; |
| 4210 if (supertype4 != null) { | 4222 if (supertype4 != null) { |
| 4211 javaSetAdd(set, supertype4); | 4223 javaSetAdd(set, supertype4); |
| 4212 computeSuperinterfaceSet2(supertype4, set); | 4224 computeSuperinterfaceSet2(supertype4, set); |
| 4213 } | 4225 } |
| 4214 } | 4226 } |
| 4215 return set; | 4227 return set; |
| 4216 } | 4228 } |
| 4217 /** | 4229 /** |
| 4218 * An array containing the actual types of the type arguments. | 4230 * An array containing the actual types of the type arguments. |
| 4219 */ | 4231 */ |
| 4220 List<Type2> _typeArguments = TypeImpl.EMPTY_ARRAY; | 4232 List<Type2> _typeArguments = TypeImpl.EMPTY_ARRAY; |
| 4221 /** | 4233 /** |
| 4222 * Initialize a newly created type to be declared by the given element. | 4234 * Initialize a newly created type to be declared by the given element. |
| 4223 * @param element the element representing the declaration of the type | 4235 * @param element the element representing the declaration of the type |
| 4224 */ | 4236 */ |
| 4225 InterfaceTypeImpl.con1(ClassElement element) : super(element, element.name) { | 4237 InterfaceTypeImpl.con1(ClassElement element) : super(element, element.name) { |
| 4226 _jtd_constructor_263_impl(element); | 4238 _jtd_constructor_267_impl(element); |
| 4227 } | 4239 } |
| 4228 _jtd_constructor_263_impl(ClassElement element) { | 4240 _jtd_constructor_267_impl(ClassElement element) { |
| 4229 } | 4241 } |
| 4230 /** | 4242 /** |
| 4231 * Initialize a newly created type to have the given name. This constructor sh
ould only be used in | 4243 * Initialize a newly created type to have the given name. This constructor sh
ould only be used in |
| 4232 * cases where there is no declaration of the type. | 4244 * cases where there is no declaration of the type. |
| 4233 * @param name the name of the type | 4245 * @param name the name of the type |
| 4234 */ | 4246 */ |
| 4235 InterfaceTypeImpl.con2(String name) : super(null, name) { | 4247 InterfaceTypeImpl.con2(String name) : super(null, name) { |
| 4236 _jtd_constructor_264_impl(name); | 4248 _jtd_constructor_268_impl(name); |
| 4237 } | 4249 } |
| 4238 _jtd_constructor_264_impl(String name) { | 4250 _jtd_constructor_268_impl(String name) { |
| 4239 } | 4251 } |
| 4240 bool operator ==(Object object) { | 4252 bool operator ==(Object object) { |
| 4241 if (object is! InterfaceTypeImpl) { | 4253 if (object is! InterfaceTypeImpl) { |
| 4242 return false; | 4254 return false; |
| 4243 } | 4255 } |
| 4244 InterfaceTypeImpl otherType = object as InterfaceTypeImpl; | 4256 InterfaceTypeImpl otherType = object as InterfaceTypeImpl; |
| 4245 return element == otherType.element && JavaArrays.equals(_typeArguments, oth
erType._typeArguments); | 4257 return element == otherType.element && JavaArrays.equals(_typeArguments, oth
erType._typeArguments); |
| 4246 } | 4258 } |
| 4247 ClassElement get element => super.element as ClassElement; | 4259 ClassElement get element => super.element as ClassElement; |
| 4248 Type2 getLeastUpperBound(Type2 type) { | 4260 Type2 getLeastUpperBound(Type2 type) { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4284 } | 4296 } |
| 4285 } | 4297 } |
| 4286 return null; | 4298 return null; |
| 4287 } | 4299 } |
| 4288 Type2 get superclass { | 4300 Type2 get superclass { |
| 4289 ClassElement classElement = element; | 4301 ClassElement classElement = element; |
| 4290 return element.supertype.substitute2(_typeArguments, TypeVariableTypeImpl.ge
tTypes(classElement.typeVariables)); | 4302 return element.supertype.substitute2(_typeArguments, TypeVariableTypeImpl.ge
tTypes(classElement.typeVariables)); |
| 4291 } | 4303 } |
| 4292 List<Type2> get typeArguments => _typeArguments; | 4304 List<Type2> get typeArguments => _typeArguments; |
| 4293 int get hashCode { | 4305 int get hashCode { |
| 4294 ClassElement element43 = element; | 4306 ClassElement element47 = element; |
| 4295 if (element43 == null) { | 4307 if (element47 == null) { |
| 4296 return 0; | 4308 return 0; |
| 4297 } | 4309 } |
| 4298 return element43.hashCode; | 4310 return element47.hashCode; |
| 4299 } | 4311 } |
| 4300 bool isDartCoreFunction() { | 4312 bool isDartCoreFunction() { |
| 4301 ClassElement element44 = element; | 4313 ClassElement element48 = element; |
| 4302 if (element44 == null) { | 4314 if (element48 == null) { |
| 4303 return false; | 4315 return false; |
| 4304 } | 4316 } |
| 4305 return element44.name == "Function" && element44.library.isDartCore(); | 4317 return element48.name == "Function" && element48.library.isDartCore(); |
| 4306 } | 4318 } |
| 4307 bool isDirectSupertypeOf(InterfaceType type) { | 4319 bool isDirectSupertypeOf(InterfaceType type) { |
| 4308 ClassElement i = element; | 4320 ClassElement i = element; |
| 4309 ClassElement j = type.element; | 4321 ClassElement j = type.element; |
| 4310 InterfaceType supertype5 = j.supertype; | 4322 InterfaceType supertype5 = j.supertype; |
| 4311 if (supertype5 == null) { | 4323 if (supertype5 == null) { |
| 4312 return false; | 4324 return false; |
| 4313 } | 4325 } |
| 4314 ClassElement supertypeElement = supertype5.element; | 4326 ClassElement supertypeElement = supertype5.element; |
| 4315 if (supertypeElement == i) { | 4327 if (supertypeElement == i) { |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4895 abstract class TypeVariableType implements Type2 { | 4907 abstract class TypeVariableType implements Type2 { |
| 4896 TypeVariableElement get element; | 4908 TypeVariableElement get element; |
| 4897 } | 4909 } |
| 4898 /** | 4910 /** |
| 4899 * The interface {@code VoidType} defines the behavior of the unique object repr
esenting the type{@code void}. | 4911 * The interface {@code VoidType} defines the behavior of the unique object repr
esenting the type{@code void}. |
| 4900 * @coverage dart.engine.type | 4912 * @coverage dart.engine.type |
| 4901 */ | 4913 */ |
| 4902 abstract class VoidType implements Type2 { | 4914 abstract class VoidType implements Type2 { |
| 4903 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); | 4915 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); |
| 4904 } | 4916 } |
| OLD | NEW |