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

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

Issue 839913002: Validate incremental resolutions results if requested. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 3454 matching lines...) Expand 10 before | Expand all | Expand 10 after
3465 * element structure. 3465 * element structure.
3466 */ 3466 */
3467 ElementImpl _enclosingElement; 3467 ElementImpl _enclosingElement;
3468 3468
3469 /** 3469 /**
3470 * The name of this element. 3470 * The name of this element.
3471 */ 3471 */
3472 String _name; 3472 String _name;
3473 3473
3474 /** 3474 /**
3475 * The offset of the name of this element in the file that contains the declar ation of this 3475 * The offset of the name of this element in the file that contains the
3476 * element. 3476 * declaration of this element.
3477 */ 3477 */
3478 int nameOffset = 0; 3478 int _nameOffset = 0;
3479 3479
3480 /** 3480 /**
3481 * A bit-encoded form of the modifiers associated with this element. 3481 * A bit-encoded form of the modifiers associated with this element.
3482 */ 3482 */
3483 int _modifiers = 0; 3483 int _modifiers = 0;
3484 3484
3485 /** 3485 /**
3486 * An array containing all of the metadata associated with this element. 3486 * An array containing all of the metadata associated with this element.
3487 */ 3487 */
3488 List<ElementAnnotation> metadata = ElementAnnotationImpl.EMPTY_ARRAY; 3488 List<ElementAnnotation> metadata = ElementAnnotationImpl.EMPTY_ARRAY;
(...skipping 15 matching lines...) Expand all
3504 */ 3504 */
3505 final IntSet users = new IntSet(); 3505 final IntSet users = new IntSet();
3506 3506
3507 /** 3507 /**
3508 * Initialize a newly created element to have the given name. 3508 * Initialize a newly created element to have the given name.
3509 * 3509 *
3510 * @param name the name of this element 3510 * @param name the name of this element
3511 * @param nameOffset the offset of the name of this element in the file that c ontains the 3511 * @param nameOffset the offset of the name of this element in the file that c ontains the
3512 * declaration of this element 3512 * declaration of this element
3513 */ 3513 */
3514 ElementImpl(String name, this.nameOffset) { 3514 ElementImpl(String name, this._nameOffset) {
3515 this._name = StringUtilities.intern(name); 3515 this._name = StringUtilities.intern(name);
3516 } 3516 }
3517 3517
3518 /** 3518 /**
3519 * Initialize a newly created element to have the given name. 3519 * Initialize a newly created element to have the given name.
3520 * 3520 *
3521 * @param name the name of this element 3521 * @param name the name of this element
3522 */ 3522 */
3523 ElementImpl.forNode(Identifier name) 3523 ElementImpl.forNode(Identifier name)
3524 : this(name == null ? "" : name.name, name == null ? -1 : name.offset); 3524 : this(name == null ? "" : name.name, name == null ? -1 : name.offset);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 3621
3622 @override 3622 @override
3623 String get name => _name; 3623 String get name => _name;
3624 3624
3625 void set name(String name) { 3625 void set name(String name) {
3626 this._name = name; 3626 this._name = name;
3627 _cachedLocation = null; 3627 _cachedLocation = null;
3628 _cachedHashCode = null; 3628 _cachedHashCode = null;
3629 } 3629 }
3630 3630
3631 /**
3632 * The offset of the name of this element in the file that contains the
3633 * declaration of this element.
3634 */
3635 int get nameOffset => _nameOffset;
3636
3637 /**
3638 * Sets the offset of the name of this element in the file that contains the
3639 * declaration of this element.
3640 */
3641 void set nameOffset(int offset) {
3642 _nameOffset = offset;
3643 _cachedHashCode = null;
3644 _cachedLocation = null;
3645 }
3646
3631 @override 3647 @override
3632 AstNode get node => getNodeMatching((node) => node is AstNode); 3648 AstNode get node => getNodeMatching((node) => node is AstNode);
3633 3649
3634 @override 3650 @override
3635 Source get source { 3651 Source get source {
3636 if (_enclosingElement == null) { 3652 if (_enclosingElement == null) {
3637 return null; 3653 return null;
3638 } 3654 }
3639 return _enclosingElement.source; 3655 return _enclosingElement.source;
3640 } 3656 }
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
4897 * Initialize a newly created field element to have the given name. 4913 * Initialize a newly created field element to have the given name.
4898 * 4914 *
4899 * @param name the name of this element 4915 * @param name the name of this element
4900 */ 4916 */
4901 FieldElementImpl.forNode(Identifier name) : super.forNode(name); 4917 FieldElementImpl.forNode(Identifier name) : super.forNode(name);
4902 4918
4903 @override 4919 @override
4904 ClassElement get enclosingElement => super.enclosingElement as ClassElement; 4920 ClassElement get enclosingElement => super.enclosingElement as ClassElement;
4905 4921
4906 @override 4922 @override
4923 bool get isEnumConstant =>
4924 enclosingElement != null ? enclosingElement.isEnum : false;
4925
4926 @override
4907 bool get isStatic => hasModifier(Modifier.STATIC); 4927 bool get isStatic => hasModifier(Modifier.STATIC);
4908 4928
4909 @override 4929 @override
4910 ElementKind get kind => ElementKind.FIELD; 4930 ElementKind get kind => ElementKind.FIELD;
4911 4931
4912 /** 4932 /**
4913 * Set whether this field is static to correspond to the given value. 4933 * Set whether this field is static to correspond to the given value.
4914 * 4934 *
4915 * @param isStatic `true` if the field is static 4935 * @param isStatic `true` if the field is static
4916 */ 4936 */
4917 void set static(bool isStatic) { 4937 void set static(bool isStatic) {
4918 setModifier(Modifier.STATIC, isStatic); 4938 setModifier(Modifier.STATIC, isStatic);
4919 } 4939 }
4920 4940
4921 @override 4941 @override
4922 accept(ElementVisitor visitor) => visitor.visitFieldElement(this); 4942 accept(ElementVisitor visitor) => visitor.visitFieldElement(this);
4923
4924 @override
4925 bool get isEnumConstant =>
4926 enclosingElement != null ? enclosingElement.isEnum : false;
4927 } 4943 }
4928 4944
4929 /** 4945 /**
4930 * The interface `FieldFormalParameterElement` defines the behavior of elements representing a 4946 * The interface `FieldFormalParameterElement` defines the behavior of elements representing a
4931 * field formal parameter defined within a constructor element. 4947 * field formal parameter defined within a constructor element.
4932 */ 4948 */
4933 abstract class FieldFormalParameterElement implements ParameterElement { 4949 abstract class FieldFormalParameterElement implements ParameterElement {
4934 /** 4950 /**
4935 * Return the field element associated with this field formal parameter, or `n ull` if the 4951 * Return the field element associated with this field formal parameter, or `n ull` if the
4936 * parameter references a field that doesn't exist. 4952 * parameter references a field that doesn't exist.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
5018 InterfaceType get definingType => super.definingType as InterfaceType; 5034 InterfaceType get definingType => super.definingType as InterfaceType;
5019 5035
5020 @override 5036 @override
5021 ClassElement get enclosingElement => baseElement.enclosingElement; 5037 ClassElement get enclosingElement => baseElement.enclosingElement;
5022 5038
5023 @override 5039 @override
5024 PropertyAccessorElement get getter => 5040 PropertyAccessorElement get getter =>
5025 PropertyAccessorMember.from(baseElement.getter, definingType); 5041 PropertyAccessorMember.from(baseElement.getter, definingType);
5026 5042
5027 @override 5043 @override
5044 bool get isEnumConstant => baseElement.isEnumConstant;
5045
5046 @override
5028 bool get isStatic => baseElement.isStatic; 5047 bool get isStatic => baseElement.isStatic;
5029 5048
5030 @override 5049 @override
5031 DartType get propagatedType => substituteFor(baseElement.propagatedType); 5050 DartType get propagatedType => substituteFor(baseElement.propagatedType);
5032 5051
5033 @override 5052 @override
5034 PropertyAccessorElement get setter => 5053 PropertyAccessorElement get setter =>
5035 PropertyAccessorMember.from(baseElement.setter, definingType); 5054 PropertyAccessorMember.from(baseElement.setter, definingType);
5036 5055
5037 @override 5056 @override
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
5089 if (basePropagatedType != null) { 5108 if (basePropagatedType != null) {
5090 DartType substitutedPropagatedType = 5109 DartType substitutedPropagatedType =
5091 basePropagatedType.substitute2(argumentTypes, parameterTypes); 5110 basePropagatedType.substitute2(argumentTypes, parameterTypes);
5092 if (basePropagatedType != substitutedPropagatedType) { 5111 if (basePropagatedType != substitutedPropagatedType) {
5093 return true; 5112 return true;
5094 } 5113 }
5095 } 5114 }
5096 } 5115 }
5097 return false; 5116 return false;
5098 } 5117 }
5099
5100 @override
5101 bool get isEnumConstant => baseElement.isEnumConstant;
5102 } 5118 }
5103 5119
5104 /** 5120 /**
5105 * The interface `FunctionElement` defines the behavior of elements representing a function. 5121 * The interface `FunctionElement` defines the behavior of elements representing a function.
5106 */ 5122 */
5107 abstract class FunctionElement implements ExecutableElement, LocalElement { 5123 abstract class FunctionElement implements ExecutableElement, LocalElement {
5108 /** 5124 /**
5109 * The name of the method that can be implemented by a class to allow its inst ances to be invoked 5125 * The name of the method that can be implemented by a class to allow its inst ances to be invoked
5110 * as if they were a function. 5126 * as if they were a function.
5111 */ 5127 */
(...skipping 7494 matching lines...) Expand 10 before | Expand all | Expand 10 after
12606 // bottom <: void (as bottom is a subtype of all types). 12622 // bottom <: void (as bottom is a subtype of all types).
12607 // void <: dynamic (as dynamic is a supertype of all types) 12623 // void <: dynamic (as dynamic is a supertype of all types)
12608 return identical(type, this) || type.isDynamic; 12624 return identical(type, this) || type.isDynamic;
12609 } 12625 }
12610 12626
12611 @override 12627 @override
12612 VoidTypeImpl substitute2(List<DartType> argumentTypes, 12628 VoidTypeImpl substitute2(List<DartType> argumentTypes,
12613 List<DartType> parameterTypes) => 12629 List<DartType> parameterTypes) =>
12614 this; 12630 this;
12615 } 12631 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/engine.dart » ('j') | pkg/analyzer/lib/src/generated/engine.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698