| Index: pkg/analyzer_experimental/lib/src/generated/element.dart
|
| diff --git a/pkg/analyzer_experimental/lib/src/generated/element.dart b/pkg/analyzer_experimental/lib/src/generated/element.dart
|
| index 79b1bc9ad97ce622bff519d8c4b0bf878d7b326e..1a140b963be8f086e6f3ce95b41776c31b925458 100644
|
| --- a/pkg/analyzer_experimental/lib/src/generated/element.dart
|
| +++ b/pkg/analyzer_experimental/lib/src/generated/element.dart
|
| @@ -483,6 +483,13 @@ abstract class ExecutableElement implements Element {
|
| */
|
| FunctionType get type;
|
| /**
|
| + * Return {@code true} if this executable element is an operator. The test may be based on the
|
| + * name of the executable element, in which case the result will be correct when the name is
|
| + * legal.
|
| + * @return {@code true} if this executable element is an operator
|
| + */
|
| + bool isOperator();
|
| + /**
|
| * Return {@code true} if this element is a static element. A static element is an element that is
|
| * not associated with a particular instance, but rather with an entire library or class.
|
| * @return {@code true} if this executable element is a static element
|
| @@ -761,12 +768,6 @@ abstract class MethodElement implements ExecutableElement {
|
| * @return {@code true} if this method is abstract
|
| */
|
| bool isAbstract();
|
| - /**
|
| - * Return {@code true} if this method is an operator. The test may be based on the name of the
|
| - * method, in which case the result will be correct when the name is legal.
|
| - * @return {@code true} if this method is an operator
|
| - */
|
| - bool isOperator();
|
| }
|
| /**
|
| * The interface {@code MultiplyDefinedElement} defines the behavior of pseudo-elements that
|
| @@ -1675,7 +1676,7 @@ class CompilationUnitElementImpl extends ElementImpl implements CompilationUnitE
|
| LibraryElement get enclosingElement => super.enclosingElement as LibraryElement;
|
| List<FunctionElement> get functions => _functions;
|
| List<FunctionTypeAliasElement> get functionTypeAliases => _typeAliases;
|
| - String get identifier => source.fullName;
|
| + String get identifier => source.encoding;
|
| ElementKind get kind => ElementKind.COMPILATION_UNIT;
|
| Source get source => _source;
|
| List<TopLevelVariableElement> get topLevelVariables => _variables;
|
| @@ -1706,8 +1707,8 @@ class CompilationUnitElementImpl extends ElementImpl implements CompilationUnitE
|
| * Set the source that corresponds to this compilation unit to the given source.
|
| * @param source the source that corresponds to this compilation unit
|
| */
|
| - void set source(Source source7) {
|
| - this._source = source7;
|
| + void set source(Source source5) {
|
| + this._source = source5;
|
| }
|
| /**
|
| * Set the top-level variables contained in this compilation unit to the given variables.
|
| @@ -1951,10 +1952,10 @@ abstract class ElementImpl implements Element {
|
| * @param name the name of this element
|
| */
|
| ElementImpl.con1(Identifier name25) {
|
| - _jtd_constructor_174_impl(name25);
|
| + _jtd_constructor_178_impl(name25);
|
| }
|
| - _jtd_constructor_174_impl(Identifier name25) {
|
| - _jtd_constructor_175_impl(name25 == null ? "" : name25.name, name25 == null ? -1 : name25.offset);
|
| + _jtd_constructor_178_impl(Identifier name25) {
|
| + _jtd_constructor_179_impl(name25 == null ? "" : name25.name, name25 == null ? -1 : name25.offset);
|
| }
|
| /**
|
| * Initialize a newly created element to have the given name.
|
| @@ -1963,9 +1964,9 @@ abstract class ElementImpl implements Element {
|
| * declaration of this element
|
| */
|
| ElementImpl.con2(String name8, int nameOffset2) {
|
| - _jtd_constructor_175_impl(name8, nameOffset2);
|
| + _jtd_constructor_179_impl(name8, nameOffset2);
|
| }
|
| - _jtd_constructor_175_impl(String name8, int nameOffset2) {
|
| + _jtd_constructor_179_impl(String name8, int nameOffset2) {
|
| this._name = name8;
|
| this._nameOffset = nameOffset2;
|
| this._modifiers = new Set();
|
| @@ -2014,8 +2015,8 @@ abstract class ElementImpl implements Element {
|
| * Set the metadata associate with this element to the given array of annotations.
|
| * @param metadata the metadata to be associated with this element
|
| */
|
| - void set metadata(List<Annotation> metadata2) {
|
| - this._metadata = metadata2;
|
| + void set metadata(List<Annotation> metadata3) {
|
| + this._metadata = metadata3;
|
| }
|
| /**
|
| * Set the offset of the name of this element in the file that contains the declaration of this
|
| @@ -2126,9 +2127,9 @@ class ElementLocationImpl implements ElementLocation {
|
| * @param element the element whose location is being represented
|
| */
|
| ElementLocationImpl.con1(Element element) {
|
| - _jtd_constructor_176_impl(element);
|
| + _jtd_constructor_180_impl(element);
|
| }
|
| - _jtd_constructor_176_impl(Element element) {
|
| + _jtd_constructor_180_impl(Element element) {
|
| List<String> components = new List<String>();
|
| Element ancestor = element;
|
| while (ancestor != null) {
|
| @@ -2142,9 +2143,9 @@ class ElementLocationImpl implements ElementLocation {
|
| * @param encoding the encoded form of a location
|
| */
|
| ElementLocationImpl.con2(String encoding) {
|
| - _jtd_constructor_177_impl(encoding);
|
| + _jtd_constructor_181_impl(encoding);
|
| }
|
| - _jtd_constructor_177_impl(String encoding) {
|
| + _jtd_constructor_181_impl(String encoding) {
|
| this._components = decode(encoding);
|
| }
|
| bool operator ==(Object object) {
|
| @@ -2283,9 +2284,9 @@ abstract class ExecutableElementImpl extends ElementImpl implements ExecutableEl
|
| * @param name the name of this element
|
| */
|
| ExecutableElementImpl.con1(Identifier name) : super.con1(name) {
|
| - _jtd_constructor_179_impl(name);
|
| + _jtd_constructor_183_impl(name);
|
| }
|
| - _jtd_constructor_179_impl(Identifier name) {
|
| + _jtd_constructor_183_impl(Identifier name) {
|
| }
|
| /**
|
| * Initialize a newly created executable element to have the given name.
|
| @@ -2294,9 +2295,9 @@ abstract class ExecutableElementImpl extends ElementImpl implements ExecutableEl
|
| * declaration of this element
|
| */
|
| ExecutableElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOffset) {
|
| - _jtd_constructor_180_impl(name, nameOffset);
|
| + _jtd_constructor_184_impl(name, nameOffset);
|
| }
|
| - _jtd_constructor_180_impl(String name, int nameOffset) {
|
| + _jtd_constructor_184_impl(String name, int nameOffset) {
|
| }
|
| ElementImpl getChild(String identifier27) {
|
| for (ExecutableElement function in _functions) {
|
| @@ -2326,6 +2327,7 @@ abstract class ExecutableElementImpl extends ElementImpl implements ExecutableEl
|
| List<LocalVariableElement> get localVariables => _localVariables;
|
| List<ParameterElement> get parameters => _parameters;
|
| FunctionType get type => _type;
|
| + bool isOperator() => false;
|
| /**
|
| * Set the functions defined within this executable element to the given functions.
|
| * @param functions the functions defined within this executable element
|
| @@ -2480,18 +2482,18 @@ class FieldElementImpl extends PropertyInducingElementImpl implements FieldEleme
|
| * @param name the name of this element
|
| */
|
| FieldElementImpl.con1(Identifier name) : super.con1(name) {
|
| - _jtd_constructor_183_impl(name);
|
| + _jtd_constructor_187_impl(name);
|
| }
|
| - _jtd_constructor_183_impl(Identifier name) {
|
| + _jtd_constructor_187_impl(Identifier name) {
|
| }
|
| /**
|
| * Initialize a newly created synthetic field element to have the given name.
|
| * @param name the name of this element
|
| */
|
| FieldElementImpl.con2(String name) : super.con2(name) {
|
| - _jtd_constructor_184_impl(name);
|
| + _jtd_constructor_188_impl(name);
|
| }
|
| - _jtd_constructor_184_impl(String name) {
|
| + _jtd_constructor_188_impl(String name) {
|
| }
|
| accept(ElementVisitor visitor) => visitor.visitFieldElement(this);
|
| ClassElement get enclosingElement => super.enclosingElement as ClassElement;
|
| @@ -2527,9 +2529,9 @@ class FunctionElementImpl extends ExecutableElementImpl implements FunctionEleme
|
| * Initialize a newly created synthetic function element.
|
| */
|
| FunctionElementImpl() : super.con2("", -1) {
|
| - _jtd_constructor_185_impl();
|
| + _jtd_constructor_189_impl();
|
| }
|
| - _jtd_constructor_185_impl() {
|
| + _jtd_constructor_189_impl() {
|
| synthetic = true;
|
| }
|
| /**
|
| @@ -2537,9 +2539,9 @@ class FunctionElementImpl extends ExecutableElementImpl implements FunctionEleme
|
| * @param name the name of this element
|
| */
|
| FunctionElementImpl.con1(Identifier name) : super.con1(name) {
|
| - _jtd_constructor_186_impl(name);
|
| + _jtd_constructor_190_impl(name);
|
| }
|
| - _jtd_constructor_186_impl(Identifier name) {
|
| + _jtd_constructor_190_impl(Identifier name) {
|
| }
|
| accept(ElementVisitor visitor) => visitor.visitFunctionElement(this);
|
| String get identifier => name;
|
| @@ -2766,8 +2768,8 @@ class HtmlElementImpl extends ElementImpl implements HtmlElement {
|
| * Set the source that corresponds to this HTML file to the given source.
|
| * @param source the source that corresponds to this HTML file
|
| */
|
| - void set source(Source source8) {
|
| - this._source = source8;
|
| + void set source(Source source6) {
|
| + this._source = source6;
|
| }
|
| void visitChildren(ElementVisitor<Object> visitor) {
|
| super.visitChildren(visitor);
|
| @@ -2990,17 +2992,21 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
|
| Set<LibraryElement> libraries = new Set<LibraryElement>();
|
| for (ExportElement element in _exports) {
|
| LibraryElement library = element.exportedLibrary;
|
| - javaSetAdd(libraries, library);
|
| + if (library != null) {
|
| + javaSetAdd(libraries, library);
|
| + }
|
| }
|
| return new List.from(libraries);
|
| }
|
| List<ExportElement> get exports => _exports;
|
| - String get identifier => _definingCompilationUnit.source.fullName;
|
| + String get identifier => _definingCompilationUnit.source.encoding;
|
| List<LibraryElement> get importedLibraries {
|
| Set<LibraryElement> libraries = new Set<LibraryElement>();
|
| for (ImportElement element in _imports) {
|
| - LibraryElement prefix = element.importedLibrary;
|
| - javaSetAdd(libraries, prefix);
|
| + LibraryElement library = element.importedLibrary;
|
| + if (library != null) {
|
| + javaSetAdd(libraries, library);
|
| + }
|
| }
|
| return new List.from(libraries);
|
| }
|
| @@ -3017,6 +3023,12 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
|
| }
|
| return new List.from(prefixes);
|
| }
|
| + Source get source {
|
| + if (_definingCompilationUnit == null) {
|
| + return null;
|
| + }
|
| + return _definingCompilationUnit.source;
|
| + }
|
| int get hashCode => _definingCompilationUnit.hashCode;
|
| bool isBrowserApplication() => _entryPoint != null && isOrImportsBrowserLibrary();
|
| bool isDartCore() => name == "dart.core";
|
| @@ -3090,8 +3102,8 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
|
| visited.add(this);
|
| for (int index = 0; index < visited.length; index++) {
|
| LibraryElement library = visited[index];
|
| - Source source12 = library.definingCompilationUnit.source;
|
| - if (source12 == htmlLibSource) {
|
| + Source source10 = library.definingCompilationUnit.source;
|
| + if (source10 == htmlLibSource) {
|
| return true;
|
| }
|
| for (LibraryElement importedLibrary in library.importedLibraries) {
|
| @@ -3171,9 +3183,9 @@ class MethodElementImpl extends ExecutableElementImpl implements MethodElement {
|
| * @param name the name of this element
|
| */
|
| MethodElementImpl.con1(Identifier name) : super.con1(name) {
|
| - _jtd_constructor_195_impl(name);
|
| + _jtd_constructor_199_impl(name);
|
| }
|
| - _jtd_constructor_195_impl(Identifier name) {
|
| + _jtd_constructor_199_impl(Identifier name) {
|
| }
|
| /**
|
| * Initialize a newly created method element to have the given name.
|
| @@ -3182,9 +3194,9 @@ class MethodElementImpl extends ExecutableElementImpl implements MethodElement {
|
| * declaration of this element
|
| */
|
| MethodElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOffset) {
|
| - _jtd_constructor_196_impl(name, nameOffset);
|
| + _jtd_constructor_200_impl(name, nameOffset);
|
| }
|
| - _jtd_constructor_196_impl(String name, int nameOffset) {
|
| + _jtd_constructor_200_impl(String name, int nameOffset) {
|
| }
|
| accept(ElementVisitor visitor) => visitor.visitMethodElement(this);
|
| ClassElement get enclosingElement => super.enclosingElement as ClassElement;
|
| @@ -3467,9 +3479,9 @@ class PropertyAccessorElementImpl extends ExecutableElementImpl implements Prope
|
| * @param name the name of this element
|
| */
|
| PropertyAccessorElementImpl.con1(Identifier name) : super.con1(name) {
|
| - _jtd_constructor_201_impl(name);
|
| + _jtd_constructor_205_impl(name);
|
| }
|
| - _jtd_constructor_201_impl(Identifier name) {
|
| + _jtd_constructor_205_impl(Identifier name) {
|
| }
|
| /**
|
| * Initialize a newly created synthetic property accessor element to be associated with the given
|
| @@ -3477,9 +3489,9 @@ class PropertyAccessorElementImpl extends ExecutableElementImpl implements Prope
|
| * @param variable the variable with which this access is associated
|
| */
|
| PropertyAccessorElementImpl.con2(PropertyInducingElementImpl variable2) : super.con2(variable2.name, -1) {
|
| - _jtd_constructor_202_impl(variable2);
|
| + _jtd_constructor_206_impl(variable2);
|
| }
|
| - _jtd_constructor_202_impl(PropertyInducingElementImpl variable2) {
|
| + _jtd_constructor_206_impl(PropertyInducingElementImpl variable2) {
|
| this._variable = variable2;
|
| synthetic = true;
|
| }
|
| @@ -3544,18 +3556,18 @@ abstract class PropertyInducingElementImpl extends VariableElementImpl implement
|
| * @param name the name of this element
|
| */
|
| PropertyInducingElementImpl.con1(Identifier name) : super.con1(name) {
|
| - _jtd_constructor_203_impl(name);
|
| + _jtd_constructor_207_impl(name);
|
| }
|
| - _jtd_constructor_203_impl(Identifier name) {
|
| + _jtd_constructor_207_impl(Identifier name) {
|
| }
|
| /**
|
| * Initialize a newly created synthetic element to have the given name.
|
| * @param name the name of this element
|
| */
|
| PropertyInducingElementImpl.con2(String name) : super.con2(name, -1) {
|
| - _jtd_constructor_204_impl(name);
|
| + _jtd_constructor_208_impl(name);
|
| }
|
| - _jtd_constructor_204_impl(String name) {
|
| + _jtd_constructor_208_impl(String name) {
|
| synthetic = true;
|
| }
|
| PropertyAccessorElement get getter => _getter;
|
| @@ -3626,18 +3638,18 @@ class TopLevelVariableElementImpl extends PropertyInducingElementImpl implements
|
| * @param name the name of this element
|
| */
|
| TopLevelVariableElementImpl.con1(Identifier name) : super.con1(name) {
|
| - _jtd_constructor_206_impl(name);
|
| + _jtd_constructor_210_impl(name);
|
| }
|
| - _jtd_constructor_206_impl(Identifier name) {
|
| + _jtd_constructor_210_impl(Identifier name) {
|
| }
|
| /**
|
| * Initialize a newly created synthetic top-level variable element to have the given name.
|
| * @param name the name of this element
|
| */
|
| TopLevelVariableElementImpl.con2(String name) : super.con2(name) {
|
| - _jtd_constructor_207_impl(name);
|
| + _jtd_constructor_211_impl(name);
|
| }
|
| - _jtd_constructor_207_impl(String name) {
|
| + _jtd_constructor_211_impl(String name) {
|
| }
|
| accept(ElementVisitor visitor) => visitor.visitTopLevelVariableElement(this);
|
| ElementKind get kind => ElementKind.TOP_LEVEL_VARIABLE;
|
| @@ -3716,9 +3728,9 @@ abstract class VariableElementImpl extends ElementImpl implements VariableElemen
|
| * @param name the name of this element
|
| */
|
| VariableElementImpl.con1(Identifier name) : super.con1(name) {
|
| - _jtd_constructor_209_impl(name);
|
| + _jtd_constructor_213_impl(name);
|
| }
|
| - _jtd_constructor_209_impl(Identifier name) {
|
| + _jtd_constructor_213_impl(Identifier name) {
|
| }
|
| /**
|
| * Initialize a newly created variable element to have the given name.
|
| @@ -3727,9 +3739,9 @@ abstract class VariableElementImpl extends ElementImpl implements VariableElemen
|
| * declaration of this element
|
| */
|
| VariableElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOffset) {
|
| - _jtd_constructor_210_impl(name, nameOffset);
|
| + _jtd_constructor_214_impl(name, nameOffset);
|
| }
|
| - _jtd_constructor_210_impl(String name, int nameOffset) {
|
| + _jtd_constructor_214_impl(String name, int nameOffset) {
|
| }
|
| /**
|
| * Return the result of evaluating this variable's initializer as a compile-time constant
|
| @@ -3922,9 +3934,9 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType {
|
| * @param element the element representing the declaration of the function type
|
| */
|
| FunctionTypeImpl.con1(ExecutableElement element) : super(element, element == null ? null : element.name) {
|
| - _jtd_constructor_261_impl(element);
|
| + _jtd_constructor_265_impl(element);
|
| }
|
| - _jtd_constructor_261_impl(ExecutableElement element) {
|
| + _jtd_constructor_265_impl(ExecutableElement element) {
|
| }
|
| /**
|
| * Initialize a newly created function type to be declared by the given element and to have the
|
| @@ -3932,9 +3944,9 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType {
|
| * @param element the element representing the declaration of the function type
|
| */
|
| FunctionTypeImpl.con2(FunctionTypeAliasElement element) : super(element, element == null ? null : element.name) {
|
| - _jtd_constructor_262_impl(element);
|
| + _jtd_constructor_266_impl(element);
|
| }
|
| - _jtd_constructor_262_impl(FunctionTypeAliasElement element) {
|
| + _jtd_constructor_266_impl(FunctionTypeAliasElement element) {
|
| }
|
| bool operator ==(Object object) {
|
| if (object is! FunctionTypeImpl) {
|
| @@ -3949,11 +3961,11 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType {
|
| Type2 get returnType => _returnType;
|
| List<Type2> get typeArguments => _typeArguments;
|
| int get hashCode {
|
| - Element element40 = element;
|
| - if (element40 == null) {
|
| + Element element44 = element;
|
| + if (element44 == null) {
|
| return 0;
|
| }
|
| - return element40.hashCode;
|
| + return element44.hashCode;
|
| }
|
| bool isSubtypeOf(Type2 type) {
|
| if (type == null) {
|
| @@ -4064,8 +4076,8 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType {
|
| if (argumentTypes.length == 0) {
|
| return this;
|
| }
|
| - Element element41 = element;
|
| - FunctionTypeImpl newType = (element41 is ExecutableElement) ? new FunctionTypeImpl.con1((element41 as ExecutableElement)) : new FunctionTypeImpl.con2((element41 as FunctionTypeAliasElement));
|
| + Element element45 = element;
|
| + FunctionTypeImpl newType = (element45 is ExecutableElement) ? new FunctionTypeImpl.con1((element45 as ExecutableElement)) : new FunctionTypeImpl.con2((element45 as FunctionTypeAliasElement));
|
| newType.returnType = _returnType.substitute2(argumentTypes, parameterTypes);
|
| newType.normalParameterTypes = TypeImpl.substitute(_normalParameterTypes, argumentTypes, parameterTypes);
|
| newType.optionalParameterTypes = TypeImpl.substitute(_optionalParameterTypes, argumentTypes, parameterTypes);
|
| @@ -4198,9 +4210,9 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
|
| * @see #getLeastUpperBound(Type)
|
| */
|
| static Set<InterfaceType> computeSuperinterfaceSet2(InterfaceType type, Set<InterfaceType> set) {
|
| - Element element42 = type.element;
|
| - if (element42 != null && element42 is ClassElement) {
|
| - ClassElement classElement = element42 as ClassElement;
|
| + Element element46 = type.element;
|
| + if (element46 != null && element46 is ClassElement) {
|
| + ClassElement classElement = element46 as ClassElement;
|
| List<InterfaceType> superinterfaces = classElement.interfaces;
|
| for (InterfaceType superinterface in superinterfaces) {
|
| javaSetAdd(set, superinterface);
|
| @@ -4223,9 +4235,9 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
|
| * @param element the element representing the declaration of the type
|
| */
|
| InterfaceTypeImpl.con1(ClassElement element) : super(element, element.name) {
|
| - _jtd_constructor_263_impl(element);
|
| + _jtd_constructor_267_impl(element);
|
| }
|
| - _jtd_constructor_263_impl(ClassElement element) {
|
| + _jtd_constructor_267_impl(ClassElement element) {
|
| }
|
| /**
|
| * Initialize a newly created type to have the given name. This constructor should only be used in
|
| @@ -4233,9 +4245,9 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
|
| * @param name the name of the type
|
| */
|
| InterfaceTypeImpl.con2(String name) : super(null, name) {
|
| - _jtd_constructor_264_impl(name);
|
| + _jtd_constructor_268_impl(name);
|
| }
|
| - _jtd_constructor_264_impl(String name) {
|
| + _jtd_constructor_268_impl(String name) {
|
| }
|
| bool operator ==(Object object) {
|
| if (object is! InterfaceTypeImpl) {
|
| @@ -4291,18 +4303,18 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
|
| }
|
| List<Type2> get typeArguments => _typeArguments;
|
| int get hashCode {
|
| - ClassElement element43 = element;
|
| - if (element43 == null) {
|
| + ClassElement element47 = element;
|
| + if (element47 == null) {
|
| return 0;
|
| }
|
| - return element43.hashCode;
|
| + return element47.hashCode;
|
| }
|
| bool isDartCoreFunction() {
|
| - ClassElement element44 = element;
|
| - if (element44 == null) {
|
| + ClassElement element48 = element;
|
| + if (element48 == null) {
|
| return false;
|
| }
|
| - return element44.name == "Function" && element44.library.isDartCore();
|
| + return element48.name == "Function" && element48.library.isDartCore();
|
| }
|
| bool isDirectSupertypeOf(InterfaceType type) {
|
| ClassElement i = element;
|
|
|