OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
7 | 7 |
8 library engine.element; | 8 library engine.element; |
9 | 9 |
10 import 'dart:collection'; | 10 import 'dart:collection'; |
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 | 1136 |
1137 /** | 1137 /** |
1138 * An array containing all of the fields contained in this class. | 1138 * An array containing all of the fields contained in this class. |
1139 */ | 1139 */ |
1140 List<FieldElement> _fields = FieldElementImpl.EMPTY_ARRAY; | 1140 List<FieldElement> _fields = FieldElementImpl.EMPTY_ARRAY; |
1141 | 1141 |
1142 /** | 1142 /** |
1143 * An array containing all of the mixins that are applied to the class being e
xtended in order to | 1143 * An array containing all of the mixins that are applied to the class being e
xtended in order to |
1144 * derive the superclass of this class. | 1144 * derive the superclass of this class. |
1145 */ | 1145 */ |
1146 List<InterfaceType> mixins = InterfaceTypeImpl.EMPTY_ARRAY; | 1146 List<InterfaceType> mixins = InterfaceType.EMPTY_ARRAY; |
1147 | 1147 |
1148 /** | 1148 /** |
1149 * An array containing all of the interfaces that are implemented by this clas
s. | 1149 * An array containing all of the interfaces that are implemented by this clas
s. |
1150 */ | 1150 */ |
1151 List<InterfaceType> interfaces = InterfaceTypeImpl.EMPTY_ARRAY; | 1151 List<InterfaceType> interfaces = InterfaceType.EMPTY_ARRAY; |
1152 | 1152 |
1153 /** | 1153 /** |
1154 * An array containing all of the methods contained in this class. | 1154 * An array containing all of the methods contained in this class. |
1155 */ | 1155 */ |
1156 List<MethodElement> _methods = MethodElementImpl.EMPTY_ARRAY; | 1156 List<MethodElement> _methods = MethodElementImpl.EMPTY_ARRAY; |
1157 | 1157 |
1158 /** | 1158 /** |
1159 * The superclass of the class, or `null` if the class does not have an explic
it superclass. | 1159 * The superclass of the class, or `null` if the class does not have an explic
it superclass. |
1160 */ | 1160 */ |
1161 InterfaceType supertype; | 1161 InterfaceType supertype; |
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2150 * | 2150 * |
2151 * This method is expensive, because resolved AST might be evicted from cache,
so parsing and | 2151 * This method is expensive, because resolved AST might be evicted from cache,
so parsing and |
2152 * resolving will be performed. | 2152 * resolving will be performed. |
2153 * | 2153 * |
2154 * @return the resolved [ConstructorDeclaration], not `null`. | 2154 * @return the resolved [ConstructorDeclaration], not `null`. |
2155 */ | 2155 */ |
2156 @override | 2156 @override |
2157 ConstructorDeclaration get node; | 2157 ConstructorDeclaration get node; |
2158 | 2158 |
2159 /** | 2159 /** |
2160 * Return the constructor to which this constructor is redirecting, or `null`
if this constructor | 2160 * Return the constructor to which this constructor is redirecting, or `null`
if this |
2161 * does not redirect to another constructor or if the library containing this
constructor has | 2161 * constructor does not redirect to another constructor or if the library cont
aining this |
2162 * not yet been resolved. | 2162 * constructor has not yet been resolved. |
2163 * | 2163 * |
2164 * @return the constructor to which this constructor is redirecting | 2164 * @return the constructor to which this constructor is redirecting |
2165 */ | 2165 */ |
2166 ConstructorElement get redirectedConstructor; | 2166 ConstructorElement get redirectedConstructor; |
2167 | 2167 |
2168 /** | 2168 /** |
2169 * Return `true` if this constructor is a const constructor. | 2169 * Return `true` if this constructor is a const constructor. |
2170 * | 2170 * |
2171 * @return `true` if this constructor is a const constructor | 2171 * @return `true` if this constructor is a const constructor |
2172 */ | 2172 */ |
(...skipping 23 matching lines...) Expand all Loading... |
2196 * An empty array of constructor elements. | 2196 * An empty array of constructor elements. |
2197 */ | 2197 */ |
2198 static List<ConstructorElement> EMPTY_ARRAY = new List<ConstructorElement>(0); | 2198 static List<ConstructorElement> EMPTY_ARRAY = new List<ConstructorElement>(0); |
2199 | 2199 |
2200 /** | 2200 /** |
2201 * The constructor to which this constructor is redirecting. | 2201 * The constructor to which this constructor is redirecting. |
2202 */ | 2202 */ |
2203 ConstructorElement redirectedConstructor; | 2203 ConstructorElement redirectedConstructor; |
2204 | 2204 |
2205 /** | 2205 /** |
| 2206 * The initializers for this constructor (used for evaluating constant instanc
e creation |
| 2207 * expressions). |
| 2208 */ |
| 2209 List<ConstructorInitializer> constantInitializers; |
| 2210 |
| 2211 /** |
2206 * Initialize a newly created constructor element to have the given name. | 2212 * Initialize a newly created constructor element to have the given name. |
2207 * | 2213 * |
2208 * @param name the name of this element | 2214 * @param name the name of this element |
2209 */ | 2215 */ |
2210 ConstructorElementImpl.forNode(Identifier name) : super.forNode(name); | 2216 ConstructorElementImpl.forNode(Identifier name) : super.forNode(name); |
2211 | 2217 |
2212 /** | 2218 /** |
2213 * Initialize a newly created constructor element to have the given name. | 2219 * Initialize a newly created constructor element to have the given name. |
2214 * | 2220 * |
2215 * @param name the name of this element | 2221 * @param name the name of this element |
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3627 } else { | 3633 } else { |
3628 components.add(builder.toString()); | 3634 components.add(builder.toString()); |
3629 builder.length = 0; | 3635 builder.length = 0; |
3630 index++; | 3636 index++; |
3631 } | 3637 } |
3632 } else { | 3638 } else { |
3633 builder.appendChar(currentChar); | 3639 builder.appendChar(currentChar); |
3634 index++; | 3640 index++; |
3635 } | 3641 } |
3636 } | 3642 } |
3637 if (builder.length > 0) { | 3643 components.add(builder.toString()); |
3638 components.add(builder.toString()); | |
3639 } | |
3640 return new List.from(components); | 3644 return new List.from(components); |
3641 } | 3645 } |
3642 | 3646 |
3643 /** | 3647 /** |
3644 * Append an encoded form of the given component to the given builder. | 3648 * Append an encoded form of the given component to the given builder. |
3645 * | 3649 * |
3646 * @param builder the builder to which the encoded component is to be appended | 3650 * @param builder the builder to which the encoded component is to be appended |
3647 * @param component the component to be appended to the builder | 3651 * @param component the component to be appended to the builder |
3648 */ | 3652 */ |
3649 void _encode(JavaStringBuilder builder, String component) { | 3653 void _encode(JavaStringBuilder builder, String component) { |
(...skipping 2423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6073 @override | 6077 @override |
6074 String get identifier => "${(importedLibrary as LibraryElementImpl).identifier
}@${nameOffset}"; | 6078 String get identifier => "${(importedLibrary as LibraryElementImpl).identifier
}@${nameOffset}"; |
6075 } | 6079 } |
6076 | 6080 |
6077 /** | 6081 /** |
6078 * The interface `InterfaceType` defines the behavior common to objects represen
ting the type | 6082 * The interface `InterfaceType` defines the behavior common to objects represen
ting the type |
6079 * introduced by either a class or an interface, or a reference to such a type. | 6083 * introduced by either a class or an interface, or a reference to such a type. |
6080 */ | 6084 */ |
6081 abstract class InterfaceType implements ParameterizedType { | 6085 abstract class InterfaceType implements ParameterizedType { |
6082 /** | 6086 /** |
| 6087 * An empty array of types. |
| 6088 */ |
| 6089 static final List<InterfaceType> EMPTY_ARRAY = new List<InterfaceType>(0); |
| 6090 |
| 6091 /** |
6083 * Return an array containing all of the accessors (getters and setters) decla
red in this type. | 6092 * Return an array containing all of the accessors (getters and setters) decla
red in this type. |
6084 * | 6093 * |
6085 * @return the accessors declared in this type | 6094 * @return the accessors declared in this type |
6086 */ | 6095 */ |
6087 List<PropertyAccessorElement> get accessors; | 6096 List<PropertyAccessorElement> get accessors; |
6088 | 6097 |
6089 @override | 6098 @override |
6090 ClassElement get element; | 6099 ClassElement get element; |
6091 | 6100 |
6092 /** | 6101 /** |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6365 InterfaceType substitute2(List<DartType> argumentTypes, List<DartType> paramet
erTypes); | 6374 InterfaceType substitute2(List<DartType> argumentTypes, List<DartType> paramet
erTypes); |
6366 } | 6375 } |
6367 | 6376 |
6368 /** | 6377 /** |
6369 * Instances of the class `InterfaceTypeImpl` defines the behavior common to obj
ects | 6378 * Instances of the class `InterfaceTypeImpl` defines the behavior common to obj
ects |
6370 * representing the type introduced by either a class or an interface, or a refe
rence to such a | 6379 * representing the type introduced by either a class or an interface, or a refe
rence to such a |
6371 * type. | 6380 * type. |
6372 */ | 6381 */ |
6373 class InterfaceTypeImpl extends TypeImpl implements InterfaceType { | 6382 class InterfaceTypeImpl extends TypeImpl implements InterfaceType { |
6374 /** | 6383 /** |
6375 * An empty array of types. | |
6376 */ | |
6377 static List<InterfaceType> EMPTY_ARRAY = new List<InterfaceType>(0); | |
6378 | |
6379 /** | |
6380 * This method computes the longest inheritance path from some passed [Type] t
o Object. | 6384 * This method computes the longest inheritance path from some passed [Type] t
o Object. |
6381 * | 6385 * |
6382 * @param type the [Type] to compute the longest inheritance path of from the
passed | 6386 * @param type the [Type] to compute the longest inheritance path of from the
passed |
6383 * [Type] to Object | 6387 * [Type] to Object |
6384 * @return the computed longest inheritance path to Object | 6388 * @return the computed longest inheritance path to Object |
6385 * @see InterfaceType#getLeastUpperBound(Type) | 6389 * @see InterfaceType#getLeastUpperBound(Type) |
6386 */ | 6390 */ |
6387 static int computeLongestInheritancePathToObject(InterfaceType type) => _compu
teLongestInheritancePathToObject(type, 0, new Set<ClassElement>()); | 6391 static int computeLongestInheritancePathToObject(InterfaceType type) => _compu
teLongestInheritancePathToObject(type, 0, new Set<ClassElement>()); |
6388 | 6392 |
6389 /** | 6393 /** |
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7755 AnalysisEngine.instance.logger.logError("Could not build the element mod
el for dart:async"); | 7759 AnalysisEngine.instance.logger.logError("Could not build the element mod
el for dart:async"); |
7756 return VoidTypeImpl.instance; | 7760 return VoidTypeImpl.instance; |
7757 } | 7761 } |
7758 ClassElement futureElement = asyncElement.getType("Future"); | 7762 ClassElement futureElement = asyncElement.getType("Future"); |
7759 if (futureElement == null) { | 7763 if (futureElement == null) { |
7760 AnalysisEngine.instance.logger.logError("Could not find type Future in d
art:async"); | 7764 AnalysisEngine.instance.logger.logError("Could not find type Future in d
art:async"); |
7761 return VoidTypeImpl.instance; | 7765 return VoidTypeImpl.instance; |
7762 } | 7766 } |
7763 InterfaceType futureType = futureElement.type; | 7767 InterfaceType futureType = futureElement.type; |
7764 return futureType.substitute4(<DartType> [DynamicTypeImpl.instance]); | 7768 return futureType.substitute4(<DartType> [DynamicTypeImpl.instance]); |
7765 } on AnalysisException catch (exception) { | 7769 } on AnalysisException catch (exception, stackTrace) { |
7766 AnalysisEngine.instance.logger.logError2("Could not build the element mode
l for dart:async", exception); | 7770 AnalysisEngine.instance.logger.logError2("Could not build the element mode
l for dart:async", new CaughtException(exception, stackTrace)); |
7767 return VoidTypeImpl.instance; | 7771 return VoidTypeImpl.instance; |
7768 } | 7772 } |
7769 } | 7773 } |
7770 | 7774 |
7771 /** | 7775 /** |
7772 * Answer `true` if the receiver directly or indirectly imports the dart:html
libraries. | 7776 * Answer `true` if the receiver directly or indirectly imports the dart:html
libraries. |
7773 * | 7777 * |
7774 * @return `true` if the receiver directly or indirectly imports the dart:html
libraries | 7778 * @return `true` if the receiver directly or indirectly imports the dart:html
libraries |
7775 */ | 7779 */ |
7776 bool get isOrImportsBrowserLibrary { | 7780 bool get isOrImportsBrowserLibrary { |
(...skipping 3168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10945 | 10949 |
10946 @override | 10950 @override |
10947 bool internalEquals(Object object, Set<ElementPair> visitedElementPairs) => id
entical(object, this); | 10951 bool internalEquals(Object object, Set<ElementPair> visitedElementPairs) => id
entical(object, this); |
10948 | 10952 |
10949 @override | 10953 @override |
10950 bool internalIsMoreSpecificThan(DartType type, bool withDynamic, Set<TypeImpl_
TypePair> visitedTypePairs) => isSubtypeOf(type); | 10954 bool internalIsMoreSpecificThan(DartType type, bool withDynamic, Set<TypeImpl_
TypePair> visitedTypePairs) => isSubtypeOf(type); |
10951 | 10955 |
10952 @override | 10956 @override |
10953 bool internalIsSubtypeOf(DartType type, Set<TypeImpl_TypePair> visitedTypePair
s) => identical(type, this) || identical(type, DynamicTypeImpl.instance); | 10957 bool internalIsSubtypeOf(DartType type, Set<TypeImpl_TypePair> visitedTypePair
s) => identical(type, this) || identical(type, DynamicTypeImpl.instance); |
10954 } | 10958 } |
OLD | NEW |