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

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

Issue 18129004: Simplify constructors translation, improve code style. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 library engine.element; 3 library engine.element;
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'java_core.dart'; 5 import 'java_core.dart';
6 import 'java_engine.dart'; 6 import 'java_engine.dart';
7 import 'source.dart'; 7 import 'source.dart';
8 import 'scanner.dart' show Keyword; 8 import 'scanner.dart' show Keyword;
9 import 'ast.dart' show Identifier, LibraryIdentifier; 9 import 'ast.dart' show Identifier, LibraryIdentifier;
10 import 'sdk.dart' show DartSdk; 10 import 'sdk.dart' show DartSdk;
(...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 /** 1733 /**
1734 * An empty array of type elements. 1734 * An empty array of type elements.
1735 */ 1735 */
1736 static List<ClassElement> EMPTY_ARRAY = new List<ClassElement>(0); 1736 static List<ClassElement> EMPTY_ARRAY = new List<ClassElement>(0);
1737 1737
1738 /** 1738 /**
1739 * Initialize a newly created class element to have the given name. 1739 * Initialize a newly created class element to have the given name.
1740 * 1740 *
1741 * @param name the name of this element 1741 * @param name the name of this element
1742 */ 1742 */
1743 ClassElementImpl(Identifier name) : super.con1(name) { 1743 ClassElementImpl(Identifier name) : super.con1(name);
1744 }
1745 accept(ElementVisitor visitor) => visitor.visitClassElement(this); 1744 accept(ElementVisitor visitor) => visitor.visitClassElement(this);
1746 List<PropertyAccessorElement> get accessors => _accessors; 1745 List<PropertyAccessorElement> get accessors => _accessors;
1747 List<InterfaceType> get allSupertypes { 1746 List<InterfaceType> get allSupertypes {
1748 List<InterfaceType> list = new List<InterfaceType>(); 1747 List<InterfaceType> list = new List<InterfaceType>();
1749 collectAllSupertypes(list); 1748 collectAllSupertypes(list);
1750 return new List.from(list); 1749 return new List.from(list);
1751 } 1750 }
1752 ElementImpl getChild(String identifier2) { 1751 ElementImpl getChild(String identifier2) {
1753 for (PropertyAccessorElement accessor in _accessors) { 1752 for (PropertyAccessorElement accessor in _accessors) {
1754 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier2) { 1753 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier2) {
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
2193 * The URI that is specified by the "part" directive in the enclosing library, or `null` if 2192 * The URI that is specified by the "part" directive in the enclosing library, or `null` if
2194 * this is the defining compilation unit of a library. 2193 * this is the defining compilation unit of a library.
2195 */ 2194 */
2196 String _uri; 2195 String _uri;
2197 2196
2198 /** 2197 /**
2199 * Initialize a newly created compilation unit element to have the given name. 2198 * Initialize a newly created compilation unit element to have the given name.
2200 * 2199 *
2201 * @param name the name of this element 2200 * @param name the name of this element
2202 */ 2201 */
2203 CompilationUnitElementImpl(String name) : super.con2(name, -1) { 2202 CompilationUnitElementImpl(String name) : super.con2(name, -1);
2204 }
2205 accept(ElementVisitor visitor) => visitor.visitCompilationUnitElement(this); 2203 accept(ElementVisitor visitor) => visitor.visitCompilationUnitElement(this);
2206 bool operator ==(Object object) => object != null && runtimeType == object.run timeType && _source == ((object as CompilationUnitElementImpl)).source; 2204 bool operator ==(Object object) => object != null && runtimeType == object.run timeType && _source == ((object as CompilationUnitElementImpl)).source;
2207 List<PropertyAccessorElement> get accessors => _accessors; 2205 List<PropertyAccessorElement> get accessors => _accessors;
2208 ElementImpl getChild(String identifier2) { 2206 ElementImpl getChild(String identifier2) {
2209 for (PropertyAccessorElement accessor in _accessors) { 2207 for (PropertyAccessorElement accessor in _accessors) {
2210 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier2) { 2208 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier2) {
2211 return accessor as PropertyAccessorElementImpl; 2209 return accessor as PropertyAccessorElementImpl;
2212 } 2210 }
2213 } 2211 }
2214 for (VariableElement variable in _variables) { 2212 for (VariableElement variable in _variables) {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
2355 /** 2353 /**
2356 * The result of evaluating this variable's initializer. 2354 * The result of evaluating this variable's initializer.
2357 */ 2355 */
2358 EvaluationResultImpl _result; 2356 EvaluationResultImpl _result;
2359 2357
2360 /** 2358 /**
2361 * Initialize a newly created field element to have the given name. 2359 * Initialize a newly created field element to have the given name.
2362 * 2360 *
2363 * @param name the name of this element 2361 * @param name the name of this element
2364 */ 2362 */
2365 ConstFieldElementImpl(Identifier name) : super.con1(name) { 2363 ConstFieldElementImpl(Identifier name) : super.con1(name);
2366 }
2367 EvaluationResultImpl get evaluationResult => _result; 2364 EvaluationResultImpl get evaluationResult => _result;
2368 void set evaluationResult(EvaluationResultImpl result2) { 2365 void set evaluationResult(EvaluationResultImpl result2) {
2369 this._result = result2; 2366 this._result = result2;
2370 } 2367 }
2371 } 2368 }
2372 /** 2369 /**
2373 * Instances of the class `ConstLocalVariableElementImpl` implement a 2370 * Instances of the class `ConstLocalVariableElementImpl` implement a
2374 * `LocalVariableElement` for a local 'const' variable that has an initializer. 2371 * `LocalVariableElement` for a local 'const' variable that has an initializer.
2375 * 2372 *
2376 * @coverage dart.engine.element 2373 * @coverage dart.engine.element
2377 */ 2374 */
2378 class ConstLocalVariableElementImpl extends LocalVariableElementImpl { 2375 class ConstLocalVariableElementImpl extends LocalVariableElementImpl {
2379 2376
2380 /** 2377 /**
2381 * The result of evaluating this variable's initializer. 2378 * The result of evaluating this variable's initializer.
2382 */ 2379 */
2383 EvaluationResultImpl _result; 2380 EvaluationResultImpl _result;
2384 2381
2385 /** 2382 /**
2386 * Initialize a newly created local variable element to have the given name. 2383 * Initialize a newly created local variable element to have the given name.
2387 * 2384 *
2388 * @param name the name of this element 2385 * @param name the name of this element
2389 */ 2386 */
2390 ConstLocalVariableElementImpl(Identifier name) : super(name) { 2387 ConstLocalVariableElementImpl(Identifier name) : super(name);
2391 }
2392 EvaluationResultImpl get evaluationResult => _result; 2388 EvaluationResultImpl get evaluationResult => _result;
2393 void set evaluationResult(EvaluationResultImpl result2) { 2389 void set evaluationResult(EvaluationResultImpl result2) {
2394 this._result = result2; 2390 this._result = result2;
2395 } 2391 }
2396 } 2392 }
2397 /** 2393 /**
2398 * Instances of the class `ConstTopLevelVariableElementImpl` implement a 2394 * Instances of the class `ConstTopLevelVariableElementImpl` implement a
2399 * `TopLevelVariableElement` for a top-level 'const' variable that has an initia lizer. 2395 * `TopLevelVariableElement` for a top-level 'const' variable that has an initia lizer.
2400 */ 2396 */
2401 class ConstTopLevelVariableElementImpl extends TopLevelVariableElementImpl { 2397 class ConstTopLevelVariableElementImpl extends TopLevelVariableElementImpl {
2402 2398
2403 /** 2399 /**
2404 * The result of evaluating this variable's initializer. 2400 * The result of evaluating this variable's initializer.
2405 */ 2401 */
2406 EvaluationResultImpl _result; 2402 EvaluationResultImpl _result;
2407 2403
2408 /** 2404 /**
2409 * Initialize a newly created top-level variable element to have the given nam e. 2405 * Initialize a newly created top-level variable element to have the given nam e.
2410 * 2406 *
2411 * @param name the name of this element 2407 * @param name the name of this element
2412 */ 2408 */
2413 ConstTopLevelVariableElementImpl(Identifier name) : super.con1(name) { 2409 ConstTopLevelVariableElementImpl(Identifier name) : super.con1(name);
2414 }
2415 EvaluationResultImpl get evaluationResult => _result; 2410 EvaluationResultImpl get evaluationResult => _result;
2416 void set evaluationResult(EvaluationResultImpl result2) { 2411 void set evaluationResult(EvaluationResultImpl result2) {
2417 this._result = result2; 2412 this._result = result2;
2418 } 2413 }
2419 } 2414 }
2420 /** 2415 /**
2421 * Instances of the class `ConstructorElementImpl` implement a `ConstructorEleme nt`. 2416 * Instances of the class `ConstructorElementImpl` implement a `ConstructorEleme nt`.
2422 * 2417 *
2423 * @coverage dart.engine.element 2418 * @coverage dart.engine.element
2424 */ 2419 */
2425 class ConstructorElementImpl extends ExecutableElementImpl implements Constructo rElement { 2420 class ConstructorElementImpl extends ExecutableElementImpl implements Constructo rElement {
2426 2421
2427 /** 2422 /**
2428 * An empty array of constructor elements. 2423 * An empty array of constructor elements.
2429 */ 2424 */
2430 static List<ConstructorElement> EMPTY_ARRAY = new List<ConstructorElement>(0); 2425 static List<ConstructorElement> EMPTY_ARRAY = new List<ConstructorElement>(0);
2431 2426
2432 /** 2427 /**
2433 * The constructor to which this constructor is redirecting. 2428 * The constructor to which this constructor is redirecting.
2434 */ 2429 */
2435 ConstructorElement _redirectedConstructor; 2430 ConstructorElement _redirectedConstructor;
2436 2431
2437 /** 2432 /**
2438 * Initialize a newly created constructor element to have the given name. 2433 * Initialize a newly created constructor element to have the given name.
2439 * 2434 *
2440 * @param name the name of this element 2435 * @param name the name of this element
2441 */ 2436 */
2442 ConstructorElementImpl(Identifier name) : super.con1(name) { 2437 ConstructorElementImpl(Identifier name) : super.con1(name);
2443 }
2444 accept(ElementVisitor visitor) => visitor.visitConstructorElement(this); 2438 accept(ElementVisitor visitor) => visitor.visitConstructorElement(this);
2445 ClassElement get enclosingElement => super.enclosingElement as ClassElement; 2439 ClassElement get enclosingElement => super.enclosingElement as ClassElement;
2446 ElementKind get kind => ElementKind.CONSTRUCTOR; 2440 ElementKind get kind => ElementKind.CONSTRUCTOR;
2447 ConstructorElement get redirectedConstructor => _redirectedConstructor; 2441 ConstructorElement get redirectedConstructor => _redirectedConstructor;
2448 bool get isConst => hasModifier(Modifier.CONST); 2442 bool get isConst => hasModifier(Modifier.CONST);
2449 bool get isDefaultConstructor { 2443 bool get isDefaultConstructor {
2450 String name = this.name; 2444 String name = this.name;
2451 if (name != null && name.length != 0) { 2445 if (name != null && name.length != 0) {
2452 return false; 2446 return false;
2453 } 2447 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
2508 /** 2502 /**
2509 * The result of evaluating this variable's initializer. 2503 * The result of evaluating this variable's initializer.
2510 */ 2504 */
2511 EvaluationResultImpl _result; 2505 EvaluationResultImpl _result;
2512 2506
2513 /** 2507 /**
2514 * Initialize a newly created parameter element to have the given name. 2508 * Initialize a newly created parameter element to have the given name.
2515 * 2509 *
2516 * @param name the name of this element 2510 * @param name the name of this element
2517 */ 2511 */
2518 DefaultFieldFormalParameterElementImpl(Identifier name) : super(name) { 2512 DefaultFieldFormalParameterElementImpl(Identifier name) : super(name);
2519 }
2520 EvaluationResultImpl get evaluationResult => _result; 2513 EvaluationResultImpl get evaluationResult => _result;
2521 void set evaluationResult(EvaluationResultImpl result2) { 2514 void set evaluationResult(EvaluationResultImpl result2) {
2522 this._result = result2; 2515 this._result = result2;
2523 } 2516 }
2524 } 2517 }
2525 /** 2518 /**
2526 * Instances of the class `DefaultParameterElementImpl` implement a `ParameterEl ement` 2519 * Instances of the class `DefaultParameterElementImpl` implement a `ParameterEl ement`
2527 * for parameters that have an initializer. 2520 * for parameters that have an initializer.
2528 * 2521 *
2529 * @coverage dart.engine.element 2522 * @coverage dart.engine.element
2530 */ 2523 */
2531 class DefaultParameterElementImpl extends ParameterElementImpl { 2524 class DefaultParameterElementImpl extends ParameterElementImpl {
2532 2525
2533 /** 2526 /**
2534 * The result of evaluating this variable's initializer. 2527 * The result of evaluating this variable's initializer.
2535 */ 2528 */
2536 EvaluationResultImpl _result; 2529 EvaluationResultImpl _result;
2537 2530
2538 /** 2531 /**
2539 * Initialize a newly created parameter element to have the given name. 2532 * Initialize a newly created parameter element to have the given name.
2540 * 2533 *
2541 * @param name the name of this element 2534 * @param name the name of this element
2542 */ 2535 */
2543 DefaultParameterElementImpl(Identifier name) : super.con1(name) { 2536 DefaultParameterElementImpl(Identifier name) : super.con1(name);
2544 }
2545 EvaluationResultImpl get evaluationResult => _result; 2537 EvaluationResultImpl get evaluationResult => _result;
2546 void set evaluationResult(EvaluationResultImpl result2) { 2538 void set evaluationResult(EvaluationResultImpl result2) {
2547 this._result = result2; 2539 this._result = result2;
2548 } 2540 }
2549 } 2541 }
2550 /** 2542 /**
2551 * Instances of the class `DynamicElementImpl` represent the synthetic element r epresenting 2543 * Instances of the class `DynamicElementImpl` represent the synthetic element r epresenting
2552 * the declaration of the type `dynamic`. 2544 * the declaration of the type `dynamic`.
2553 * 2545 *
2554 * @coverage dart.engine.element 2546 * @coverage dart.engine.element
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2661 /** 2653 /**
2662 * A cached copy of the calculated hashCode for this element. 2654 * A cached copy of the calculated hashCode for this element.
2663 */ 2655 */
2664 int _cachedHashCode = 0; 2656 int _cachedHashCode = 0;
2665 2657
2666 /** 2658 /**
2667 * Initialize a newly created element to have the given name. 2659 * Initialize a newly created element to have the given name.
2668 * 2660 *
2669 * @param name the name of this element 2661 * @param name the name of this element
2670 */ 2662 */
2671 ElementImpl.con1(Identifier name2) { 2663 ElementImpl.con1(Identifier name) : this.con2(name == null ? "" : name.name, n ame == null ? -1 : name.offset);
2672 _jtd_constructor_197_impl(name2);
2673 }
2674 _jtd_constructor_197_impl(Identifier name2) {
2675 _jtd_constructor_198_impl(name2 == null ? "" : name2.name, name2 == null ? - 1 : name2.offset);
2676 }
2677 2664
2678 /** 2665 /**
2679 * Initialize a newly created element to have the given name. 2666 * Initialize a newly created element to have the given name.
2680 * 2667 *
2681 * @param name the name of this element 2668 * @param name the name of this element
2682 * @param nameOffset the offset of the name of this element in the file that c ontains the 2669 * @param nameOffset the offset of the name of this element in the file that c ontains the
2683 * declaration of this element 2670 * declaration of this element
2684 */ 2671 */
2685 ElementImpl.con2(String name2, int nameOffset2) { 2672 ElementImpl.con2(String name, int nameOffset) {
2686 _jtd_constructor_198_impl(name2, nameOffset2); 2673 this._name = StringUtilities.intern(name);
2687 } 2674 this._nameOffset = nameOffset;
2688 _jtd_constructor_198_impl(String name2, int nameOffset2) {
2689 this._name = StringUtilities.intern(name2);
2690 this._nameOffset = nameOffset2;
2691 } 2675 }
2692 String computeDocumentationComment() { 2676 String computeDocumentationComment() {
2693 AnalysisContext context = this.context; 2677 AnalysisContext context = this.context;
2694 if (context == null) { 2678 if (context == null) {
2695 return null; 2679 return null;
2696 } 2680 }
2697 return context.computeDocumentationComment(this); 2681 return context.computeDocumentationComment(this);
2698 } 2682 }
2699 bool operator ==(Object object) => object != null && object.runtimeType == run timeType && ((object as Element)).location == location; 2683 bool operator ==(Object object) => object != null && object.runtimeType == run timeType && ((object as Element)).location == location;
2700 Element getAncestor(Type elementClass) { 2684 Element getAncestor(Type elementClass) {
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2887 * The character used to separate components in the encoded form. 2871 * The character used to separate components in the encoded form.
2888 */ 2872 */
2889 static int _SEPARATOR_CHAR = 0x3B; 2873 static int _SEPARATOR_CHAR = 0x3B;
2890 2874
2891 /** 2875 /**
2892 * Initialize a newly created location to represent the given element. 2876 * Initialize a newly created location to represent the given element.
2893 * 2877 *
2894 * @param element the element whose location is being represented 2878 * @param element the element whose location is being represented
2895 */ 2879 */
2896 ElementLocationImpl.con1(Element element) { 2880 ElementLocationImpl.con1(Element element) {
2897 _jtd_constructor_199_impl(element);
2898 }
2899 _jtd_constructor_199_impl(Element element) {
2900 List<String> components = new List<String>(); 2881 List<String> components = new List<String>();
2901 Element ancestor = element; 2882 Element ancestor = element;
2902 while (ancestor != null) { 2883 while (ancestor != null) {
2903 components.insert(0, ((ancestor as ElementImpl)).identifier); 2884 components.insert(0, ((ancestor as ElementImpl)).identifier);
2904 ancestor = ancestor.enclosingElement; 2885 ancestor = ancestor.enclosingElement;
2905 } 2886 }
2906 this._components = new List.from(components); 2887 this._components = new List.from(components);
2907 } 2888 }
2908 2889
2909 /** 2890 /**
2910 * Initialize a newly created location from the given encoded form. 2891 * Initialize a newly created location from the given encoded form.
2911 * 2892 *
2912 * @param encoding the encoded form of a location 2893 * @param encoding the encoded form of a location
2913 */ 2894 */
2914 ElementLocationImpl.con2(String encoding) { 2895 ElementLocationImpl.con2(String encoding) {
2915 _jtd_constructor_200_impl(encoding);
2916 }
2917 _jtd_constructor_200_impl(String encoding) {
2918 this._components = decode(encoding); 2896 this._components = decode(encoding);
2919 } 2897 }
2920 bool operator ==(Object object) { 2898 bool operator ==(Object object) {
2921 if (object is! ElementLocationImpl) { 2899 if (object is! ElementLocationImpl) {
2922 return false; 2900 return false;
2923 } 2901 }
2924 ElementLocationImpl location = object as ElementLocationImpl; 2902 ElementLocationImpl location = object as ElementLocationImpl;
2925 List<String> otherComponents = location._components; 2903 List<String> otherComponents = location._components;
2926 int length = _components.length; 2904 int length = _components.length;
2927 if (otherComponents.length != length) { 2905 if (otherComponents.length != length) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
3042 /** 3020 /**
3043 * The library defined by the script tag's content. 3021 * The library defined by the script tag's content.
3044 */ 3022 */
3045 LibraryElement _scriptLibrary; 3023 LibraryElement _scriptLibrary;
3046 3024
3047 /** 3025 /**
3048 * Initialize a newly created script element to have the specified tag name an d offset. 3026 * Initialize a newly created script element to have the specified tag name an d offset.
3049 * 3027 *
3050 * @param node the XML node from which this element is derived (not `null`) 3028 * @param node the XML node from which this element is derived (not `null`)
3051 */ 3029 */
3052 EmbeddedHtmlScriptElementImpl(XmlTagNode node) : super(node) { 3030 EmbeddedHtmlScriptElementImpl(XmlTagNode node) : super(node);
3053 }
3054 accept(ElementVisitor visitor) => visitor.visitEmbeddedHtmlScriptElement(this) ; 3031 accept(ElementVisitor visitor) => visitor.visitEmbeddedHtmlScriptElement(this) ;
3055 ElementKind get kind => ElementKind.EMBEDDED_HTML_SCRIPT; 3032 ElementKind get kind => ElementKind.EMBEDDED_HTML_SCRIPT;
3056 LibraryElement get scriptLibrary => _scriptLibrary; 3033 LibraryElement get scriptLibrary => _scriptLibrary;
3057 3034
3058 /** 3035 /**
3059 * Set the script library defined by the script tag's content. 3036 * Set the script library defined by the script tag's content.
3060 * 3037 *
3061 * @param scriptLibrary the library or `null` if none 3038 * @param scriptLibrary the library or `null` if none
3062 */ 3039 */
3063 void set scriptLibrary(LibraryElementImpl scriptLibrary2) { 3040 void set scriptLibrary(LibraryElementImpl scriptLibrary2) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
3109 /** 3086 /**
3110 * An empty array of executable elements. 3087 * An empty array of executable elements.
3111 */ 3088 */
3112 static List<ExecutableElement> EMPTY_ARRAY = new List<ExecutableElement>(0); 3089 static List<ExecutableElement> EMPTY_ARRAY = new List<ExecutableElement>(0);
3113 3090
3114 /** 3091 /**
3115 * Initialize a newly created executable element to have the given name. 3092 * Initialize a newly created executable element to have the given name.
3116 * 3093 *
3117 * @param name the name of this element 3094 * @param name the name of this element
3118 */ 3095 */
3119 ExecutableElementImpl.con1(Identifier name) : super.con1(name) { 3096 ExecutableElementImpl.con1(Identifier name) : super.con1(name);
3120 _jtd_constructor_202_impl(name);
3121 }
3122 _jtd_constructor_202_impl(Identifier name) {
3123 }
3124 3097
3125 /** 3098 /**
3126 * Initialize a newly created executable element to have the given name. 3099 * Initialize a newly created executable element to have the given name.
3127 * 3100 *
3128 * @param name the name of this element 3101 * @param name the name of this element
3129 * @param nameOffset the offset of the name of this element in the file that c ontains the 3102 * @param nameOffset the offset of the name of this element in the file that c ontains the
3130 * declaration of this element 3103 * declaration of this element
3131 */ 3104 */
3132 ExecutableElementImpl.con2(String name, int nameOffset) : super.con2(name, nam eOffset) { 3105 ExecutableElementImpl.con2(String name, int nameOffset) : super.con2(name, nam eOffset);
3133 _jtd_constructor_203_impl(name, nameOffset);
3134 }
3135 _jtd_constructor_203_impl(String name, int nameOffset) {
3136 }
3137 ElementImpl getChild(String identifier2) { 3106 ElementImpl getChild(String identifier2) {
3138 for (ExecutableElement function in _functions) { 3107 for (ExecutableElement function in _functions) {
3139 if (((function as ExecutableElementImpl)).identifier == identifier2) { 3108 if (((function as ExecutableElementImpl)).identifier == identifier2) {
3140 return function as ExecutableElementImpl; 3109 return function as ExecutableElementImpl;
3141 } 3110 }
3142 } 3111 }
3143 for (LabelElement label in _labels) { 3112 for (LabelElement label in _labels) {
3144 if (((label as LabelElementImpl)).identifier == identifier2) { 3113 if (((label as LabelElementImpl)).identifier == identifier2) {
3145 return label as LabelElementImpl; 3114 return label as LabelElementImpl;
3146 } 3115 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
3272 3241
3273 /** 3242 /**
3274 * The combinators that were specified as part of the export directive in the order in which they 3243 * The combinators that were specified as part of the export directive in the order in which they
3275 * were specified. 3244 * were specified.
3276 */ 3245 */
3277 List<NamespaceCombinator> _combinators = NamespaceCombinator.EMPTY_ARRAY; 3246 List<NamespaceCombinator> _combinators = NamespaceCombinator.EMPTY_ARRAY;
3278 3247
3279 /** 3248 /**
3280 * Initialize a newly created export element. 3249 * Initialize a newly created export element.
3281 */ 3250 */
3282 ExportElementImpl() : super.con1(null) { 3251 ExportElementImpl() : super.con1(null);
3283 }
3284 accept(ElementVisitor visitor) => visitor.visitExportElement(this); 3252 accept(ElementVisitor visitor) => visitor.visitExportElement(this);
3285 List<NamespaceCombinator> get combinators => _combinators; 3253 List<NamespaceCombinator> get combinators => _combinators;
3286 LibraryElement get exportedLibrary => _exportedLibrary; 3254 LibraryElement get exportedLibrary => _exportedLibrary;
3287 ElementKind get kind => ElementKind.EXPORT; 3255 ElementKind get kind => ElementKind.EXPORT;
3288 String get uri => _uri; 3256 String get uri => _uri;
3289 3257
3290 /** 3258 /**
3291 * Set the combinators that were specified as part of the export directive to the given array of 3259 * Set the combinators that were specified as part of the export directive to the given array of
3292 * combinators. 3260 * combinators.
3293 * 3261 *
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
3332 /** 3300 /**
3333 * The source specified in the `source` attribute or `null` if unspecified. 3301 * The source specified in the `source` attribute or `null` if unspecified.
3334 */ 3302 */
3335 Source _scriptSource; 3303 Source _scriptSource;
3336 3304
3337 /** 3305 /**
3338 * Initialize a newly created script element to have the specified tag name an d offset. 3306 * Initialize a newly created script element to have the specified tag name an d offset.
3339 * 3307 *
3340 * @param node the XML node from which this element is derived (not `null`) 3308 * @param node the XML node from which this element is derived (not `null`)
3341 */ 3309 */
3342 ExternalHtmlScriptElementImpl(XmlTagNode node) : super(node) { 3310 ExternalHtmlScriptElementImpl(XmlTagNode node) : super(node);
3343 }
3344 accept(ElementVisitor visitor) => visitor.visitExternalHtmlScriptElement(this) ; 3311 accept(ElementVisitor visitor) => visitor.visitExternalHtmlScriptElement(this) ;
3345 ElementKind get kind => ElementKind.EXTERNAL_HTML_SCRIPT; 3312 ElementKind get kind => ElementKind.EXTERNAL_HTML_SCRIPT;
3346 Source get scriptSource => _scriptSource; 3313 Source get scriptSource => _scriptSource;
3347 3314
3348 /** 3315 /**
3349 * Set the source specified in the `source` attribute. 3316 * Set the source specified in the `source` attribute.
3350 * 3317 *
3351 * @param scriptSource the script source or `null` if unspecified 3318 * @param scriptSource the script source or `null` if unspecified
3352 */ 3319 */
3353 void set scriptSource(Source scriptSource2) { 3320 void set scriptSource(Source scriptSource2) {
(...skipping 10 matching lines...) Expand all
3364 /** 3331 /**
3365 * An empty array of field elements. 3332 * An empty array of field elements.
3366 */ 3333 */
3367 static List<FieldElement> EMPTY_ARRAY = new List<FieldElement>(0); 3334 static List<FieldElement> EMPTY_ARRAY = new List<FieldElement>(0);
3368 3335
3369 /** 3336 /**
3370 * Initialize a newly created field element to have the given name. 3337 * Initialize a newly created field element to have the given name.
3371 * 3338 *
3372 * @param name the name of this element 3339 * @param name the name of this element
3373 */ 3340 */
3374 FieldElementImpl.con1(Identifier name) : super.con1(name) { 3341 FieldElementImpl.con1(Identifier name) : super.con1(name);
3375 _jtd_constructor_206_impl(name);
3376 }
3377 _jtd_constructor_206_impl(Identifier name) {
3378 }
3379 3342
3380 /** 3343 /**
3381 * Initialize a newly created synthetic field element to have the given name. 3344 * Initialize a newly created synthetic field element to have the given name.
3382 * 3345 *
3383 * @param name the name of this element 3346 * @param name the name of this element
3384 */ 3347 */
3385 FieldElementImpl.con2(String name) : super.con2(name) { 3348 FieldElementImpl.con2(String name) : super.con2(name);
3386 _jtd_constructor_207_impl(name);
3387 }
3388 _jtd_constructor_207_impl(String name) {
3389 }
3390 accept(ElementVisitor visitor) => visitor.visitFieldElement(this); 3349 accept(ElementVisitor visitor) => visitor.visitFieldElement(this);
3391 ClassElement get enclosingElement => super.enclosingElement as ClassElement; 3350 ClassElement get enclosingElement => super.enclosingElement as ClassElement;
3392 ElementKind get kind => ElementKind.FIELD; 3351 ElementKind get kind => ElementKind.FIELD;
3393 bool get isStatic => hasModifier(Modifier.STATIC); 3352 bool get isStatic => hasModifier(Modifier.STATIC);
3394 3353
3395 /** 3354 /**
3396 * Set whether this field is static to correspond to the given value. 3355 * Set whether this field is static to correspond to the given value.
3397 * 3356 *
3398 * @param isStatic `true` if the field is static 3357 * @param isStatic `true` if the field is static
3399 */ 3358 */
(...skipping 13 matching lines...) Expand all
3413 /** 3372 /**
3414 * The field associated with this field formal parameter. 3373 * The field associated with this field formal parameter.
3415 */ 3374 */
3416 FieldElement _field; 3375 FieldElement _field;
3417 3376
3418 /** 3377 /**
3419 * Initialize a newly created parameter element to have the given name. 3378 * Initialize a newly created parameter element to have the given name.
3420 * 3379 *
3421 * @param name the name of this element 3380 * @param name the name of this element
3422 */ 3381 */
3423 FieldFormalParameterElementImpl(Identifier name) : super.con1(name) { 3382 FieldFormalParameterElementImpl(Identifier name) : super.con1(name);
3424 }
3425 accept(ElementVisitor visitor) => visitor.visitFieldFormalParameterElement(thi s); 3383 accept(ElementVisitor visitor) => visitor.visitFieldFormalParameterElement(thi s);
3426 FieldElement get field => _field; 3384 FieldElement get field => _field;
3427 bool get isInitializingFormal => true; 3385 bool get isInitializingFormal => true;
3428 3386
3429 /** 3387 /**
3430 * Set the field element associated with this field formal parameter to the gi ven element. 3388 * Set the field element associated with this field formal parameter to the gi ven element.
3431 * 3389 *
3432 * @param field the new field element 3390 * @param field the new field element
3433 */ 3391 */
3434 void set field(FieldElement field2) { 3392 void set field(FieldElement field2) {
(...skipping 20 matching lines...) Expand all
3455 3413
3456 /** 3414 /**
3457 * An empty array of function elements. 3415 * An empty array of function elements.
3458 */ 3416 */
3459 static List<FunctionElement> EMPTY_ARRAY = new List<FunctionElement>(0); 3417 static List<FunctionElement> EMPTY_ARRAY = new List<FunctionElement>(0);
3460 3418
3461 /** 3419 /**
3462 * Initialize a newly created synthetic function element. 3420 * Initialize a newly created synthetic function element.
3463 */ 3421 */
3464 FunctionElementImpl() : super.con2("", -1) { 3422 FunctionElementImpl() : super.con2("", -1) {
3465 _jtd_constructor_209_impl();
3466 }
3467 _jtd_constructor_209_impl() {
3468 synthetic = true; 3423 synthetic = true;
3469 } 3424 }
3470 3425
3471 /** 3426 /**
3472 * Initialize a newly created function element to have the given name. 3427 * Initialize a newly created function element to have the given name.
3473 * 3428 *
3474 * @param name the name of this element 3429 * @param name the name of this element
3475 */ 3430 */
3476 FunctionElementImpl.con1(Identifier name) : super.con1(name) { 3431 FunctionElementImpl.con1(Identifier name) : super.con1(name);
3477 _jtd_constructor_210_impl(name);
3478 }
3479 _jtd_constructor_210_impl(Identifier name) {
3480 }
3481 3432
3482 /** 3433 /**
3483 * Initialize a newly created function element to have no name and the given o ffset. This is used 3434 * Initialize a newly created function element to have no name and the given o ffset. This is used
3484 * for function expressions, which have no name. 3435 * for function expressions, which have no name.
3485 * 3436 *
3486 * @param nameOffset the offset of the name of this element in the file that c ontains the 3437 * @param nameOffset the offset of the name of this element in the file that c ontains the
3487 * declaration of this element 3438 * declaration of this element
3488 */ 3439 */
3489 FunctionElementImpl.con2(int nameOffset) : super.con2("", nameOffset) { 3440 FunctionElementImpl.con2(int nameOffset) : super.con2("", nameOffset);
3490 _jtd_constructor_211_impl(nameOffset);
3491 }
3492 _jtd_constructor_211_impl(int nameOffset) {
3493 }
3494 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this); 3441 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this);
3495 String get identifier => "${name}@${nameOffset}"; 3442 String get identifier => "${name}@${nameOffset}";
3496 ElementKind get kind => ElementKind.FUNCTION; 3443 ElementKind get kind => ElementKind.FUNCTION;
3497 SourceRange get visibleRange { 3444 SourceRange get visibleRange {
3498 if (_visibleRangeLength < 0) { 3445 if (_visibleRangeLength < 0) {
3499 return null; 3446 return null;
3500 } 3447 }
3501 return new SourceRange(_visibleRangeOffset, _visibleRangeLength); 3448 return new SourceRange(_visibleRangeOffset, _visibleRangeLength);
3502 } 3449 }
3503 bool get isStatic => enclosingElement is CompilationUnitElement; 3450 bool get isStatic => enclosingElement is CompilationUnitElement;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
3553 /** 3500 /**
3554 * An empty array of type alias elements. 3501 * An empty array of type alias elements.
3555 */ 3502 */
3556 static List<FunctionTypeAliasElement> EMPTY_ARRAY = new List<FunctionTypeAlias Element>(0); 3503 static List<FunctionTypeAliasElement> EMPTY_ARRAY = new List<FunctionTypeAlias Element>(0);
3557 3504
3558 /** 3505 /**
3559 * Initialize a newly created type alias element to have the given name. 3506 * Initialize a newly created type alias element to have the given name.
3560 * 3507 *
3561 * @param name the name of this element 3508 * @param name the name of this element
3562 */ 3509 */
3563 FunctionTypeAliasElementImpl(Identifier name) : super.con1(name) { 3510 FunctionTypeAliasElementImpl(Identifier name) : super.con1(name);
3564 }
3565 accept(ElementVisitor visitor) => visitor.visitFunctionTypeAliasElement(this); 3511 accept(ElementVisitor visitor) => visitor.visitFunctionTypeAliasElement(this);
3566 ElementImpl getChild(String identifier2) { 3512 ElementImpl getChild(String identifier2) {
3567 for (VariableElement parameter in _parameters) { 3513 for (VariableElement parameter in _parameters) {
3568 if (((parameter as VariableElementImpl)).identifier == identifier2) { 3514 if (((parameter as VariableElementImpl)).identifier == identifier2) {
3569 return parameter as VariableElementImpl; 3515 return parameter as VariableElementImpl;
3570 } 3516 }
3571 } 3517 }
3572 for (TypeVariableElement typeVariable in _typeVariables) { 3518 for (TypeVariableElement typeVariable in _typeVariables) {
3573 if (((typeVariable as TypeVariableElementImpl)).identifier == identifier2) { 3519 if (((typeVariable as TypeVariableElementImpl)).identifier == identifier2) {
3574 return typeVariable as TypeVariableElementImpl; 3520 return typeVariable as TypeVariableElementImpl;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
3786 /** 3732 /**
3787 * An empty array of HTML script elements. 3733 * An empty array of HTML script elements.
3788 */ 3734 */
3789 static List<HtmlScriptElement> EMPTY_ARRAY = new List<HtmlScriptElement>(0); 3735 static List<HtmlScriptElement> EMPTY_ARRAY = new List<HtmlScriptElement>(0);
3790 3736
3791 /** 3737 /**
3792 * Initialize a newly created script element to have the specified tag name an d offset. 3738 * Initialize a newly created script element to have the specified tag name an d offset.
3793 * 3739 *
3794 * @param node the XML node from which this element is derived (not `null`) 3740 * @param node the XML node from which this element is derived (not `null`)
3795 */ 3741 */
3796 HtmlScriptElementImpl(XmlTagNode node) : super.con2(node.tag.lexeme, node.tag. offset) { 3742 HtmlScriptElementImpl(XmlTagNode node) : super.con2(node.tag.lexeme, node.tag. offset);
3797 }
3798 } 3743 }
3799 /** 3744 /**
3800 * Instances of the class `ImportElementImpl` implement an [ImportElement]. 3745 * Instances of the class `ImportElementImpl` implement an [ImportElement].
3801 * 3746 *
3802 * @coverage dart.engine.element 3747 * @coverage dart.engine.element
3803 */ 3748 */
3804 class ImportElementImpl extends ElementImpl implements ImportElement { 3749 class ImportElementImpl extends ElementImpl implements ImportElement {
3805 3750
3806 /** 3751 /**
3807 * The URI that is specified by this directive. 3752 * The URI that is specified by this directive.
(...skipping 13 matching lines...) Expand all
3821 3766
3822 /** 3767 /**
3823 * The prefix that was specified as part of the import directive, or `null` if there was no 3768 * The prefix that was specified as part of the import directive, or `null` if there was no
3824 * prefix specified. 3769 * prefix specified.
3825 */ 3770 */
3826 PrefixElement _prefix; 3771 PrefixElement _prefix;
3827 3772
3828 /** 3773 /**
3829 * Initialize a newly created import element. 3774 * Initialize a newly created import element.
3830 */ 3775 */
3831 ImportElementImpl() : super.con1(null) { 3776 ImportElementImpl() : super.con1(null);
3832 }
3833 accept(ElementVisitor visitor) => visitor.visitImportElement(this); 3777 accept(ElementVisitor visitor) => visitor.visitImportElement(this);
3834 List<NamespaceCombinator> get combinators => _combinators; 3778 List<NamespaceCombinator> get combinators => _combinators;
3835 LibraryElement get importedLibrary => _importedLibrary; 3779 LibraryElement get importedLibrary => _importedLibrary;
3836 ElementKind get kind => ElementKind.IMPORT; 3780 ElementKind get kind => ElementKind.IMPORT;
3837 PrefixElement get prefix => _prefix; 3781 PrefixElement get prefix => _prefix;
3838 String get uri => _uri; 3782 String get uri => _uri;
3839 3783
3840 /** 3784 /**
3841 * Set the combinators that were specified as part of the import directive to the given array of 3785 * Set the combinators that were specified as part of the import directive to the given array of
3842 * combinators. 3786 * combinators.
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
4228 /** 4172 /**
4229 * An empty array of field elements. 4173 * An empty array of field elements.
4230 */ 4174 */
4231 static List<LocalVariableElement> EMPTY_ARRAY = new List<LocalVariableElement> (0); 4175 static List<LocalVariableElement> EMPTY_ARRAY = new List<LocalVariableElement> (0);
4232 4176
4233 /** 4177 /**
4234 * Initialize a newly created local variable element to have the given name. 4178 * Initialize a newly created local variable element to have the given name.
4235 * 4179 *
4236 * @param name the name of this element 4180 * @param name the name of this element
4237 */ 4181 */
4238 LocalVariableElementImpl(Identifier name) : super.con1(name) { 4182 LocalVariableElementImpl(Identifier name) : super.con1(name);
4239 }
4240 accept(ElementVisitor visitor) => visitor.visitLocalVariableElement(this); 4183 accept(ElementVisitor visitor) => visitor.visitLocalVariableElement(this);
4241 ElementKind get kind => ElementKind.LOCAL_VARIABLE; 4184 ElementKind get kind => ElementKind.LOCAL_VARIABLE;
4242 SourceRange get visibleRange { 4185 SourceRange get visibleRange {
4243 if (_visibleRangeLength < 0) { 4186 if (_visibleRangeLength < 0) {
4244 return null; 4187 return null;
4245 } 4188 }
4246 return new SourceRange(_visibleRangeOffset, _visibleRangeLength); 4189 return new SourceRange(_visibleRangeOffset, _visibleRangeLength);
4247 } 4190 }
4248 4191
4249 /** 4192 /**
(...skipping 25 matching lines...) Expand all
4275 /** 4218 /**
4276 * An empty array of method elements. 4219 * An empty array of method elements.
4277 */ 4220 */
4278 static List<MethodElement> EMPTY_ARRAY = new List<MethodElement>(0); 4221 static List<MethodElement> EMPTY_ARRAY = new List<MethodElement>(0);
4279 4222
4280 /** 4223 /**
4281 * Initialize a newly created method element to have the given name. 4224 * Initialize a newly created method element to have the given name.
4282 * 4225 *
4283 * @param name the name of this element 4226 * @param name the name of this element
4284 */ 4227 */
4285 MethodElementImpl.con1(Identifier name) : super.con1(name) { 4228 MethodElementImpl.con1(Identifier name) : super.con1(name);
4286 _jtd_constructor_220_impl(name);
4287 }
4288 _jtd_constructor_220_impl(Identifier name) {
4289 }
4290 4229
4291 /** 4230 /**
4292 * Initialize a newly created method element to have the given name. 4231 * Initialize a newly created method element to have the given name.
4293 * 4232 *
4294 * @param name the name of this element 4233 * @param name the name of this element
4295 * @param nameOffset the offset of the name of this element in the file that c ontains the 4234 * @param nameOffset the offset of the name of this element in the file that c ontains the
4296 * declaration of this element 4235 * declaration of this element
4297 */ 4236 */
4298 MethodElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOff set) { 4237 MethodElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOff set);
4299 _jtd_constructor_221_impl(name, nameOffset);
4300 }
4301 _jtd_constructor_221_impl(String name, int nameOffset) {
4302 }
4303 accept(ElementVisitor visitor) => visitor.visitMethodElement(this); 4238 accept(ElementVisitor visitor) => visitor.visitMethodElement(this);
4304 ClassElement get enclosingElement => super.enclosingElement as ClassElement; 4239 ClassElement get enclosingElement => super.enclosingElement as ClassElement;
4305 ElementKind get kind => ElementKind.METHOD; 4240 ElementKind get kind => ElementKind.METHOD;
4306 String get name { 4241 String get name {
4307 String name = super.name; 4242 String name = super.name;
4308 if (isOperator && name == "-") { 4243 if (isOperator && name == "-") {
4309 if (parameters.length == 0) { 4244 if (parameters.length == 0) {
4310 return "unary-"; 4245 return "unary-";
4311 } 4246 }
4312 } 4247 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
4365 static final Modifier STATIC = new Modifier('STATIC', 8); 4300 static final Modifier STATIC = new Modifier('STATIC', 8);
4366 static final Modifier SYNTHETIC = new Modifier('SYNTHETIC', 9); 4301 static final Modifier SYNTHETIC = new Modifier('SYNTHETIC', 9);
4367 static final Modifier TYPEDEF = new Modifier('TYPEDEF', 10); 4302 static final Modifier TYPEDEF = new Modifier('TYPEDEF', 10);
4368 static final List<Modifier> values = [ABSTRACT, CONST, FACTORY, FINAL, GETTER, MIXIN, REFERENCES_SUPER, SETTER, STATIC, SYNTHETIC, TYPEDEF]; 4303 static final List<Modifier> values = [ABSTRACT, CONST, FACTORY, FINAL, GETTER, MIXIN, REFERENCES_SUPER, SETTER, STATIC, SYNTHETIC, TYPEDEF];
4369 4304
4370 /// The name of this enum constant, as declared in the enum declaration. 4305 /// The name of this enum constant, as declared in the enum declaration.
4371 final String name; 4306 final String name;
4372 4307
4373 /// The position in the enum declaration. 4308 /// The position in the enum declaration.
4374 final int ordinal; 4309 final int ordinal;
4375 Modifier(this.name, this.ordinal) { 4310 Modifier(this.name, this.ordinal);
4376 }
4377 int compareTo(Modifier other) => ordinal - other.ordinal; 4311 int compareTo(Modifier other) => ordinal - other.ordinal;
4378 int get hashCode => ordinal; 4312 int get hashCode => ordinal;
4379 String toString() => name; 4313 String toString() => name;
4380 } 4314 }
4381 /** 4315 /**
4382 * Instances of the class `MultiplyDefinedElementImpl` represent a collection of elements that 4316 * Instances of the class `MultiplyDefinedElementImpl` represent a collection of elements that
4383 * have the same name within the same scope. 4317 * have the same name within the same scope.
4384 * 4318 *
4385 * @coverage dart.engine.element 4319 * @coverage dart.engine.element
4386 */ 4320 */
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
4527 /** 4461 /**
4528 * An empty array of field elements. 4462 * An empty array of field elements.
4529 */ 4463 */
4530 static List<ParameterElement> EMPTY_ARRAY = new List<ParameterElement>(0); 4464 static List<ParameterElement> EMPTY_ARRAY = new List<ParameterElement>(0);
4531 4465
4532 /** 4466 /**
4533 * Initialize a newly created parameter element to have the given name. 4467 * Initialize a newly created parameter element to have the given name.
4534 * 4468 *
4535 * @param name the name of this element 4469 * @param name the name of this element
4536 */ 4470 */
4537 ParameterElementImpl.con1(Identifier name) : super.con1(name) { 4471 ParameterElementImpl.con1(Identifier name) : super.con1(name);
4538 _jtd_constructor_224_impl(name);
4539 }
4540 _jtd_constructor_224_impl(Identifier name) {
4541 }
4542 4472
4543 /** 4473 /**
4544 * Initialize a newly created parameter element to have the given name. 4474 * Initialize a newly created parameter element to have the given name.
4545 * 4475 *
4546 * @param name the name of this element 4476 * @param name the name of this element
4547 * @param nameOffset the offset of the name of this element in the file that c ontains the 4477 * @param nameOffset the offset of the name of this element in the file that c ontains the
4548 * declaration of this element 4478 * declaration of this element
4549 */ 4479 */
4550 ParameterElementImpl.con2(String name, int nameOffset) : super.con2(name, name Offset) { 4480 ParameterElementImpl.con2(String name, int nameOffset) : super.con2(name, name Offset);
4551 _jtd_constructor_225_impl(name, nameOffset);
4552 }
4553 _jtd_constructor_225_impl(String name, int nameOffset) {
4554 }
4555 accept(ElementVisitor visitor) => visitor.visitParameterElement(this); 4481 accept(ElementVisitor visitor) => visitor.visitParameterElement(this);
4556 SourceRange get defaultValueRange { 4482 SourceRange get defaultValueRange {
4557 if (_defaultValueRangeLength < 0) { 4483 if (_defaultValueRangeLength < 0) {
4558 return null; 4484 return null;
4559 } 4485 }
4560 return new SourceRange(_defaultValueRangeOffset, _defaultValueRangeLength); 4486 return new SourceRange(_defaultValueRangeOffset, _defaultValueRangeLength);
4561 } 4487 }
4562 ElementKind get kind => ElementKind.PARAMETER; 4488 ElementKind get kind => ElementKind.PARAMETER;
4563 ParameterKind get parameterKind => _parameterKind; 4489 ParameterKind get parameterKind => _parameterKind;
4564 List<ParameterElement> get parameters => _parameters; 4490 List<ParameterElement> get parameters => _parameters;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
4655 /** 4581 /**
4656 * An empty array of prefix elements. 4582 * An empty array of prefix elements.
4657 */ 4583 */
4658 static List<PrefixElement> EMPTY_ARRAY = new List<PrefixElement>(0); 4584 static List<PrefixElement> EMPTY_ARRAY = new List<PrefixElement>(0);
4659 4585
4660 /** 4586 /**
4661 * Initialize a newly created prefix element to have the given name. 4587 * Initialize a newly created prefix element to have the given name.
4662 * 4588 *
4663 * @param name the name of this element 4589 * @param name the name of this element
4664 */ 4590 */
4665 PrefixElementImpl(Identifier name) : super.con1(name) { 4591 PrefixElementImpl(Identifier name) : super.con1(name);
4666 }
4667 accept(ElementVisitor visitor) => visitor.visitPrefixElement(this); 4592 accept(ElementVisitor visitor) => visitor.visitPrefixElement(this);
4668 LibraryElement get enclosingElement => super.enclosingElement as LibraryElemen t; 4593 LibraryElement get enclosingElement => super.enclosingElement as LibraryElemen t;
4669 List<LibraryElement> get importedLibraries => _importedLibraries; 4594 List<LibraryElement> get importedLibraries => _importedLibraries;
4670 ElementKind get kind => ElementKind.PREFIX; 4595 ElementKind get kind => ElementKind.PREFIX;
4671 4596
4672 /** 4597 /**
4673 * Set the libraries that are imported using this prefix to the given librarie s. 4598 * Set the libraries that are imported using this prefix to the given librarie s.
4674 * 4599 *
4675 * @param importedLibraries the libraries that are imported using this prefix 4600 * @param importedLibraries the libraries that are imported using this prefix
4676 */ 4601 */
(...skipping 24 matching lines...) Expand all
4701 /** 4626 /**
4702 * An empty array of property accessor elements. 4627 * An empty array of property accessor elements.
4703 */ 4628 */
4704 static List<PropertyAccessorElement> EMPTY_ARRAY = new List<PropertyAccessorEl ement>(0); 4629 static List<PropertyAccessorElement> EMPTY_ARRAY = new List<PropertyAccessorEl ement>(0);
4705 4630
4706 /** 4631 /**
4707 * Initialize a newly created property accessor element to have the given name . 4632 * Initialize a newly created property accessor element to have the given name .
4708 * 4633 *
4709 * @param name the name of this element 4634 * @param name the name of this element
4710 */ 4635 */
4711 PropertyAccessorElementImpl.con1(Identifier name) : super.con1(name) { 4636 PropertyAccessorElementImpl.con1(Identifier name) : super.con1(name);
4712 _jtd_constructor_227_impl(name);
4713 }
4714 _jtd_constructor_227_impl(Identifier name) {
4715 }
4716 4637
4717 /** 4638 /**
4718 * Initialize a newly created synthetic property accessor element to be associ ated with the given 4639 * Initialize a newly created synthetic property accessor element to be associ ated with the given
4719 * variable. 4640 * variable.
4720 * 4641 *
4721 * @param variable the variable with which this access is associated 4642 * @param variable the variable with which this access is associated
4722 */ 4643 */
4723 PropertyAccessorElementImpl.con2(PropertyInducingElementImpl variable2) : supe r.con2(variable2.name, variable2.nameOffset) { 4644 PropertyAccessorElementImpl.con2(PropertyInducingElementImpl variable) : super .con2(variable.name, variable.nameOffset) {
4724 _jtd_constructor_228_impl(variable2); 4645 this._variable = variable;
4725 }
4726 _jtd_constructor_228_impl(PropertyInducingElementImpl variable2) {
4727 this._variable = variable2;
4728 synthetic = true; 4646 synthetic = true;
4729 } 4647 }
4730 accept(ElementVisitor visitor) => visitor.visitPropertyAccessorElement(this); 4648 accept(ElementVisitor visitor) => visitor.visitPropertyAccessorElement(this);
4731 bool operator ==(Object object) => super == object && identical(isGetter, ((ob ject as PropertyAccessorElement)).isGetter); 4649 bool operator ==(Object object) => super == object && identical(isGetter, ((ob ject as PropertyAccessorElement)).isGetter);
4732 PropertyAccessorElement get correspondingGetter { 4650 PropertyAccessorElement get correspondingGetter {
4733 if (isGetter || _variable == null) { 4651 if (isGetter || _variable == null) {
4734 return null; 4652 return null;
4735 } 4653 }
4736 return _variable.getter; 4654 return _variable.getter;
4737 } 4655 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
4831 /** 4749 /**
4832 * An empty array of elements. 4750 * An empty array of elements.
4833 */ 4751 */
4834 static List<PropertyInducingElement> EMPTY_ARRAY = new List<PropertyInducingEl ement>(0); 4752 static List<PropertyInducingElement> EMPTY_ARRAY = new List<PropertyInducingEl ement>(0);
4835 4753
4836 /** 4754 /**
4837 * Initialize a newly created element to have the given name. 4755 * Initialize a newly created element to have the given name.
4838 * 4756 *
4839 * @param name the name of this element 4757 * @param name the name of this element
4840 */ 4758 */
4841 PropertyInducingElementImpl.con1(Identifier name) : super.con1(name) { 4759 PropertyInducingElementImpl.con1(Identifier name) : super.con1(name);
4842 _jtd_constructor_229_impl(name);
4843 }
4844 _jtd_constructor_229_impl(Identifier name) {
4845 }
4846 4760
4847 /** 4761 /**
4848 * Initialize a newly created synthetic element to have the given name. 4762 * Initialize a newly created synthetic element to have the given name.
4849 * 4763 *
4850 * @param name the name of this element 4764 * @param name the name of this element
4851 */ 4765 */
4852 PropertyInducingElementImpl.con2(String name) : super.con2(name, -1) { 4766 PropertyInducingElementImpl.con2(String name) : super.con2(name, -1) {
4853 _jtd_constructor_230_impl(name);
4854 }
4855 _jtd_constructor_230_impl(String name) {
4856 synthetic = true; 4767 synthetic = true;
4857 } 4768 }
4858 PropertyAccessorElement get getter => _getter; 4769 PropertyAccessorElement get getter => _getter;
4859 PropertyAccessorElement get setter => _setter; 4770 PropertyAccessorElement get setter => _setter;
4860 4771
4861 /** 4772 /**
4862 * Set the getter associated with this element to the given accessor. 4773 * Set the getter associated with this element to the given accessor.
4863 * 4774 *
4864 * @param getter the getter associated with this element 4775 * @param getter the getter associated with this element
4865 */ 4776 */
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
4924 /** 4835 /**
4925 * An empty array of top-level variable elements. 4836 * An empty array of top-level variable elements.
4926 */ 4837 */
4927 static List<TopLevelVariableElement> EMPTY_ARRAY = new List<TopLevelVariableEl ement>(0); 4838 static List<TopLevelVariableElement> EMPTY_ARRAY = new List<TopLevelVariableEl ement>(0);
4928 4839
4929 /** 4840 /**
4930 * Initialize a newly created top-level variable element to have the given nam e. 4841 * Initialize a newly created top-level variable element to have the given nam e.
4931 * 4842 *
4932 * @param name the name of this element 4843 * @param name the name of this element
4933 */ 4844 */
4934 TopLevelVariableElementImpl.con1(Identifier name) : super.con1(name) { 4845 TopLevelVariableElementImpl.con1(Identifier name) : super.con1(name);
4935 _jtd_constructor_232_impl(name);
4936 }
4937 _jtd_constructor_232_impl(Identifier name) {
4938 }
4939 4846
4940 /** 4847 /**
4941 * Initialize a newly created synthetic top-level variable element to have the given name. 4848 * Initialize a newly created synthetic top-level variable element to have the given name.
4942 * 4849 *
4943 * @param name the name of this element 4850 * @param name the name of this element
4944 */ 4851 */
4945 TopLevelVariableElementImpl.con2(String name) : super.con2(name) { 4852 TopLevelVariableElementImpl.con2(String name) : super.con2(name);
4946 _jtd_constructor_233_impl(name);
4947 }
4948 _jtd_constructor_233_impl(String name) {
4949 }
4950 accept(ElementVisitor visitor) => visitor.visitTopLevelVariableElement(this); 4853 accept(ElementVisitor visitor) => visitor.visitTopLevelVariableElement(this);
4951 ElementKind get kind => ElementKind.TOP_LEVEL_VARIABLE; 4854 ElementKind get kind => ElementKind.TOP_LEVEL_VARIABLE;
4952 bool get isStatic => true; 4855 bool get isStatic => true;
4953 } 4856 }
4954 /** 4857 /**
4955 * Instances of the class `TypeVariableElementImpl` implement a `TypeVariableEle ment`. 4858 * Instances of the class `TypeVariableElementImpl` implement a `TypeVariableEle ment`.
4956 * 4859 *
4957 * @coverage dart.engine.element 4860 * @coverage dart.engine.element
4958 */ 4861 */
4959 class TypeVariableElementImpl extends ElementImpl implements TypeVariableElement { 4862 class TypeVariableElementImpl extends ElementImpl implements TypeVariableElement {
(...skipping 12 matching lines...) Expand all
4972 /** 4875 /**
4973 * An empty array of type variable elements. 4876 * An empty array of type variable elements.
4974 */ 4877 */
4975 static List<TypeVariableElement> EMPTY_ARRAY = new List<TypeVariableElement>(0 ); 4878 static List<TypeVariableElement> EMPTY_ARRAY = new List<TypeVariableElement>(0 );
4976 4879
4977 /** 4880 /**
4978 * Initialize a newly created type variable element to have the given name. 4881 * Initialize a newly created type variable element to have the given name.
4979 * 4882 *
4980 * @param name the name of this element 4883 * @param name the name of this element
4981 */ 4884 */
4982 TypeVariableElementImpl(Identifier name) : super.con1(name) { 4885 TypeVariableElementImpl(Identifier name) : super.con1(name);
4983 }
4984 accept(ElementVisitor visitor) => visitor.visitTypeVariableElement(this); 4886 accept(ElementVisitor visitor) => visitor.visitTypeVariableElement(this);
4985 Type2 get bound => _bound; 4887 Type2 get bound => _bound;
4986 ElementKind get kind => ElementKind.TYPE_VARIABLE; 4888 ElementKind get kind => ElementKind.TYPE_VARIABLE;
4987 TypeVariableType get type => _type; 4889 TypeVariableType get type => _type;
4988 4890
4989 /** 4891 /**
4990 * Set the type representing the bound associated with this variable to the gi ven type. 4892 * Set the type representing the bound associated with this variable to the gi ven type.
4991 * 4893 *
4992 * @param bound the type representing the bound associated with this variable 4894 * @param bound the type representing the bound associated with this variable
4993 */ 4895 */
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
5032 /** 4934 /**
5033 * An empty array of variable elements. 4935 * An empty array of variable elements.
5034 */ 4936 */
5035 static List<VariableElement> EMPTY_ARRAY = new List<VariableElement>(0); 4937 static List<VariableElement> EMPTY_ARRAY = new List<VariableElement>(0);
5036 4938
5037 /** 4939 /**
5038 * Initialize a newly created variable element to have the given name. 4940 * Initialize a newly created variable element to have the given name.
5039 * 4941 *
5040 * @param name the name of this element 4942 * @param name the name of this element
5041 */ 4943 */
5042 VariableElementImpl.con1(Identifier name) : super.con1(name) { 4944 VariableElementImpl.con1(Identifier name) : super.con1(name);
5043 _jtd_constructor_235_impl(name);
5044 }
5045 _jtd_constructor_235_impl(Identifier name) {
5046 }
5047 4945
5048 /** 4946 /**
5049 * Initialize a newly created variable element to have the given name. 4947 * Initialize a newly created variable element to have the given name.
5050 * 4948 *
5051 * @param name the name of this element 4949 * @param name the name of this element
5052 * @param nameOffset the offset of the name of this element in the file that c ontains the 4950 * @param nameOffset the offset of the name of this element in the file that c ontains the
5053 * declaration of this element 4951 * declaration of this element
5054 */ 4952 */
5055 VariableElementImpl.con2(String name, int nameOffset) : super.con2(name, nameO ffset) { 4953 VariableElementImpl.con2(String name, int nameOffset) : super.con2(name, nameO ffset);
5056 _jtd_constructor_236_impl(name, nameOffset);
5057 }
5058 _jtd_constructor_236_impl(String name, int nameOffset) {
5059 }
5060 4954
5061 /** 4955 /**
5062 * Return the result of evaluating this variable's initializer as a compile-ti me constant 4956 * Return the result of evaluating this variable's initializer as a compile-ti me constant
5063 * expression, or `null` if this variable is not a 'const' variable or does no t have an 4957 * expression, or `null` if this variable is not a 'const' variable or does no t have an
5064 * initializer. 4958 * initializer.
5065 * 4959 *
5066 * @return the result of evaluating this variable's initializer 4960 * @return the result of evaluating this variable's initializer
5067 */ 4961 */
5068 EvaluationResultImpl get evaluationResult => null; 4962 EvaluationResultImpl get evaluationResult => null;
5069 FunctionElement get initializer => _initializer; 4963 FunctionElement get initializer => _initializer;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
5159 } 5053 }
5160 return new ConstructorMember(baseConstructor, definingType); 5054 return new ConstructorMember(baseConstructor, definingType);
5161 } 5055 }
5162 5056
5163 /** 5057 /**
5164 * Initialize a newly created element to represent a constructor of the given parameterized type. 5058 * Initialize a newly created element to represent a constructor of the given parameterized type.
5165 * 5059 *
5166 * @param baseElement the element on which the parameterized element was creat ed 5060 * @param baseElement the element on which the parameterized element was creat ed
5167 * @param definingType the type in which the element is defined 5061 * @param definingType the type in which the element is defined
5168 */ 5062 */
5169 ConstructorMember(ConstructorElement baseElement, InterfaceType definingType) : super(baseElement, definingType) { 5063 ConstructorMember(ConstructorElement baseElement, InterfaceType definingType) : super(baseElement, definingType);
5170 }
5171 accept(ElementVisitor visitor) => visitor.visitConstructorElement(this); 5064 accept(ElementVisitor visitor) => visitor.visitConstructorElement(this);
5172 ConstructorElement get baseElement => super.baseElement as ConstructorElement; 5065 ConstructorElement get baseElement => super.baseElement as ConstructorElement;
5173 ClassElement get enclosingElement => baseElement.enclosingElement; 5066 ClassElement get enclosingElement => baseElement.enclosingElement;
5174 ConstructorElement get redirectedConstructor => from(baseElement.redirectedCon structor, definingType); 5067 ConstructorElement get redirectedConstructor => from(baseElement.redirectedCon structor, definingType);
5175 bool get isConst => baseElement.isConst; 5068 bool get isConst => baseElement.isConst;
5176 bool get isDefaultConstructor => baseElement.isDefaultConstructor; 5069 bool get isDefaultConstructor => baseElement.isDefaultConstructor;
5177 bool get isFactory => baseElement.isFactory; 5070 bool get isFactory => baseElement.isFactory;
5178 String toString() { 5071 String toString() {
5179 ConstructorElement baseElement = this.baseElement; 5072 ConstructorElement baseElement = this.baseElement;
5180 List<ParameterElement> parameters = this.parameters; 5073 List<ParameterElement> parameters = this.parameters;
(...skipping 29 matching lines...) Expand all
5210 */ 5103 */
5211 abstract class ExecutableMember extends Member implements ExecutableElement { 5104 abstract class ExecutableMember extends Member implements ExecutableElement {
5212 5105
5213 /** 5106 /**
5214 * Initialize a newly created element to represent an executable element of th e given 5107 * Initialize a newly created element to represent an executable element of th e given
5215 * parameterized type. 5108 * parameterized type.
5216 * 5109 *
5217 * @param baseElement the element on which the parameterized element was creat ed 5110 * @param baseElement the element on which the parameterized element was creat ed
5218 * @param definingType the type in which the element is defined 5111 * @param definingType the type in which the element is defined
5219 */ 5112 */
5220 ExecutableMember(ExecutableElement baseElement, InterfaceType definingType) : super(baseElement, definingType) { 5113 ExecutableMember(ExecutableElement baseElement, InterfaceType definingType) : super(baseElement, definingType);
5221 }
5222 ExecutableElement get baseElement => super.baseElement as ExecutableElement; 5114 ExecutableElement get baseElement => super.baseElement as ExecutableElement;
5223 List<FunctionElement> get functions { 5115 List<FunctionElement> get functions {
5224 throw new UnsupportedOperationException(); 5116 throw new UnsupportedOperationException();
5225 } 5117 }
5226 List<LabelElement> get labels => baseElement.labels; 5118 List<LabelElement> get labels => baseElement.labels;
5227 List<LocalVariableElement> get localVariables { 5119 List<LocalVariableElement> get localVariables {
5228 throw new UnsupportedOperationException(); 5120 throw new UnsupportedOperationException();
5229 } 5121 }
5230 List<ParameterElement> get parameters { 5122 List<ParameterElement> get parameters {
5231 List<ParameterElement> baseParameters = baseElement.parameters; 5123 List<ParameterElement> baseParameters = baseElement.parameters;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
5284 } 5176 }
5285 return new FieldMember(baseField, definingType); 5177 return new FieldMember(baseField, definingType);
5286 } 5178 }
5287 5179
5288 /** 5180 /**
5289 * Initialize a newly created element to represent a field of the given parame terized type. 5181 * Initialize a newly created element to represent a field of the given parame terized type.
5290 * 5182 *
5291 * @param baseElement the element on which the parameterized element was creat ed 5183 * @param baseElement the element on which the parameterized element was creat ed
5292 * @param definingType the type in which the element is defined 5184 * @param definingType the type in which the element is defined
5293 */ 5185 */
5294 FieldMember(FieldElement baseElement, InterfaceType definingType) : super(base Element, definingType) { 5186 FieldMember(FieldElement baseElement, InterfaceType definingType) : super(base Element, definingType);
5295 }
5296 accept(ElementVisitor visitor) => visitor.visitFieldElement(this); 5187 accept(ElementVisitor visitor) => visitor.visitFieldElement(this);
5297 FieldElement get baseElement => super.baseElement as FieldElement; 5188 FieldElement get baseElement => super.baseElement as FieldElement;
5298 ClassElement get enclosingElement => baseElement.enclosingElement; 5189 ClassElement get enclosingElement => baseElement.enclosingElement;
5299 PropertyAccessorElement get getter => PropertyAccessorMember.from(baseElement. getter, definingType); 5190 PropertyAccessorElement get getter => PropertyAccessorMember.from(baseElement. getter, definingType);
5300 PropertyAccessorElement get setter => PropertyAccessorMember.from(baseElement. setter, definingType); 5191 PropertyAccessorElement get setter => PropertyAccessorMember.from(baseElement. setter, definingType);
5301 bool get isStatic => baseElement.isStatic; 5192 bool get isStatic => baseElement.isStatic;
5302 InterfaceType get definingType => super.definingType as InterfaceType; 5193 InterfaceType get definingType => super.definingType as InterfaceType;
5303 } 5194 }
5304 /** 5195 /**
5305 * The abstract class `Member` defines the behavior common to elements that repr esent members 5196 * The abstract class `Member` defines the behavior common to elements that repr esent members
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
5442 } 5333 }
5443 return new MethodMember(baseMethod, definingType); 5334 return new MethodMember(baseMethod, definingType);
5444 } 5335 }
5445 5336
5446 /** 5337 /**
5447 * Initialize a newly created element to represent a method of the given param eterized type. 5338 * Initialize a newly created element to represent a method of the given param eterized type.
5448 * 5339 *
5449 * @param baseElement the element on which the parameterized element was creat ed 5340 * @param baseElement the element on which the parameterized element was creat ed
5450 * @param definingType the type in which the element is defined 5341 * @param definingType the type in which the element is defined
5451 */ 5342 */
5452 MethodMember(MethodElement baseElement, InterfaceType definingType) : super(ba seElement, definingType) { 5343 MethodMember(MethodElement baseElement, InterfaceType definingType) : super(ba seElement, definingType);
5453 }
5454 accept(ElementVisitor visitor) => visitor.visitMethodElement(this); 5344 accept(ElementVisitor visitor) => visitor.visitMethodElement(this);
5455 MethodElement get baseElement => super.baseElement as MethodElement; 5345 MethodElement get baseElement => super.baseElement as MethodElement;
5456 ClassElement get enclosingElement => baseElement.enclosingElement; 5346 ClassElement get enclosingElement => baseElement.enclosingElement;
5457 bool get isAbstract => baseElement.isAbstract; 5347 bool get isAbstract => baseElement.isAbstract;
5458 String toString() { 5348 String toString() {
5459 MethodElement baseElement = this.baseElement; 5349 MethodElement baseElement = this.baseElement;
5460 List<ParameterElement> parameters = this.parameters; 5350 List<ParameterElement> parameters = this.parameters;
5461 FunctionType type = this.type; 5351 FunctionType type = this.type;
5462 JavaStringBuilder builder = new JavaStringBuilder(); 5352 JavaStringBuilder builder = new JavaStringBuilder();
5463 builder.append(baseElement.enclosingElement.displayName); 5353 builder.append(baseElement.enclosingElement.displayName);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
5509 } 5399 }
5510 return new ParameterMember(baseParameter, definingType); 5400 return new ParameterMember(baseParameter, definingType);
5511 } 5401 }
5512 5402
5513 /** 5403 /**
5514 * Initialize a newly created element to represent a parameter of the given pa rameterized type. 5404 * Initialize a newly created element to represent a parameter of the given pa rameterized type.
5515 * 5405 *
5516 * @param baseElement the element on which the parameterized element was creat ed 5406 * @param baseElement the element on which the parameterized element was creat ed
5517 * @param definingType the type in which the element is defined 5407 * @param definingType the type in which the element is defined
5518 */ 5408 */
5519 ParameterMember(ParameterElement baseElement, ParameterizedType definingType) : super(baseElement, definingType) { 5409 ParameterMember(ParameterElement baseElement, ParameterizedType definingType) : super(baseElement, definingType);
5520 }
5521 accept(ElementVisitor visitor) => visitor.visitParameterElement(this); 5410 accept(ElementVisitor visitor) => visitor.visitParameterElement(this);
5522 Element getAncestor(Type elementClass) { 5411 Element getAncestor(Type elementClass) {
5523 Element element = baseElement.getAncestor(elementClass); 5412 Element element = baseElement.getAncestor(elementClass);
5524 ParameterizedType definingType = this.definingType; 5413 ParameterizedType definingType = this.definingType;
5525 if (definingType is InterfaceType) { 5414 if (definingType is InterfaceType) {
5526 InterfaceType definingInterfaceType = definingType as InterfaceType; 5415 InterfaceType definingInterfaceType = definingType as InterfaceType;
5527 if (element is ConstructorElement) { 5416 if (element is ConstructorElement) {
5528 return ConstructorMember.from((element as ConstructorElement), definingI nterfaceType) as Element; 5417 return ConstructorMember.from((element as ConstructorElement), definingI nterfaceType) as Element;
5529 } else if (element is MethodElement) { 5418 } else if (element is MethodElement) {
5530 return MethodMember.from((element as MethodElement), definingInterfaceTy pe) as Element; 5419 return MethodMember.from((element as MethodElement), definingInterfaceTy pe) as Element;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
5610 return new PropertyAccessorMember(baseAccessor, definingType); 5499 return new PropertyAccessorMember(baseAccessor, definingType);
5611 } 5500 }
5612 5501
5613 /** 5502 /**
5614 * Initialize a newly created element to represent a property accessor of the given parameterized 5503 * Initialize a newly created element to represent a property accessor of the given parameterized
5615 * type. 5504 * type.
5616 * 5505 *
5617 * @param baseElement the element on which the parameterized element was creat ed 5506 * @param baseElement the element on which the parameterized element was creat ed
5618 * @param definingType the type in which the element is defined 5507 * @param definingType the type in which the element is defined
5619 */ 5508 */
5620 PropertyAccessorMember(PropertyAccessorElement baseElement, InterfaceType defi ningType) : super(baseElement, definingType) { 5509 PropertyAccessorMember(PropertyAccessorElement baseElement, InterfaceType defi ningType) : super(baseElement, definingType);
5621 }
5622 accept(ElementVisitor visitor) => visitor.visitPropertyAccessorElement(this); 5510 accept(ElementVisitor visitor) => visitor.visitPropertyAccessorElement(this);
5623 PropertyAccessorElement get baseElement => super.baseElement as PropertyAccess orElement; 5511 PropertyAccessorElement get baseElement => super.baseElement as PropertyAccess orElement;
5624 PropertyAccessorElement get correspondingGetter => from(baseElement.correspond ingGetter, definingType); 5512 PropertyAccessorElement get correspondingGetter => from(baseElement.correspond ingGetter, definingType);
5625 PropertyAccessorElement get correspondingSetter => from(baseElement.correspond ingSetter, definingType); 5513 PropertyAccessorElement get correspondingSetter => from(baseElement.correspond ingSetter, definingType);
5626 Element get enclosingElement => baseElement.enclosingElement; 5514 Element get enclosingElement => baseElement.enclosingElement;
5627 PropertyInducingElement get variable { 5515 PropertyInducingElement get variable {
5628 PropertyInducingElement variable = baseElement.variable; 5516 PropertyInducingElement variable = baseElement.variable;
5629 if (variable is FieldElement) { 5517 if (variable is FieldElement) {
5630 return FieldMember.from(((variable as FieldElement)), definingType); 5518 return FieldMember.from(((variable as FieldElement)), definingType);
5631 } 5519 }
(...skipping 11 matching lines...) Expand all
5643 */ 5531 */
5644 abstract class VariableMember extends Member implements VariableElement { 5532 abstract class VariableMember extends Member implements VariableElement {
5645 5533
5646 /** 5534 /**
5647 * Initialize a newly created element to represent an executable element of th e given 5535 * Initialize a newly created element to represent an executable element of th e given
5648 * parameterized type. 5536 * parameterized type.
5649 * 5537 *
5650 * @param baseElement the element on which the parameterized element was creat ed 5538 * @param baseElement the element on which the parameterized element was creat ed
5651 * @param definingType the type in which the element is defined 5539 * @param definingType the type in which the element is defined
5652 */ 5540 */
5653 VariableMember(VariableElement baseElement, ParameterizedType definingType) : super(baseElement, definingType) { 5541 VariableMember(VariableElement baseElement, ParameterizedType definingType) : super(baseElement, definingType);
5654 }
5655 VariableElement get baseElement => super.baseElement as VariableElement; 5542 VariableElement get baseElement => super.baseElement as VariableElement;
5656 FunctionElement get initializer { 5543 FunctionElement get initializer {
5657 throw new UnsupportedOperationException(); 5544 throw new UnsupportedOperationException();
5658 } 5545 }
5659 Type2 get type => substituteFor(baseElement.type); 5546 Type2 get type => substituteFor(baseElement.type);
5660 bool get isConst => baseElement.isConst; 5547 bool get isConst => baseElement.isConst;
5661 bool get isFinal => baseElement.isFinal; 5548 bool get isFinal => baseElement.isFinal;
5662 void visitChildren(ElementVisitor<Object> visitor) { 5549 void visitChildren(ElementVisitor<Object> visitor) {
5663 super.visitChildren(visitor); 5550 super.visitChildren(visitor);
5664 safelyVisitChild(baseElement.initializer, visitor); 5551 safelyVisitChild(baseElement.initializer, visitor);
(...skipping 14 matching lines...) Expand all
5679 /** 5566 /**
5680 * Return the unique instance of this class. 5567 * Return the unique instance of this class.
5681 * 5568 *
5682 * @return the unique instance of this class 5569 * @return the unique instance of this class
5683 */ 5570 */
5684 static BottomTypeImpl get instance => _INSTANCE; 5571 static BottomTypeImpl get instance => _INSTANCE;
5685 5572
5686 /** 5573 /**
5687 * Prevent the creation of instances of this class. 5574 * Prevent the creation of instances of this class.
5688 */ 5575 */
5689 BottomTypeImpl() : super(null, "<bottom>") { 5576 BottomTypeImpl() : super(null, "<bottom>");
5690 }
5691 bool operator ==(Object object) => identical(object, this); 5577 bool operator ==(Object object) => identical(object, this);
5692 bool isMoreSpecificThan(Type2 type) => true; 5578 bool isMoreSpecificThan(Type2 type) => true;
5693 bool isSubtypeOf(Type2 type) => true; 5579 bool isSubtypeOf(Type2 type) => true;
5694 bool isSupertypeOf(Type2 type) => false; 5580 bool isSupertypeOf(Type2 type) => false;
5695 BottomTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterTyp es) => this; 5581 BottomTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterTyp es) => this;
5696 } 5582 }
5697 /** 5583 /**
5698 * The unique instance of the class `DynamicTypeImpl` implements the type `dynam ic`. 5584 * The unique instance of the class `DynamicTypeImpl` implements the type `dynam ic`.
5699 * 5585 *
5700 * @coverage dart.engine.type 5586 * @coverage dart.engine.type
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
5772 * An array containing the actual types of the type arguments. 5658 * An array containing the actual types of the type arguments.
5773 */ 5659 */
5774 List<Type2> _typeArguments = TypeImpl.EMPTY_ARRAY; 5660 List<Type2> _typeArguments = TypeImpl.EMPTY_ARRAY;
5775 5661
5776 /** 5662 /**
5777 * Initialize a newly created function type to be declared by the given elemen t and to have the 5663 * Initialize a newly created function type to be declared by the given elemen t and to have the
5778 * given name. 5664 * given name.
5779 * 5665 *
5780 * @param element the element representing the declaration of the function typ e 5666 * @param element the element representing the declaration of the function typ e
5781 */ 5667 */
5782 FunctionTypeImpl.con1(ExecutableElement element) : super(element, element == n ull ? null : element.name) { 5668 FunctionTypeImpl.con1(ExecutableElement element) : super(element, element == n ull ? null : element.name);
5783 _jtd_constructor_302_impl(element);
5784 }
5785 _jtd_constructor_302_impl(ExecutableElement element) {
5786 }
5787 5669
5788 /** 5670 /**
5789 * Initialize a newly created function type to be declared by the given elemen t and to have the 5671 * Initialize a newly created function type to be declared by the given elemen t and to have the
5790 * given name. 5672 * given name.
5791 * 5673 *
5792 * @param element the element representing the declaration of the function typ e 5674 * @param element the element representing the declaration of the function typ e
5793 */ 5675 */
5794 FunctionTypeImpl.con2(FunctionTypeAliasElement element) : super(element, eleme nt == null ? null : element.name) { 5676 FunctionTypeImpl.con2(FunctionTypeAliasElement element) : super(element, eleme nt == null ? null : element.name);
5795 _jtd_constructor_303_impl(element);
5796 }
5797 _jtd_constructor_303_impl(FunctionTypeAliasElement element) {
5798 }
5799 bool operator ==(Object object) { 5677 bool operator ==(Object object) {
5800 if (object is! FunctionTypeImpl) { 5678 if (object is! FunctionTypeImpl) {
5801 return false; 5679 return false;
5802 } 5680 }
5803 FunctionTypeImpl otherType = object as FunctionTypeImpl; 5681 FunctionTypeImpl otherType = object as FunctionTypeImpl;
5804 return element == otherType.element && JavaArrays.equals(normalParameterType s, otherType.normalParameterTypes) && JavaArrays.equals(optionalParameterTypes, otherType.optionalParameterTypes) && equals2(namedParameterTypes, otherType.name dParameterTypes) && returnType == otherType.returnType; 5682 return element == otherType.element && JavaArrays.equals(normalParameterType s, otherType.normalParameterTypes) && JavaArrays.equals(optionalParameterTypes, otherType.optionalParameterTypes) && equals2(namedParameterTypes, otherType.name dParameterTypes) && returnType == otherType.returnType;
5805 } 5683 }
5806 String get displayName { 5684 String get displayName {
5807 String name = this.name; 5685 String name = this.name;
5808 if (name == null) { 5686 if (name == null) {
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
6306 /** 6184 /**
6307 * An array containing the actual types of the type arguments. 6185 * An array containing the actual types of the type arguments.
6308 */ 6186 */
6309 List<Type2> _typeArguments = TypeImpl.EMPTY_ARRAY; 6187 List<Type2> _typeArguments = TypeImpl.EMPTY_ARRAY;
6310 6188
6311 /** 6189 /**
6312 * Initialize a newly created type to be declared by the given element. 6190 * Initialize a newly created type to be declared by the given element.
6313 * 6191 *
6314 * @param element the element representing the declaration of the type 6192 * @param element the element representing the declaration of the type
6315 */ 6193 */
6316 InterfaceTypeImpl.con1(ClassElement element) : super(element, element.displayN ame) { 6194 InterfaceTypeImpl.con1(ClassElement element) : super(element, element.displayN ame);
6317 _jtd_constructor_304_impl(element);
6318 }
6319 _jtd_constructor_304_impl(ClassElement element) {
6320 }
6321 6195
6322 /** 6196 /**
6323 * Initialize a newly created type to have the given name. This constructor sh ould only be used in 6197 * Initialize a newly created type to have the given name. This constructor sh ould only be used in
6324 * cases where there is no declaration of the type. 6198 * cases where there is no declaration of the type.
6325 * 6199 *
6326 * @param name the name of the type 6200 * @param name the name of the type
6327 */ 6201 */
6328 InterfaceTypeImpl.con2(String name) : super(null, name) { 6202 InterfaceTypeImpl.con2(String name) : super(null, name);
6329 _jtd_constructor_305_impl(name);
6330 }
6331 _jtd_constructor_305_impl(String name) {
6332 }
6333 bool operator ==(Object object) { 6203 bool operator ==(Object object) {
6334 if (object is! InterfaceTypeImpl) { 6204 if (object is! InterfaceTypeImpl) {
6335 return false; 6205 return false;
6336 } 6206 }
6337 InterfaceTypeImpl otherType = object as InterfaceTypeImpl; 6207 InterfaceTypeImpl otherType = object as InterfaceTypeImpl;
6338 return element == otherType.element && JavaArrays.equals(_typeArguments, oth erType._typeArguments); 6208 return element == otherType.element && JavaArrays.equals(_typeArguments, oth erType._typeArguments);
6339 } 6209 }
6340 List<PropertyAccessorElement> get accessors { 6210 List<PropertyAccessorElement> get accessors {
6341 List<PropertyAccessorElement> accessors = element.accessors; 6211 List<PropertyAccessorElement> accessors = element.accessors;
6342 List<PropertyAccessorElement> members = new List<PropertyAccessorElement>(ac cessors.length); 6212 List<PropertyAccessorElement> members = new List<PropertyAccessorElement>(ac cessors.length);
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
6856 } 6726 }
6857 return types; 6727 return types;
6858 } 6728 }
6859 6729
6860 /** 6730 /**
6861 * Initialize a newly created type variable to be declared by the given elemen t and to have the 6731 * Initialize a newly created type variable to be declared by the given elemen t and to have the
6862 * given name. 6732 * given name.
6863 * 6733 *
6864 * @param element the element representing the declaration of the type variabl e 6734 * @param element the element representing the declaration of the type variabl e
6865 */ 6735 */
6866 TypeVariableTypeImpl(TypeVariableElement element) : super(element, element.nam e) { 6736 TypeVariableTypeImpl(TypeVariableElement element) : super(element, element.nam e);
6867 }
6868 bool operator ==(Object object) => object is TypeVariableTypeImpl && element = = ((object as TypeVariableTypeImpl)).element; 6737 bool operator ==(Object object) => object is TypeVariableTypeImpl && element = = ((object as TypeVariableTypeImpl)).element;
6869 TypeVariableElement get element => super.element as TypeVariableElement; 6738 TypeVariableElement get element => super.element as TypeVariableElement;
6870 int get hashCode => element.hashCode; 6739 int get hashCode => element.hashCode;
6871 bool isMoreSpecificThan(Type2 type) { 6740 bool isMoreSpecificThan(Type2 type) {
6872 Type2 upperBound = element.bound; 6741 Type2 upperBound = element.bound;
6873 return type == upperBound; 6742 return type == upperBound;
6874 } 6743 }
6875 bool isSubtypeOf(Type2 type) => true; 6744 bool isSubtypeOf(Type2 type) => true;
6876 Type2 substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes) { 6745 Type2 substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes) {
6877 int length = parameterTypes.length; 6746 int length = parameterTypes.length;
(...skipping 20 matching lines...) Expand all
6898 /** 6767 /**
6899 * Return the unique instance of this class. 6768 * Return the unique instance of this class.
6900 * 6769 *
6901 * @return the unique instance of this class 6770 * @return the unique instance of this class
6902 */ 6771 */
6903 static VoidTypeImpl get instance => _INSTANCE; 6772 static VoidTypeImpl get instance => _INSTANCE;
6904 6773
6905 /** 6774 /**
6906 * Prevent the creation of instances of this class. 6775 * Prevent the creation of instances of this class.
6907 */ 6776 */
6908 VoidTypeImpl() : super(null, Keyword.VOID.syntax) { 6777 VoidTypeImpl() : super(null, Keyword.VOID.syntax);
6909 }
6910 bool operator ==(Object object) => identical(object, this); 6778 bool operator ==(Object object) => identical(object, this);
6911 bool isSubtypeOf(Type2 type) => identical(type, this) || identical(type, Dynam icTypeImpl.instance); 6779 bool isSubtypeOf(Type2 type) => identical(type, this) || identical(type, Dynam icTypeImpl.instance);
6912 bool get isVoid => true; 6780 bool get isVoid => true;
6913 VoidTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes ) => this; 6781 VoidTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes ) => this;
6914 } 6782 }
6915 /** 6783 /**
6916 * The interface `FunctionType` defines the behavior common to objects represent ing the type 6784 * The interface `FunctionType` defines the behavior common to objects represent ing the type
6917 * of a function, method, constructor, getter, or setter. Function types come in three variations: 6785 * of a function, method, constructor, getter, or setter. Function types come in three variations:
6918 * <ol> 6786 * <ol>
6919 * * The types of functions that only have required parameters. These have the g eneral form 6787 * * The types of functions that only have required parameters. These have the g eneral form
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
7510 } 7378 }
7511 /** 7379 /**
7512 * The interface `VoidType` defines the behavior of the unique object representi ng the type 7380 * The interface `VoidType` defines the behavior of the unique object representi ng the type
7513 * `void`. 7381 * `void`.
7514 * 7382 *
7515 * @coverage dart.engine.type 7383 * @coverage dart.engine.type
7516 */ 7384 */
7517 abstract class VoidType implements Type2 { 7385 abstract class VoidType implements Type2 {
7518 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); 7386 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes);
7519 } 7387 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698