Index: pkg/analyzer/lib/src/generated/element.dart |
diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart |
index 0339712ff4cf5321a837b2c5fe0e2f73d1e8c9e6..34145871dc2111b6433f1d6043c844e5c37800c1 100644 |
--- a/pkg/analyzer/lib/src/generated/element.dart |
+++ b/pkg/analyzer/lib/src/generated/element.dart |
@@ -1558,16 +1558,29 @@ class ConstFieldElementImpl extends FieldElementImpl with ConstVariableElement { |
EvaluationResultImpl _result; |
/** |
+ * Initialize a newly created synthetic field element to have the given |
+ * [name] and [offset]. |
+ */ |
+ ConstFieldElementImpl(String name, int offset) : super(name, offset); |
+ |
+ /** |
* Initialize a newly created field element to have the given [name]. |
*/ |
+ @deprecated // Use new ConstFieldElementImpl.forNode(name) |
ConstFieldElementImpl.con1(Identifier name) : super.forNode(name); |
/** |
* Initialize a newly created synthetic field element to have the given |
* [name] and [offset]. |
*/ |
+ @deprecated // Use new ConstFieldElementImpl(name, offset) |
ConstFieldElementImpl.con2(String name, int offset) : super(name, offset); |
+ /** |
+ * Initialize a newly created field element to have the given [name]. |
+ */ |
+ ConstFieldElementImpl.forNode(Identifier name) : super.forNode(name); |
+ |
@override |
EvaluationResultImpl get evaluationResult => _result; |
@@ -2841,7 +2854,7 @@ abstract class ElementImpl implements Element { |
return null; |
} |
int offset = nameOffset; |
- AstNode node = new NodeLocator.con1(offset).searchWithin(unit); |
+ AstNode node = new NodeLocator(offset).searchWithin(unit); |
if (node == null) { |
return null; |
} |
@@ -4570,16 +4583,31 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType { |
* Initialize a newly created function type to be declared by the given |
* [element]. |
*/ |
+ FunctionTypeImpl(ExecutableElement element) : super(element, null); |
+ |
+ /** |
+ * Initialize a newly created function type to be declared by the given |
+ * [element]. |
+ */ |
+ @deprecated // Use new FunctionTypeImpl(element) |
FunctionTypeImpl.con1(ExecutableElement element) : super(element, null); |
/** |
* Initialize a newly created function type to be declared by the given |
* [element]. |
*/ |
+ @deprecated // Use new FunctionTypeImpl.forTypedef(element) |
FunctionTypeImpl.con2(FunctionTypeAliasElement element) |
: super(element, element == null ? null : element.name); |
/** |
+ * Initialize a newly created function type to be declared by the given |
+ * [element]. |
+ */ |
+ FunctionTypeImpl.forTypedef(FunctionTypeAliasElement element) |
+ : super(element, element == null ? null : element.name); |
+ |
+ /** |
* Return the base parameter elements of this function element. |
*/ |
List<ParameterElement> get baseParameters { |
@@ -5221,8 +5249,8 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType { |
} |
Element element = this.element; |
FunctionTypeImpl newType = (element is ExecutableElement) |
- ? new FunctionTypeImpl.con1(element) |
- : new FunctionTypeImpl.con2(element as FunctionTypeAliasElement); |
+ ? new FunctionTypeImpl(element) |
+ : new FunctionTypeImpl.forTypedef(element as FunctionTypeAliasElement); |
newType.typeArguments = |
TypeImpl.substitute(typeArguments, argumentTypes, parameterTypes); |
return newType; |
@@ -6036,7 +6064,7 @@ abstract class InterfaceType implements ParameterizedType { |
lubArguments[i] = DynamicTypeImpl.instance; |
} |
} |
- InterfaceTypeImpl lub = new InterfaceTypeImpl.con1(firstElement); |
+ InterfaceTypeImpl lub = new InterfaceTypeImpl(firstElement); |
lub.typeArguments = lubArguments; |
return lub; |
} |
@@ -6054,6 +6082,12 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType { |
/** |
* Initialize a newly created type to be declared by the given [element]. |
*/ |
+ InterfaceTypeImpl(ClassElement element) : super(element, element.displayName); |
+ |
+ /** |
+ * Initialize a newly created type to be declared by the given [element]. |
+ */ |
+ @deprecated // Use new InterfaceTypeImpl(element) |
InterfaceTypeImpl.con1(ClassElement element) |
: super(element, element.displayName); |
@@ -6061,8 +6095,15 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType { |
* Initialize a newly created type to have the given [name]. This constructor |
* should only be used in cases where there is no declaration of the type. |
*/ |
+ @deprecated // Use new InterfaceTypeImpl.named(name) |
InterfaceTypeImpl.con2(String name) : super(null, name); |
+ /** |
+ * Initialize a newly created type to have the given [name]. This constructor |
+ * should only be used in cases where there is no declaration of the type. |
+ */ |
+ InterfaceTypeImpl.named(String name) : super(null, name); |
+ |
@override |
List<PropertyAccessorElement> get accessors { |
List<PropertyAccessorElement> accessors = element.accessors; |
@@ -6611,7 +6652,7 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType { |
if (JavaArrays.equals(newTypeArguments, typeArguments)) { |
return this; |
} |
- InterfaceTypeImpl newType = new InterfaceTypeImpl.con1(element); |
+ InterfaceTypeImpl newType = new InterfaceTypeImpl(element); |
newType.typeArguments = newTypeArguments; |
return newType; |
} |
@@ -7161,7 +7202,7 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement { |
function.synthetic = true; |
function.enclosingElement = this; |
function.returnType = loadLibraryReturnType; |
- function.type = new FunctionTypeImpl.con1(function); |
+ function.type = new FunctionTypeImpl(function); |
_loadLibraryFunction = function; |
} |
return _loadLibraryFunction; |