Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: pkg/analyzer/lib/src/generated/element.dart

Issue 351283003: Move Tokenfactory, AstFactory and ElementFactory from tests to the testing/ Folder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 /** 1256 /**
1257 * An empty array of class elements. 1257 * An empty array of class elements.
1258 */ 1258 */
1259 static List<ClassElement> EMPTY_ARRAY = new List<ClassElement>(0); 1259 static List<ClassElement> EMPTY_ARRAY = new List<ClassElement>(0);
1260 1260
1261 /** 1261 /**
1262 * Initialize a newly created class element to have the given name. 1262 * Initialize a newly created class element to have the given name.
1263 * 1263 *
1264 * @param name the name of this element 1264 * @param name the name of this element
1265 */ 1265 */
1266 ClassElementImpl(Identifier name) : super.forNode(name); 1266 ClassElementImpl.forNode(Identifier name) : super.forNode(name);
1267
1268 /**
1269 * Initialize a newly created class element to have the given name.
1270 *
1271 * @param name the name of this element
1272 * @param nameOffset the offset of the name of this element in the file that c ontains the
1273 * declaration of this element
1274 */
1275 ClassElementImpl(String name, int nameOffset) : super(name, nameOffset);
1267 1276
1268 @override 1277 @override
1269 accept(ElementVisitor visitor) => visitor.visitClassElement(this); 1278 accept(ElementVisitor visitor) => visitor.visitClassElement(this);
1270 1279
1271 /** 1280 /**
1272 * Set the toolkit specific information objects attached to this class. 1281 * Set the toolkit specific information objects attached to this class.
1273 * 1282 *
1274 * @param toolkitObjects the toolkit objects attached to this class 1283 * @param toolkitObjects the toolkit objects attached to this class
1275 */ 1284 */
1276 void addToolkitObjects(ToolkitObjectElement toolkitObject) { 1285 void addToolkitObjects(ToolkitObjectElement toolkitObject) {
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 /** 2218 /**
2210 * The result of evaluating this variable's initializer. 2219 * The result of evaluating this variable's initializer.
2211 */ 2220 */
2212 EvaluationResultImpl _result; 2221 EvaluationResultImpl _result;
2213 2222
2214 /** 2223 /**
2215 * Initialize a newly created field element to have the given name. 2224 * Initialize a newly created field element to have the given name.
2216 * 2225 *
2217 * @param name the name of this element 2226 * @param name the name of this element
2218 */ 2227 */
2219 ConstFieldElementImpl(Identifier name) : super.con1(name); 2228 ConstFieldElementImpl(Identifier name) : super.forNode(name);
2220 2229
2221 @override 2230 @override
2222 EvaluationResultImpl get evaluationResult => _result; 2231 EvaluationResultImpl get evaluationResult => _result;
2223 2232
2224 @override 2233 @override
2225 void set evaluationResult(EvaluationResultImpl result) { 2234 void set evaluationResult(EvaluationResultImpl result) {
2226 this._result = result; 2235 this._result = result;
2227 } 2236 }
2228 } 2237 }
2229 2238
2230 /** 2239 /**
2231 * Instances of the class `ConstLocalVariableElementImpl` implement a 2240 * Instances of the class `ConstLocalVariableElementImpl` implement a
2232 * `LocalVariableElement` for a local 'const' variable that has an initializer. 2241 * `LocalVariableElement` for a local 'const' variable that has an initializer.
2233 */ 2242 */
2234 class ConstLocalVariableElementImpl extends LocalVariableElementImpl { 2243 class ConstLocalVariableElementImpl extends LocalVariableElementImpl {
2235 /** 2244 /**
2236 * The result of evaluating this variable's initializer. 2245 * The result of evaluating this variable's initializer.
2237 */ 2246 */
2238 EvaluationResultImpl _result; 2247 EvaluationResultImpl _result;
2239 2248
2240 /** 2249 /**
2241 * Initialize a newly created local variable element to have the given name. 2250 * Initialize a newly created local variable element to have the given name.
2242 * 2251 *
2243 * @param name the name of this element 2252 * @param name the name of this element
2244 */ 2253 */
2245 ConstLocalVariableElementImpl(Identifier name) : super(name); 2254 ConstLocalVariableElementImpl(Identifier name) : super.forNode(name);
2246 2255
2247 @override 2256 @override
2248 EvaluationResultImpl get evaluationResult => _result; 2257 EvaluationResultImpl get evaluationResult => _result;
2249 2258
2250 @override 2259 @override
2251 void set evaluationResult(EvaluationResultImpl result) { 2260 void set evaluationResult(EvaluationResultImpl result) {
2252 this._result = result; 2261 this._result = result;
2253 } 2262 }
2254 } 2263 }
2255 2264
2256 /** 2265 /**
2257 * Instances of the class `ConstTopLevelVariableElementImpl` implement a 2266 * Instances of the class `ConstTopLevelVariableElementImpl` implement a
2258 * `TopLevelVariableElement` for a top-level 'const' variable that has an initia lizer. 2267 * `TopLevelVariableElement` for a top-level 'const' variable that has an initia lizer.
2259 */ 2268 */
2260 class ConstTopLevelVariableElementImpl extends TopLevelVariableElementImpl { 2269 class ConstTopLevelVariableElementImpl extends TopLevelVariableElementImpl {
2261 /** 2270 /**
2262 * The result of evaluating this variable's initializer. 2271 * The result of evaluating this variable's initializer.
2263 */ 2272 */
2264 EvaluationResultImpl _result; 2273 EvaluationResultImpl _result;
2265 2274
2266 /** 2275 /**
2267 * Initialize a newly created top-level variable element to have the given nam e. 2276 * Initialize a newly created top-level variable element to have the given nam e.
2268 * 2277 *
2269 * @param name the name of this element 2278 * @param name the name of this element
2270 */ 2279 */
2271 ConstTopLevelVariableElementImpl(Identifier name) : super.con1(name); 2280 ConstTopLevelVariableElementImpl(Identifier name) : super.forNode(name);
2272 2281
2273 @override 2282 @override
2274 EvaluationResultImpl get evaluationResult => _result; 2283 EvaluationResultImpl get evaluationResult => _result;
2275 2284
2276 @override 2285 @override
2277 void set evaluationResult(EvaluationResultImpl result) { 2286 void set evaluationResult(EvaluationResultImpl result) {
2278 this._result = result; 2287 this._result = result;
2279 } 2288 }
2280 } 2289 }
2281 2290
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
2693 /** 2702 /**
2694 * The result of evaluating this variable's initializer. 2703 * The result of evaluating this variable's initializer.
2695 */ 2704 */
2696 EvaluationResultImpl _result; 2705 EvaluationResultImpl _result;
2697 2706
2698 /** 2707 /**
2699 * Initialize a newly created parameter element to have the given name. 2708 * Initialize a newly created parameter element to have the given name.
2700 * 2709 *
2701 * @param name the name of this element 2710 * @param name the name of this element
2702 */ 2711 */
2703 DefaultParameterElementImpl(Identifier name) : super.con1(name); 2712 DefaultParameterElementImpl(Identifier name) : super.forNode(name);
2704 2713
2705 @override 2714 @override
2706 EvaluationResultImpl get evaluationResult => _result; 2715 EvaluationResultImpl get evaluationResult => _result;
2707 2716
2708 @override 2717 @override
2709 void set evaluationResult(EvaluationResultImpl result) { 2718 void set evaluationResult(EvaluationResultImpl result) {
2710 this._result = result; 2719 this._result = result;
2711 } 2720 }
2712 } 2721 }
2713 2722
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2889 * model. 2898 * model.
2890 * 2899 *
2891 * @return the element that encloses this element 2900 * @return the element that encloses this element
2892 */ 2901 */
2893 Element get enclosingElement; 2902 Element get enclosingElement;
2894 2903
2895 /** 2904 /**
2896 * Return a display name for the given element that includes the path to the c ompilation unit in 2905 * Return a display name for the given element that includes the path to the c ompilation unit in
2897 * which the type is defined. 2906 * which the type is defined.
2898 * 2907 *
2899 * @param type the type for which an extended display name is to be returned 2908 * @param shortName the short display name. If null, [getDisplayName] is used.
2900 * @return a display name that can help distinguish between two types with the same name 2909 * @return a display name that can help distinguish between two types with the same name
2901 */ 2910 */
2902 String get extendedDisplayName; 2911 String getExtendedDisplayName(String shortName);
2903 2912
2904 /** 2913 /**
2905 * Return the kind of element that this is. 2914 * Return the kind of element that this is.
2906 * 2915 *
2907 * @return the kind of this element 2916 * @return the kind of this element
2908 */ 2917 */
2909 ElementKind get kind; 2918 ElementKind get kind;
2910 2919
2911 /** 2920 /**
2912 * Return the library that contains this element. This will be the element its elf if it is a 2921 * Return the library that contains this element. This will be the element its elf if it is a
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
3272 return _enclosingElement.context; 3281 return _enclosingElement.context;
3273 } 3282 }
3274 3283
3275 @override 3284 @override
3276 String get displayName => _name; 3285 String get displayName => _name;
3277 3286
3278 @override 3287 @override
3279 Element get enclosingElement => _enclosingElement; 3288 Element get enclosingElement => _enclosingElement;
3280 3289
3281 @override 3290 @override
3282 String get extendedDisplayName { 3291 String getExtendedDisplayName(String shortName) {
3283 String displayName = this.displayName; 3292 if (shortName == null) {
3293 shortName = displayName;
3294 }
3284 Source source = this.source; 3295 Source source = this.source;
3285 if (source != null) { 3296 if (source != null) {
3286 return "${displayName} (${source.fullName})"; 3297 return "${shortName} (${source.fullName})";
3287 } 3298 }
3288 return displayName; 3299 return shortName;
3289 } 3300 }
3290 3301
3291 @override 3302 @override
3292 LibraryElement get library => getAncestor((element) => element is LibraryEleme nt); 3303 LibraryElement get library => getAncestor((element) => element is LibraryEleme nt);
3293 3304
3294 @override 3305 @override
3295 ElementLocation get location => new ElementLocationImpl.con1(this); 3306 ElementLocation get location => new ElementLocationImpl.con1(this);
3296 3307
3297 @override 3308 @override
3298 String get name => _name; 3309 String get name => _name;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
3364 return Identifier.isPrivateName(name); 3375 return Identifier.isPrivateName(name);
3365 } 3376 }
3366 3377
3367 @override 3378 @override
3368 bool get isPublic => !isPrivate; 3379 bool get isPublic => !isPrivate;
3369 3380
3370 @override 3381 @override
3371 bool get isSynthetic => hasModifier(Modifier.SYNTHETIC); 3382 bool get isSynthetic => hasModifier(Modifier.SYNTHETIC);
3372 3383
3373 /** 3384 /**
3385 * Set the enclosing element of this element to the given element.
3386 *
3387 * @param element the enclosing element of this element
3388 */
3389 void set enclosingElement(Element element) {
3390 _enclosingElement = element as ElementImpl;
3391 }
3392
3393 /**
3374 * Set whether this element is synthetic to correspond to the given value. 3394 * Set whether this element is synthetic to correspond to the given value.
3375 * 3395 *
3376 * @param isSynthetic `true` if the element is synthetic 3396 * @param isSynthetic `true` if the element is synthetic
3377 */ 3397 */
3378 void set synthetic(bool isSynthetic) { 3398 void set synthetic(bool isSynthetic) {
3379 setModifier(Modifier.SYNTHETIC, isSynthetic); 3399 setModifier(Modifier.SYNTHETIC, isSynthetic);
3380 } 3400 }
3381 3401
3382 @override 3402 @override
3383 String toString() { 3403 String toString() {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
3466 */ 3486 */
3467 void safelyVisitChildren(List<Element> children, ElementVisitor visitor) { 3487 void safelyVisitChildren(List<Element> children, ElementVisitor visitor) {
3468 if (children != null) { 3488 if (children != null) {
3469 for (Element child in children) { 3489 for (Element child in children) {
3470 child.accept(visitor); 3490 child.accept(visitor);
3471 } 3491 }
3472 } 3492 }
3473 } 3493 }
3474 3494
3475 /** 3495 /**
3476 * Set the enclosing element of this element to the given element.
3477 *
3478 * @param element the enclosing element of this element
3479 */
3480 void set enclosingElement(Element element) {
3481 _enclosingElement = element as ElementImpl;
3482 }
3483
3484 /**
3485 * Set whether the given modifier is associated with this element to correspon d to the given 3496 * Set whether the given modifier is associated with this element to correspon d to the given
3486 * value. 3497 * value.
3487 * 3498 *
3488 * @param modifier the modifier to be set 3499 * @param modifier the modifier to be set
3489 * @param value `true` if the modifier is to be associated with this element 3500 * @param value `true` if the modifier is to be associated with this element
3490 */ 3501 */
3491 void setModifier(Modifier modifier, bool value) { 3502 void setModifier(Modifier modifier, bool value) {
3492 _modifiers = BooleanArray.setEnum(_modifiers, modifier, value); 3503 _modifiers = BooleanArray.setEnum(_modifiers, modifier, value);
3493 } 3504 }
3494 } 3505 }
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
4484 /** 4495 /**
4485 * An empty array of field elements. 4496 * An empty array of field elements.
4486 */ 4497 */
4487 static List<FieldElement> EMPTY_ARRAY = new List<FieldElement>(0); 4498 static List<FieldElement> EMPTY_ARRAY = new List<FieldElement>(0);
4488 4499
4489 /** 4500 /**
4490 * Initialize a newly created field element to have the given name. 4501 * Initialize a newly created field element to have the given name.
4491 * 4502 *
4492 * @param name the name of this element 4503 * @param name the name of this element
4493 */ 4504 */
4494 FieldElementImpl.con1(Identifier name) : super.con1(name); 4505 FieldElementImpl.forNode(Identifier name) : super.forNode(name);
4495 4506
4496 /** 4507 /**
4497 * Initialize a newly created synthetic field element to have the given name. 4508 * Initialize a newly created synthetic field element to have the given name.
4498 * 4509 *
4499 * @param name the name of this element 4510 * @param name the name of this element
4511 * @param nameOffset the offset of the name of this element in the file that c ontains the
4512 * declaration of this element
4500 */ 4513 */
4501 FieldElementImpl.con2(String name) : super.con2(name); 4514 FieldElementImpl(String name, int nameOffset) : super(name, nameOffset);
4502 4515
4503 @override 4516 @override
4504 accept(ElementVisitor visitor) => visitor.visitFieldElement(this); 4517 accept(ElementVisitor visitor) => visitor.visitFieldElement(this);
4505 4518
4506 @override 4519 @override
4507 ClassElement get enclosingElement => super.enclosingElement as ClassElement; 4520 ClassElement get enclosingElement => super.enclosingElement as ClassElement;
4508 4521
4509 @override 4522 @override
4510 ElementKind get kind => ElementKind.FIELD; 4523 ElementKind get kind => ElementKind.FIELD;
4511 4524
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
4545 /** 4558 /**
4546 * The field associated with this field formal parameter. 4559 * The field associated with this field formal parameter.
4547 */ 4560 */
4548 FieldElement field; 4561 FieldElement field;
4549 4562
4550 /** 4563 /**
4551 * Initialize a newly created parameter element to have the given name. 4564 * Initialize a newly created parameter element to have the given name.
4552 * 4565 *
4553 * @param name the name of this element 4566 * @param name the name of this element
4554 */ 4567 */
4555 FieldFormalParameterElementImpl(Identifier name) : super.con1(name); 4568 FieldFormalParameterElementImpl(Identifier name) : super.forNode(name);
4556 4569
4557 @override 4570 @override
4558 accept(ElementVisitor visitor) => visitor.visitFieldFormalParameterElement(thi s); 4571 accept(ElementVisitor visitor) => visitor.visitFieldFormalParameterElement(thi s);
4559 4572
4560 @override 4573 @override
4561 bool get isInitializingFormal => true; 4574 bool get isInitializingFormal => true;
4562 } 4575 }
4563 4576
4564 /** 4577 /**
4565 * Instances of the class `FieldFormalParameterMember` represent a parameter ele ment defined 4578 * Instances of the class `FieldFormalParameterMember` represent a parameter ele ment defined
(...skipping 3044 matching lines...) Expand 10 before | Expand all | Expand 10 after
7610 * library, or `null` if the element has not yet been created. 7623 * library, or `null` if the element has not yet been created.
7611 */ 7624 */
7612 FunctionElement _loadLibraryFunction; 7625 FunctionElement _loadLibraryFunction;
7613 7626
7614 /** 7627 /**
7615 * Initialize a newly created library element to have the given name. 7628 * Initialize a newly created library element to have the given name.
7616 * 7629 *
7617 * @param context the analysis context in which the library is defined 7630 * @param context the analysis context in which the library is defined
7618 * @param name the name of this element 7631 * @param name the name of this element
7619 */ 7632 */
7620 LibraryElementImpl(this.context, LibraryIdentifier name) : super.forNode(name) ; 7633 LibraryElementImpl.forNode(this.context, LibraryIdentifier name) : super.forNo de(name);
7634
7635 /**
7636 * Initialize a newly created library element to have the given name.
7637 *
7638 * @param context the analysis context in which the library is defined
7639 * @param name the name of this element
7640 * @param nameOffset the offset of the name of this element in the file that c ontains the
7641 * declaration of this element
7642 */
7643 LibraryElementImpl(this.context, String name, int nameOffset) : super(name, na meOffset);
7621 7644
7622 @override 7645 @override
7623 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this); 7646 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this);
7624 7647
7625 @override 7648 @override
7626 bool operator ==(Object object) => object != null && runtimeType == object.run timeType && _definingCompilationUnit == (object as LibraryElementImpl).definingC ompilationUnit; 7649 bool operator ==(Object object) => object != null && runtimeType == object.run timeType && _definingCompilationUnit == (object as LibraryElementImpl).definingC ompilationUnit;
7627 7650
7628 @override 7651 @override
7629 ElementImpl getChild(String identifier) { 7652 ElementImpl getChild(String identifier) {
7630 if ((_definingCompilationUnit as CompilationUnitElementImpl).identifier == i dentifier) { 7653 if ((_definingCompilationUnit as CompilationUnitElementImpl).identifier == i dentifier) {
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
8022 /** 8045 /**
8023 * An empty array of field elements. 8046 * An empty array of field elements.
8024 */ 8047 */
8025 static List<LocalVariableElement> EMPTY_ARRAY = new List<LocalVariableElement> (0); 8048 static List<LocalVariableElement> EMPTY_ARRAY = new List<LocalVariableElement> (0);
8026 8049
8027 /** 8050 /**
8028 * Initialize a newly created local variable element to have the given name. 8051 * Initialize a newly created local variable element to have the given name.
8029 * 8052 *
8030 * @param name the name of this element 8053 * @param name the name of this element
8031 */ 8054 */
8032 LocalVariableElementImpl(Identifier name) : super.forNode(name); 8055 LocalVariableElementImpl.forNode(Identifier name) : super.forNode(name);
8056
8057 /**
8058 * Initialize a newly created method element to have the given name.
8059 *
8060 * @param name the name of this element
8061 * @param nameOffset the offset of the name of this element in the file that c ontains the
8062 * declaration of this element
8063 */
8064 LocalVariableElementImpl(String name, int nameOffset) : super(name, nameOffset );
8033 8065
8034 @override 8066 @override
8035 accept(ElementVisitor visitor) => visitor.visitLocalVariableElement(this); 8067 accept(ElementVisitor visitor) => visitor.visitLocalVariableElement(this);
8036 8068
8037 @override 8069 @override
8038 ElementKind get kind => ElementKind.LOCAL_VARIABLE; 8070 ElementKind get kind => ElementKind.LOCAL_VARIABLE;
8039 8071
8040 @override 8072 @override
8041 List<ToolkitObjectElement> get toolkitObjects { 8073 List<ToolkitObjectElement> get toolkitObjects {
8042 CompilationUnitElementImpl unit = getAncestor((element) => element is Compil ationUnitElementImpl); 8074 CompilationUnitElementImpl unit = getAncestor((element) => element is Compil ationUnitElementImpl);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
8147 */ 8179 */
8148 Element get baseElement => _baseElement; 8180 Element get baseElement => _baseElement;
8149 8181
8150 @override 8182 @override
8151 AnalysisContext get context => _baseElement.context; 8183 AnalysisContext get context => _baseElement.context;
8152 8184
8153 @override 8185 @override
8154 String get displayName => _baseElement.displayName; 8186 String get displayName => _baseElement.displayName;
8155 8187
8156 @override 8188 @override
8157 String get extendedDisplayName => _baseElement.extendedDisplayName; 8189 String getExtendedDisplayName(String shortName) => _baseElement.getExtendedDis playName(shortName);
8158 8190
8159 @override 8191 @override
8160 ElementKind get kind => _baseElement.kind; 8192 ElementKind get kind => _baseElement.kind;
8161 8193
8162 @override 8194 @override
8163 LibraryElement get library => _baseElement.library; 8195 LibraryElement get library => _baseElement.library;
8164 8196
8165 @override 8197 @override
8166 ElementLocation get location => _baseElement.location; 8198 ElementLocation get location => _baseElement.location;
8167 8199
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
8685 @override 8717 @override
8686 Element getAncestor(Predicate<Element> predicate) => null; 8718 Element getAncestor(Predicate<Element> predicate) => null;
8687 8719
8688 @override 8720 @override
8689 String get displayName => _name; 8721 String get displayName => _name;
8690 8722
8691 @override 8723 @override
8692 Element get enclosingElement => null; 8724 Element get enclosingElement => null;
8693 8725
8694 @override 8726 @override
8695 String get extendedDisplayName => displayName; 8727 String getExtendedDisplayName(String shortName) {
8728 if (shortName != null) {
8729 return shortName;
8730 }
8731 return displayName;
8732 }
8696 8733
8697 @override 8734 @override
8698 ElementKind get kind => ElementKind.ERROR; 8735 ElementKind get kind => ElementKind.ERROR;
8699 8736
8700 @override 8737 @override
8701 LibraryElement get library => null; 8738 LibraryElement get library => null;
8702 8739
8703 @override 8740 @override
8704 ElementLocation get location => null; 8741 ElementLocation get location => null;
8705 8742
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
8923 /** 8960 /**
8924 * An empty array of field elements. 8961 * An empty array of field elements.
8925 */ 8962 */
8926 static List<ParameterElement> EMPTY_ARRAY = new List<ParameterElement>(0); 8963 static List<ParameterElement> EMPTY_ARRAY = new List<ParameterElement>(0);
8927 8964
8928 /** 8965 /**
8929 * Initialize a newly created parameter element to have the given name. 8966 * Initialize a newly created parameter element to have the given name.
8930 * 8967 *
8931 * @param name the name of this element 8968 * @param name the name of this element
8932 */ 8969 */
8933 ParameterElementImpl.con1(Identifier name) : super.forNode(name); 8970 ParameterElementImpl.forNode(Identifier name) : super.forNode(name);
8934 8971
8935 /** 8972 /**
8936 * Initialize a newly created parameter element to have the given name. 8973 * Initialize a newly created parameter element to have the given name.
8937 * 8974 *
8938 * @param name the name of this element 8975 * @param name the name of this element
8939 * @param nameOffset the offset of the name of this element in the file that c ontains the 8976 * @param nameOffset the offset of the name of this element in the file that c ontains the
8940 * declaration of this element 8977 * declaration of this element
8941 */ 8978 */
8942 ParameterElementImpl.con2(String name, int nameOffset) : super(name, nameOffse t); 8979 ParameterElementImpl(String name, int nameOffset) : super(name, nameOffset);
8943 8980
8944 @override 8981 @override
8945 accept(ElementVisitor visitor) => visitor.visitParameterElement(this); 8982 accept(ElementVisitor visitor) => visitor.visitParameterElement(this);
8946 8983
8947 @override 8984 @override
8948 SourceRange get defaultValueRange { 8985 SourceRange get defaultValueRange {
8949 if (_defaultValueRangeLength < 0) { 8986 if (_defaultValueRangeLength < 0) {
8950 return null; 8987 return null;
8951 } 8988 }
8952 return new SourceRange(_defaultValueRangeOffset, _defaultValueRangeLength); 8989 return new SourceRange(_defaultValueRangeOffset, _defaultValueRangeLength);
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
9457 /** 9494 /**
9458 * An empty array of prefix elements. 9495 * An empty array of prefix elements.
9459 */ 9496 */
9460 static List<PrefixElement> EMPTY_ARRAY = new List<PrefixElement>(0); 9497 static List<PrefixElement> EMPTY_ARRAY = new List<PrefixElement>(0);
9461 9498
9462 /** 9499 /**
9463 * Initialize a newly created prefix element to have the given name. 9500 * Initialize a newly created prefix element to have the given name.
9464 * 9501 *
9465 * @param name the name of this element 9502 * @param name the name of this element
9466 */ 9503 */
9467 PrefixElementImpl(Identifier name) : super.forNode(name); 9504 PrefixElementImpl.forNode(Identifier name) : super.forNode(name);
9505
9506 /**
9507 * Initialize a newly created method element to have the given name.
9508 *
9509 * @param name the name of this element
9510 * @param nameOffset the offset of the name of this element in the file that c ontains the
9511 * declaration of this element
9512 */
9513 PrefixElementImpl(String name, int nameOffset) : super(name, nameOffset);
9468 9514
9469 @override 9515 @override
9470 accept(ElementVisitor visitor) => visitor.visitPrefixElement(this); 9516 accept(ElementVisitor visitor) => visitor.visitPrefixElement(this);
9471 9517
9472 @override 9518 @override
9473 LibraryElement get enclosingElement => super.enclosingElement as LibraryElemen t; 9519 LibraryElement get enclosingElement => super.enclosingElement as LibraryElemen t;
9474 9520
9475 @override 9521 @override
9476 List<LibraryElement> get importedLibraries => _importedLibraries; 9522 List<LibraryElement> get importedLibraries => _importedLibraries;
9477 9523
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
9584 * @param name the name of this element 9630 * @param name the name of this element
9585 */ 9631 */
9586 PropertyAccessorElementImpl.forNode(Identifier name) : super.forNode(name); 9632 PropertyAccessorElementImpl.forNode(Identifier name) : super.forNode(name);
9587 9633
9588 /** 9634 /**
9589 * Initialize a newly created synthetic property accessor element to be associ ated with the given 9635 * Initialize a newly created synthetic property accessor element to be associ ated with the given
9590 * variable. 9636 * variable.
9591 * 9637 *
9592 * @param variable the variable with which this access is associated 9638 * @param variable the variable with which this access is associated
9593 */ 9639 */
9594 PropertyAccessorElementImpl(PropertyInducingElementImpl variable) : super(vari able.name, variable.nameOffset) { 9640 PropertyAccessorElementImpl.forVariable(PropertyInducingElementImpl variable) : super(variable.name, variable.nameOffset) {
9595 this.variable = variable; 9641 this.variable = variable;
9596 synthetic = true; 9642 synthetic = true;
9597 } 9643 }
9598 9644
9599 @override 9645 @override
9600 accept(ElementVisitor visitor) => visitor.visitPropertyAccessorElement(this); 9646 accept(ElementVisitor visitor) => visitor.visitPropertyAccessorElement(this);
9601 9647
9602 @override 9648 @override
9603 bool operator ==(Object object) => super == object && isGetter == (object as P ropertyAccessorElement).isGetter; 9649 bool operator ==(Object object) => super == object && isGetter == (object as P ropertyAccessorElement).isGetter;
9604 9650
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
9891 /** 9937 /**
9892 * An empty array of elements. 9938 * An empty array of elements.
9893 */ 9939 */
9894 static List<PropertyInducingElement> EMPTY_ARRAY = new List<PropertyInducingEl ement>(0); 9940 static List<PropertyInducingElement> EMPTY_ARRAY = new List<PropertyInducingEl ement>(0);
9895 9941
9896 /** 9942 /**
9897 * Initialize a newly created element to have the given name. 9943 * Initialize a newly created element to have the given name.
9898 * 9944 *
9899 * @param name the name of this element 9945 * @param name the name of this element
9900 */ 9946 */
9901 PropertyInducingElementImpl.con1(Identifier name) : super.forNode(name); 9947 PropertyInducingElementImpl.forNode(Identifier name) : super.forNode(name);
9902 9948
9903 /** 9949 /**
9904 * Initialize a newly created synthetic element to have the given name. 9950 * Initialize a newly created synthetic element to have the given name.
9905 * 9951 *
9906 * @param name the name of this element 9952 * @param name the name of this element
9953 * @param nameOffset the offset of the name of this element in the file that c ontains the
9954 * declaration of this element
9907 */ 9955 */
9908 PropertyInducingElementImpl.con2(String name) : super(name, -1) { 9956 PropertyInducingElementImpl(String name, int nameOffset) : super(name, nameOff set);
9909 synthetic = true;
9910 }
9911 } 9957 }
9912 9958
9913 /** 9959 /**
9914 * Instances of the class `RecursiveElementVisitor` implement an element visitor that will 9960 * Instances of the class `RecursiveElementVisitor` implement an element visitor that will
9915 * recursively visit all of the element in an element model. For example, using an instance of this 9961 * recursively visit all of the element in an element model. For example, using an instance of this
9916 * class to visit a [CompilationUnitElement] will also cause all of the types in the 9962 * class to visit a [CompilationUnitElement] will also cause all of the types in the
9917 * compilation unit to be visited. 9963 * compilation unit to be visited.
9918 * 9964 *
9919 * Subclasses that override a visit method must either invoke the overridden vis it method or must 9965 * Subclasses that override a visit method must either invoke the overridden vis it method or must
9920 * explicitly ask the visited element to visit its children. Failure to do so wi ll cause the 9966 * explicitly ask the visited element to visit its children. Failure to do so wi ll cause the
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
10332 /** 10378 /**
10333 * An empty array of top-level variable elements. 10379 * An empty array of top-level variable elements.
10334 */ 10380 */
10335 static List<TopLevelVariableElement> EMPTY_ARRAY = new List<TopLevelVariableEl ement>(0); 10381 static List<TopLevelVariableElement> EMPTY_ARRAY = new List<TopLevelVariableEl ement>(0);
10336 10382
10337 /** 10383 /**
10338 * Initialize a newly created top-level variable element to have the given nam e. 10384 * Initialize a newly created top-level variable element to have the given nam e.
10339 * 10385 *
10340 * @param name the name of this element 10386 * @param name the name of this element
10341 */ 10387 */
10342 TopLevelVariableElementImpl.con1(Identifier name) : super.con1(name); 10388 TopLevelVariableElementImpl.forNode(Identifier name) : super.forNode(name);
10343 10389
10344 /** 10390 /**
10345 * Initialize a newly created synthetic top-level variable element to have the given name. 10391 * Initialize a newly created synthetic top-level variable element to have the given name.
10346 * 10392 *
10347 * @param name the name of this element 10393 * @param name the name of this element
10394 * @param nameOffset the offset of the name of this element in the file that c ontains the
10395 * declaration of this element
10348 */ 10396 */
10349 TopLevelVariableElementImpl.con2(String name) : super.con2(name); 10397 TopLevelVariableElementImpl(String name, int nameOffset) : super(name, nameOff set);
10350 10398
10351 @override 10399 @override
10352 accept(ElementVisitor visitor) => visitor.visitTopLevelVariableElement(this); 10400 accept(ElementVisitor visitor) => visitor.visitTopLevelVariableElement(this);
10353 10401
10354 @override 10402 @override
10355 ElementKind get kind => ElementKind.TOP_LEVEL_VARIABLE; 10403 ElementKind get kind => ElementKind.TOP_LEVEL_VARIABLE;
10356 10404
10357 @override 10405 @override
10358 bool get isStatic => true; 10406 bool get isStatic => true;
10359 } 10407 }
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
10622 /** 10670 /**
10623 * An empty array of type parameter elements. 10671 * An empty array of type parameter elements.
10624 */ 10672 */
10625 static List<TypeParameterElement> EMPTY_ARRAY = new List<TypeParameterElement> (0); 10673 static List<TypeParameterElement> EMPTY_ARRAY = new List<TypeParameterElement> (0);
10626 10674
10627 /** 10675 /**
10628 * Initialize a newly created type parameter element to have the given name. 10676 * Initialize a newly created type parameter element to have the given name.
10629 * 10677 *
10630 * @param name the name of this element 10678 * @param name the name of this element
10631 */ 10679 */
10632 TypeParameterElementImpl(Identifier name) : super.forNode(name); 10680 TypeParameterElementImpl.forNode(Identifier name) : super.forNode(name);
10681
10682 /**
10683 * Initialize a newly created method element to have the given name.
10684 *
10685 * @param name the name of this element
10686 * @param nameOffset the offset of the name of this element in the file that c ontains the
10687 * declaration of this element
10688 */
10689 TypeParameterElementImpl(String name, int nameOffset) : super(name, nameOffset );
10633 10690
10634 @override 10691 @override
10635 accept(ElementVisitor visitor) => visitor.visitTypeParameterElement(this); 10692 accept(ElementVisitor visitor) => visitor.visitTypeParameterElement(this);
10636 10693
10637 @override 10694 @override
10638 ElementKind get kind => ElementKind.TYPE_PARAMETER; 10695 ElementKind get kind => ElementKind.TYPE_PARAMETER;
10639 10696
10640 @override 10697 @override
10641 void appendTo(JavaStringBuilder builder) { 10698 void appendTo(JavaStringBuilder builder) {
10642 builder.append(displayName); 10699 builder.append(displayName);
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
11132 11189
11133 @override 11190 @override
11134 bool internalEquals(Object object, Set<ElementPair> visitedElementPairs) => id entical(object, this); 11191 bool internalEquals(Object object, Set<ElementPair> visitedElementPairs) => id entical(object, this);
11135 11192
11136 @override 11193 @override
11137 bool internalIsMoreSpecificThan(DartType type, bool withDynamic, Set<TypeImpl_ TypePair> visitedTypePairs) => isSubtypeOf(type); 11194 bool internalIsMoreSpecificThan(DartType type, bool withDynamic, Set<TypeImpl_ TypePair> visitedTypePairs) => isSubtypeOf(type);
11138 11195
11139 @override 11196 @override
11140 bool internalIsSubtypeOf(DartType type, Set<TypeImpl_TypePair> visitedTypePair s) => identical(type, this) || identical(type, DynamicTypeImpl.instance); 11197 bool internalIsSubtypeOf(DartType type, Set<TypeImpl_TypePair> visitedTypePair s) => identical(type, this) || identical(type, DynamicTypeImpl.instance);
11141 } 11198 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698