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

Unified Diff: pkg/analyzer/lib/src/generated/element.dart

Issue 1061993003: Rename EMPTY_ARRAY to EMPTY_LIST in element model (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d8fac41e10efe1ba72fbf0e3bff2b549fa9aaf46..f583c376fa1bed7e71fc11f6bad29d6362e732ab 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -110,6 +110,11 @@ class BottomTypeImpl extends TypeImpl {
*/
abstract class ClassElement implements Element {
/**
+ * An empty list of class elements.
+ */
+ static const List<ClassElement> EMPTY_LIST = const <ClassElement>[];
+
+ /**
* Return a list containing all of the accessors (getters and setters)
* declared in this class.
*/
@@ -460,40 +465,40 @@ class ClassElementImpl extends ElementImpl implements ClassElement {
/**
* An empty list of class elements.
*/
+ @deprecated // Use ClassElement.EMPTY_LIST
static const List<ClassElement> EMPTY_ARRAY = const <ClassElement>[];
/**
* A list containing all of the accessors (getters and setters) contained in
* this class.
*/
- List<PropertyAccessorElement> _accessors =
- PropertyAccessorElementImpl.EMPTY_ARRAY;
+ List<PropertyAccessorElement> _accessors = PropertyAccessorElement.EMPTY_LIST;
/**
* A list containing all of the constructors contained in this class.
*/
- List<ConstructorElement> _constructors = ConstructorElementImpl.EMPTY_ARRAY;
+ List<ConstructorElement> _constructors = ConstructorElement.EMPTY_LIST;
/**
* A list containing all of the fields contained in this class.
*/
- List<FieldElement> _fields = FieldElementImpl.EMPTY_ARRAY;
+ List<FieldElement> _fields = FieldElement.EMPTY_LIST;
/**
* A list containing all of the mixins that are applied to the class being
* extended in order to derive the superclass of this class.
*/
- List<InterfaceType> mixins = InterfaceType.EMPTY_ARRAY;
+ List<InterfaceType> mixins = InterfaceType.EMPTY_LIST;
/**
* A list containing all of the interfaces that are implemented by this class.
*/
- List<InterfaceType> interfaces = InterfaceType.EMPTY_ARRAY;
+ List<InterfaceType> interfaces = InterfaceType.EMPTY_LIST;
/**
* A list containing all of the methods contained in this class.
*/
- List<MethodElement> _methods = MethodElementImpl.EMPTY_ARRAY;
+ List<MethodElement> _methods = MethodElement.EMPTY_LIST;
/**
* The superclass of the class, or `null` if the class does not have an
@@ -509,8 +514,7 @@ class ClassElementImpl extends ElementImpl implements ClassElement {
/**
* A list containing all of the type parameters defined for this class.
*/
- List<TypeParameterElement> _typeParameters =
- TypeParameterElementImpl.EMPTY_ARRAY;
+ List<TypeParameterElement> _typeParameters = TypeParameterElement.EMPTY_LIST;
/**
* The [SourceRange] of the `with` clause, `null` if there is no one.
@@ -1156,6 +1160,12 @@ abstract class ClassMemberElement implements Element {
*/
abstract class CompilationUnitElement implements Element, UriReferencedElement {
/**
+ * An empty list of compilation unit elements.
+ */
+ static const List<CompilationUnitElement> EMPTY_LIST =
+ const <CompilationUnitElement>[];
+
+ /**
* Return a list containing all of the top-level accessors (getters and
* setters) contained in this compilation unit.
*/
@@ -1240,6 +1250,7 @@ class CompilationUnitElementImpl extends UriReferencedElementImpl
/**
* An empty list of compilation unit elements.
*/
+ @deprecated // Use CompilationUnitElement.EMPTY_LIST
static const List<CompilationUnitElement> EMPTY_ARRAY =
const <CompilationUnitElement>[];
@@ -1252,37 +1263,35 @@ class CompilationUnitElementImpl extends UriReferencedElementImpl
* A list containing all of the top-level accessors (getters and setters)
* contained in this compilation unit.
*/
- List<PropertyAccessorElement> _accessors =
- PropertyAccessorElementImpl.EMPTY_ARRAY;
+ List<PropertyAccessorElement> _accessors = PropertyAccessorElement.EMPTY_LIST;
/**
* A list containing all of the enums contained in this compilation unit.
*/
- List<ClassElement> _enums = ClassElementImpl.EMPTY_ARRAY;
+ List<ClassElement> _enums = ClassElement.EMPTY_LIST;
/**
* A list containing all of the top-level functions contained in this
* compilation unit.
*/
- List<FunctionElement> _functions = FunctionElementImpl.EMPTY_ARRAY;
+ List<FunctionElement> _functions = FunctionElement.EMPTY_LIST;
/**
* A list containing all of the function type aliases contained in this
* compilation unit.
*/
List<FunctionTypeAliasElement> _typeAliases =
- FunctionTypeAliasElementImpl.EMPTY_ARRAY;
+ FunctionTypeAliasElement.EMPTY_LIST;
/**
* A list containing all of the types contained in this compilation unit.
*/
- List<ClassElement> _types = ClassElementImpl.EMPTY_ARRAY;
+ List<ClassElement> _types = ClassElement.EMPTY_LIST;
/**
* A list containing all of the variables contained in this compilation unit.
*/
- List<TopLevelVariableElement> _variables =
- TopLevelVariableElementImpl.EMPTY_ARRAY;
+ List<TopLevelVariableElement> _variables = TopLevelVariableElement.EMPTY_LIST;
/**
* A map from offsets to elements of this unit at these offsets.
@@ -1583,6 +1592,12 @@ class ConstLocalVariableElementImpl extends LocalVariableElementImpl
abstract class ConstructorElement
implements ClassMemberElement, ExecutableElement {
/**
+ * An empty list of constructor elements.
+ */
+ static const List<ConstructorElement> EMPTY_LIST =
+ const <ConstructorElement>[];
+
+ /**
* Return `true` if this constructor is a const constructor.
*/
bool get isConst;
@@ -1636,6 +1651,7 @@ class ConstructorElementImpl extends ExecutableElementImpl
/**
* An empty list of constructor elements.
*/
+ @deprecated // Use ConstructorElement.EMPTY_LIST
static const List<ConstructorElement> EMPTY_ARRAY =
const <ConstructorElement>[];
@@ -1916,6 +1932,11 @@ abstract class ConstVariableElement implements PotentiallyConstVariableElement {
*/
abstract class DartType {
/**
+ * An empty list of types.
+ */
+ static const List<DartType> EMPTY_LIST = const <DartType>[];
+
+ /**
* Return the name of this type as it should appear when presented to users in
* contexts such as error messages.
*/
@@ -2387,6 +2408,11 @@ abstract class Element implements AnalysisTarget {
*/
abstract class ElementAnnotation {
/**
+ * An empty list of annotations.
+ */
+ static const List<ElementAnnotation> EMPTY_LIST = const <ElementAnnotation>[];
+
+ /**
* Return the element representing the field, variable, or const constructor
* being used as an annotation.
*/
@@ -2418,6 +2444,7 @@ class ElementAnnotationImpl implements ElementAnnotation {
/**
* An empty list of annotations.
*/
+ @deprecated // Use ElementAnnotation.EMPTY_LIST
static const List<ElementAnnotationImpl> EMPTY_ARRAY =
const <ElementAnnotationImpl>[];
@@ -2549,7 +2576,7 @@ abstract class ElementImpl implements Element {
/**
* A list containing all of the metadata associated with this element.
*/
- List<ElementAnnotation> metadata = ElementAnnotationImpl.EMPTY_ARRAY;
+ List<ElementAnnotation> metadata = ElementAnnotation.EMPTY_LIST;
/**
* A cached copy of the calculated hashCode for this element.
@@ -3303,6 +3330,11 @@ class EmbeddedHtmlScriptElementImpl extends HtmlScriptElementImpl
*/
abstract class ExecutableElement implements Element {
/**
+ * An empty list of executable elements.
+ */
+ static const List<ExecutableElement> EMPTY_LIST = const <ExecutableElement>[];
+
+ /**
* Return a list containing all of the functions defined within this
* executable element.
*/
@@ -3383,6 +3415,7 @@ abstract class ExecutableElementImpl extends ElementImpl
/**
* An empty list of executable elements.
*/
+ @deprecated // Use ExecutableElement.EMPTY_LIST
static const List<ExecutableElement> EMPTY_ARRAY =
const <ExecutableElement>[];
@@ -3390,24 +3423,23 @@ abstract class ExecutableElementImpl extends ElementImpl
* A list containing all of the functions defined within this executable
* element.
*/
- List<FunctionElement> _functions = FunctionElementImpl.EMPTY_ARRAY;
+ List<FunctionElement> _functions = FunctionElement.EMPTY_LIST;
/**
* A list containing all of the labels defined within this executable element.
*/
- List<LabelElement> _labels = LabelElementImpl.EMPTY_ARRAY;
+ List<LabelElement> _labels = LabelElement.EMPTY_LIST;
/**
* A list containing all of the local variables defined within this executable
* element.
*/
- List<LocalVariableElement> _localVariables =
- LocalVariableElementImpl.EMPTY_ARRAY;
+ List<LocalVariableElement> _localVariables = LocalVariableElement.EMPTY_LIST;
/**
* A list containing all of the parameters defined by this executable element.
*/
- List<ParameterElement> _parameters = ParameterElementImpl.EMPTY_ARRAY;
+ List<ParameterElement> _parameters = ParameterElement.EMPTY_LIST;
/**
* The return type defined by this executable element.
@@ -3688,9 +3720,15 @@ abstract class ExportElement implements Element, UriReferencedElement {
/**
* An empty list of export elements.
*/
+ @deprecated // Use ExportElement.EMPTY_LIST
static const List<ExportElement> EMPTY_ARRAY = const <ExportElement>[];
/**
+ * An empty list of export elements.
+ */
+ static const List<ExportElement> EMPTY_LIST = const <ExportElement>[];
+
+ /**
* Return a list containing the combinators that were specified as part of the
* export directive in the order in which they were specified.
*/
@@ -3717,7 +3755,7 @@ class ExportElementImpl extends UriReferencedElementImpl
* The combinators that were specified as part of the export directive in the
* order in which they were specified.
*/
- List<NamespaceCombinator> combinators = NamespaceCombinator.EMPTY_ARRAY;
+ List<NamespaceCombinator> combinators = NamespaceCombinator.EMPTY_LIST;
/**
* Initialize a newly created export element at the given [offset].
@@ -3782,6 +3820,11 @@ class ExternalHtmlScriptElementImpl extends HtmlScriptElementImpl
abstract class FieldElement
implements ClassMemberElement, PropertyInducingElement {
/**
+ * An empty list of field elements.
+ */
+ static const List<FieldElement> EMPTY_LIST = const <FieldElement>[];
+
+ /**
* Return {@code true} if this element is an enum constant.
*/
bool get isEnumConstant;
@@ -3805,6 +3848,7 @@ class FieldElementImpl extends PropertyInducingElementImpl
/**
* An empty list of field elements.
*/
+ @deprecated // Use FieldElement.EMPTY_LIST
static const List<FieldElement> EMPTY_ARRAY = const <FieldElement>[];
/**
@@ -4018,6 +4062,11 @@ class FieldMember extends VariableMember implements FieldElement {
*/
abstract class FunctionElement implements ExecutableElement, LocalElement {
/**
+ * An empty list of function elements.
+ */
+ static const List<FunctionElement> EMPTY_LIST = const <FunctionElement>[];
+
+ /**
* The name of the method that can be implemented by a class to allow its
* instances to be invoked as if they were a function.
*/
@@ -4063,6 +4112,7 @@ class FunctionElementImpl extends ExecutableElementImpl
/**
* An empty list of function elements.
*/
+ @deprecated // Use FunctionElement.EMPTY_LIST
static const List<FunctionElement> EMPTY_ARRAY = const <FunctionElement>[];
/**
@@ -4277,6 +4327,12 @@ abstract class FunctionType implements ParameterizedType {
*/
abstract class FunctionTypeAliasElement implements Element {
/**
+ * An empty array of type alias elements.
+ */
+ static List<FunctionTypeAliasElement> EMPTY_LIST =
+ new List<FunctionTypeAliasElement>(0);
+
+ /**
* Return the compilation unit in which this type alias is defined.
*/
@override
@@ -4320,13 +4376,14 @@ class FunctionTypeAliasElementImpl extends ElementImpl
/**
* An empty array of type alias elements.
*/
+ @deprecated // Use FunctionTypeAliasElement.EMPTY_LIST
static List<FunctionTypeAliasElement> EMPTY_ARRAY =
new List<FunctionTypeAliasElement>(0);
/**
* A list containing all of the parameters defined by this type alias.
*/
- List<ParameterElement> _parameters = ParameterElementImpl.EMPTY_ARRAY;
+ List<ParameterElement> _parameters = ParameterElement.EMPTY_LIST;
/**
* The return type defined by this type alias.
@@ -4341,8 +4398,7 @@ class FunctionTypeAliasElementImpl extends ElementImpl
/**
* A list containing all of the type parameters defined for this type.
*/
- List<TypeParameterElement> _typeParameters =
- TypeParameterElementImpl.EMPTY_ARRAY;
+ List<TypeParameterElement> _typeParameters = TypeParameterElement.EMPTY_LIST;
/**
* Initialize a newly created type alias element to have the given name.
@@ -4484,7 +4540,7 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType {
/**
* A list containing the actual types of the type arguments.
*/
- List<DartType> typeArguments = TypeImpl.EMPTY_ARRAY;
+ List<DartType> typeArguments = DartType.EMPTY_LIST;
/**
* Initialize a newly created function type to be declared by the given
@@ -4624,7 +4680,7 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType {
List<DartType> get normalParameterTypes {
List<ParameterElement> parameters = baseParameters;
if (parameters.length == 0) {
- return TypeImpl.EMPTY_ARRAY;
+ return DartType.EMPTY_LIST;
}
List<DartType> typeParameters =
TypeParameterTypeImpl.getTypes(this.typeParameters);
@@ -4646,7 +4702,7 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType {
List<DartType> get optionalParameterTypes {
List<ParameterElement> parameters = baseParameters;
if (parameters.length == 0) {
- return TypeImpl.EMPTY_ARRAY;
+ return DartType.EMPTY_LIST;
}
List<DartType> typeParameters =
TypeParameterTypeImpl.getTypes(this.typeParameters);
@@ -4710,7 +4766,7 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType {
if (definingClass != null) {
return definingClass.typeParameters;
}
- return TypeParameterElementImpl.EMPTY_ARRAY;
+ return TypeParameterElement.EMPTY_LIST;
}
@override
@@ -5386,6 +5442,11 @@ class HideElementCombinatorImpl implements HideElementCombinator {
*/
abstract class HtmlElement implements Element {
/**
+ * An empty list of HTML file elements.
+ */
+ static const List<HtmlElement> EMPTY_LIST = const <HtmlElement>[];
+
+ /**
* Return a list containing all of the script elements contained in the HTML
* file. This includes scripts with libraries that are defined by the content
* of a script tag as well as libraries that are referenced in the `source`
@@ -5401,6 +5462,7 @@ class HtmlElementImpl extends ElementImpl implements HtmlElement {
/**
* An empty list of HTML file elements.
*/
+ @deprecated // Use HtmlElement.EMPTY_LIST
static const List<HtmlElement> EMPTY_ARRAY = const <HtmlElement>[];
/**
@@ -5411,7 +5473,7 @@ class HtmlElementImpl extends ElementImpl implements HtmlElement {
/**
* The scripts contained in or referenced from script tags in the HTML file.
*/
- List<HtmlScriptElement> _scripts = HtmlScriptElementImpl.EMPTY_ARRAY;
+ List<HtmlScriptElement> _scripts = HtmlScriptElement.EMPTY_LIST;
/**
* The source that corresponds to this HTML file.
@@ -5441,7 +5503,7 @@ class HtmlElementImpl extends ElementImpl implements HtmlElement {
*/
void set scripts(List<HtmlScriptElement> scripts) {
if (scripts.length == 0) {
- this._scripts = HtmlScriptElementImpl.EMPTY_ARRAY;
+ this._scripts = HtmlScriptElement.EMPTY_LIST;
return;
}
for (HtmlScriptElement script in scripts) {
@@ -5482,7 +5544,12 @@ class HtmlElementImpl extends ElementImpl implements HtmlElement {
*
* See [EmbeddedHtmlScriptElement], and [ExternalHtmlScriptElement].
*/
-abstract class HtmlScriptElement implements Element {}
+abstract class HtmlScriptElement implements Element {
+ /**
+ * An empty list of HTML script elements.
+ */
+ static const List<HtmlScriptElement> EMPTY_LIST = const <HtmlScriptElement>[];
+}
/**
* A concrete implementation of an [HtmlScriptElement].
@@ -5492,6 +5559,7 @@ abstract class HtmlScriptElementImpl extends ElementImpl
/**
* An empty list of HTML script elements.
*/
+ @deprecated // Use HtmlScriptElement.EMPTY_LIST
static const List<HtmlScriptElement> EMPTY_ARRAY =
const <HtmlScriptElement>[];
@@ -5510,9 +5578,15 @@ abstract class ImportElement implements Element, UriReferencedElement {
/**
* An empty list of import elements.
*/
+ @deprecated // Use ImportElement.EMPTY_LIST
static const List<ImportElement> EMPTY_ARRAY = const <ImportElement>[];
/**
+ * An empty list of import elements.
+ */
+ static const List<ImportElement> EMPTY_LIST = const <ImportElement>[];
+
+ /**
* Return a list containing the combinators that were specified as part of the
* import directive in the order in which they were specified.
*/
@@ -5563,7 +5637,7 @@ class ImportElementImpl extends UriReferencedElementImpl
* The combinators that were specified as part of the import directive in the
* order in which they were specified.
*/
- List<NamespaceCombinator> combinators = NamespaceCombinator.EMPTY_ARRAY;
+ List<NamespaceCombinator> combinators = NamespaceCombinator.EMPTY_LIST;
/**
* The prefix that was specified as part of the import directive, or `null` if
@@ -5618,9 +5692,15 @@ abstract class InterfaceType implements ParameterizedType {
/**
* An empty list of types.
*/
+ @deprecated // Use InterfaceType.EMPTY_LIST
static const List<InterfaceType> EMPTY_ARRAY = const <InterfaceType>[];
/**
+ * An empty list of types.
+ */
+ static const List<InterfaceType> EMPTY_LIST = const <InterfaceType>[];
+
+ /**
* Return a list containing all of the accessors (getters and setters)
* declared in this type.
*/
@@ -5945,7 +6025,7 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
/**
* A list containing the actual types of the type arguments.
*/
- List<DartType> typeArguments = TypeImpl.EMPTY_ARRAY;
+ List<DartType> typeArguments = DartType.EMPTY_LIST;
/**
* Initialize a newly created type to be declared by the given [element].
@@ -6623,6 +6703,11 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
*/
abstract class LabelElement implements Element {
/**
+ * An empty list of label elements.
+ */
+ static const List<LabelElement> EMPTY_LIST = const <LabelElement>[];
+
+ /**
* Return the executable element in which this label is defined.
*/
@override
@@ -6636,6 +6721,7 @@ class LabelElementImpl extends ElementImpl implements LabelElement {
/**
* An empty list of label elements.
*/
+ @deprecated // Use LabelElement.EMPTY_LIST
static const List<LabelElement> EMPTY_ARRAY = const <LabelElement>[];
/**
@@ -6689,6 +6775,11 @@ class LabelElementImpl extends ElementImpl implements LabelElement {
*/
abstract class LibraryElement implements Element {
/**
+ * An empty list of library elements.
+ */
+ static const List<LibraryElement> EMPTY_LIST = const <LibraryElement>[];
+
+ /**
* Return the compilation unit that defines this library.
*/
CompilationUnitElement get definingCompilationUnit;
@@ -6824,6 +6915,7 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
/**
* An empty list of library elements.
*/
+ @deprecated // Use LibraryElement.EMPTY_LIST
static const List<LibraryElement> EMPTY_ARRAY = const <LibraryElement>[];
/**
@@ -6846,19 +6938,19 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
* A list containing specifications of all of the imports defined in this
* library.
*/
- List<ImportElement> _imports = ImportElement.EMPTY_ARRAY;
+ List<ImportElement> _imports = ImportElement.EMPTY_LIST;
/**
* A list containing specifications of all of the exports defined in this
* library.
*/
- List<ExportElement> _exports = ExportElement.EMPTY_ARRAY;
+ List<ExportElement> _exports = ExportElement.EMPTY_LIST;
/**
* A list containing all of the compilation units that are included in this
* library using a `part` directive.
*/
- List<CompilationUnitElement> _parts = CompilationUnitElementImpl.EMPTY_ARRAY;
+ List<CompilationUnitElement> _parts = CompilationUnitElement.EMPTY_LIST;
/**
* The element representing the synthetic function `loadLibrary` that is
@@ -7305,6 +7397,12 @@ abstract class LocalElement implements Element {
*/
abstract class LocalVariableElement implements LocalElement, VariableElement {
/**
+ * An empty list of field elements.
+ */
+ static const List<LocalVariableElement> EMPTY_LIST =
+ const <LocalVariableElement>[];
+
+ /**
* Return the resolved [VariableDeclaration] node that declares this
* [LocalVariableElement].
*
@@ -7323,6 +7421,7 @@ class LocalVariableElementImpl extends VariableElementImpl
/**
* An empty list of field elements.
*/
+ @deprecated // Use LocalVariableElement.EMPTY_LIST
static const List<LocalVariableElement> EMPTY_ARRAY =
const <LocalVariableElement>[];
@@ -7570,6 +7669,11 @@ abstract class Member implements Element {
*/
abstract class MethodElement implements ClassMemberElement, ExecutableElement {
/**
+ * An empty list of method elements.
+ */
+ static const List<MethodElement> EMPTY_LIST = const <MethodElement>[];
+
+ /**
* Return the resolved [MethodDeclaration] node that declares this
* [MethodElement].
*
@@ -7587,6 +7691,7 @@ class MethodElementImpl extends ExecutableElementImpl implements MethodElement {
/**
* An empty list of method elements.
*/
+ @deprecated // Use MethodElement.EMPTY_LIST
static const List<MethodElement> EMPTY_ARRAY = const <MethodElement>[];
/**
@@ -7974,7 +8079,7 @@ class MultiplyDefinedElementImpl implements MultiplyDefinedElement {
ElementLocation get location => null;
@override
- List<ElementAnnotation> get metadata => ElementAnnotationImpl.EMPTY_ARRAY;
+ List<ElementAnnotation> get metadata => ElementAnnotation.EMPTY_LIST;
@override
String get name => _name;
@@ -8111,7 +8216,7 @@ class MultiplyInheritedMethodElementImpl extends MethodElementImpl
* A list the array of executable elements that were used to compose this
* element.
*/
- List<ExecutableElement> _elements = MethodElementImpl.EMPTY_ARRAY;
+ List<ExecutableElement> _elements = MethodElement.EMPTY_LIST;
MultiplyInheritedMethodElementImpl(Identifier name) : super.forNode(name) {
synthetic = true;
@@ -8136,7 +8241,7 @@ class MultiplyInheritedPropertyAccessorElementImpl
* A list the array of executable elements that were used to compose this
* element.
*/
- List<ExecutableElement> _elements = PropertyAccessorElementImpl.EMPTY_ARRAY;
+ List<ExecutableElement> _elements = PropertyAccessorElement.EMPTY_LIST;
MultiplyInheritedPropertyAccessorElementImpl(Identifier name)
: super.forNode(name) {
@@ -8158,8 +8263,15 @@ abstract class NamespaceCombinator {
/**
* An empty list of namespace combinators.
*/
+ @deprecated // Use NamespaceCombinator.EMPTY_LIST
static const List<NamespaceCombinator> EMPTY_ARRAY =
const <NamespaceCombinator>[];
+
+ /**
+ * An empty list of namespace combinators.
+ */
+ static const List<NamespaceCombinator> EMPTY_LIST =
+ const <NamespaceCombinator>[];
}
/**
@@ -8167,6 +8279,11 @@ abstract class NamespaceCombinator {
*/
abstract class ParameterElement implements LocalElement, VariableElement {
/**
+ * An empty list of parameter elements.
+ */
+ static const List<ParameterElement> EMPTY_LIST = const <ParameterElement>[];
+
+ /**
* Return the Dart code of the default value, or `null` if no default value.
*/
String get defaultValueCode;
@@ -8198,8 +8315,9 @@ abstract class ParameterElement implements LocalElement, VariableElement {
class ParameterElementImpl extends VariableElementImpl
implements ParameterElement {
/**
- * An empty list of field elements.
+ * An empty list of parameter elements.
*/
+ @deprecated // Use ParameterElement.EMPTY_LIST
static const List<ParameterElement> EMPTY_ARRAY = const <ParameterElement>[];
/**
@@ -8207,7 +8325,7 @@ class ParameterElementImpl extends VariableElementImpl
* There will only be parameters if this parameter is a function typed
* parameter.
*/
- List<ParameterElement> _parameters = ParameterElementImpl.EMPTY_ARRAY;
+ List<ParameterElement> _parameters = ParameterElement.EMPTY_LIST;
/**
* The kind of this parameter.
@@ -8548,6 +8666,11 @@ abstract class PotentiallyConstVariableElement {
*/
abstract class PrefixElement implements Element {
/**
+ * An empty list of prefix elements.
+ */
+ static const List<PrefixElement> EMPTY_LIST = const <PrefixElement>[];
+
+ /**
* Return the library into which other libraries are imported using this
* prefix.
*/
@@ -8568,12 +8691,13 @@ class PrefixElementImpl extends ElementImpl implements PrefixElement {
/**
* An empty list of prefix elements.
*/
+ @deprecated // Use PrefixElement.EMPTY_LIST
static const List<PrefixElement> EMPTY_ARRAY = const <PrefixElement>[];
/**
* A list containing all of the libraries that are imported using this prefix.
*/
- List<LibraryElement> _importedLibraries = LibraryElementImpl.EMPTY_ARRAY;
+ List<LibraryElement> _importedLibraries = LibraryElement.EMPTY_LIST;
/**
* Initialize a newly created method element to have the given [name] and
@@ -8635,6 +8759,12 @@ class PrefixElementImpl extends ElementImpl implements PrefixElement {
*/
abstract class PropertyAccessorElement implements ExecutableElement {
/**
+ * An empty list of property accessor elements.
+ */
+ static const List<PropertyAccessorElement> EMPTY_LIST =
+ const <PropertyAccessorElement>[];
+
+ /**
* Return the accessor representing the getter that corresponds to (has the
* same name as) this setter, or `null` if this accessor is not a setter or if
* there is no corresponding getter.
@@ -8674,6 +8804,7 @@ class PropertyAccessorElementImpl extends ExecutableElementImpl
/**
* An empty list of property accessor elements.
*/
+ @deprecated // Use PropertyAccessorElement.EMPTY_LIST
static const List<PropertyAccessorElement> EMPTY_ARRAY =
const <PropertyAccessorElement>[];
@@ -8964,6 +9095,12 @@ class PropertyAccessorMember extends ExecutableMember
*/
abstract class PropertyInducingElement implements VariableElement {
/**
+ * An empty list of elements.
+ */
+ static const List<PropertyInducingElement> EMPTY_LIST =
+ const <PropertyInducingElement>[];
+
+ /**
* Return the getter associated with this variable. If this variable was
* explicitly defined (is not synthetic) then the getter associated with it
* will be synthetic.
@@ -9003,6 +9140,7 @@ abstract class PropertyInducingElementImpl extends VariableElementImpl
/**
* An empty list of elements.
*/
+ @deprecated // Use PropertyInducingElement.EMPTY_LIST
static const List<PropertyInducingElement> EMPTY_ARRAY =
const <PropertyInducingElement>[];
@@ -9319,6 +9457,12 @@ class SimpleElementVisitor<R> implements ElementVisitor<R> {
* A top-level variable.
*/
abstract class TopLevelVariableElement implements PropertyInducingElement {
+ /**
+ * An empty list of top-level variable elements.
+ */
+ static const List<TopLevelVariableElement> EMPTY_LIST =
+ const <TopLevelVariableElement>[];
+
@override
VariableDeclaration get node;
}
@@ -9331,6 +9475,7 @@ class TopLevelVariableElementImpl extends PropertyInducingElementImpl
/**
* An empty list of top-level variable elements.
*/
+ @deprecated // Use TopLevelVariableElement.EMPTY_LIST
static const List<TopLevelVariableElement> EMPTY_ARRAY =
const <TopLevelVariableElement>[];
@@ -9368,6 +9513,7 @@ abstract class TypeImpl implements DartType {
/**
* An empty list of types.
*/
+ @deprecated // Use DartType.EMPTY_LIST
static const List<DartType> EMPTY_ARRAY = const <DartType>[];
/**
@@ -9559,6 +9705,12 @@ abstract class TypeImpl implements DartType {
*/
abstract class TypeParameterElement implements Element {
/**
+ * An empty list of type parameter elements.
+ */
+ static const List<TypeParameterElement> EMPTY_LIST =
+ const <TypeParameterElement>[];
+
+ /**
* Return the type representing the bound associated with this parameter, or
* `null` if this parameter does not have an explicit bound.
*/
@@ -9578,6 +9730,7 @@ class TypeParameterElementImpl extends ElementImpl
/**
* An empty list of type parameter elements.
*/
+ @deprecated // Use TypeParameterElement.EMPTY_LIST
static const List<TypeParameterElement> EMPTY_ARRAY =
const <TypeParameterElement>[];
@@ -9623,6 +9776,11 @@ class TypeParameterElementImpl extends ElementImpl
* The type introduced by a type parameter.
*/
abstract class TypeParameterType implements DartType {
+ /**
+ * An empty list of type parameter types.
+ */
+ static const List<TypeParameterType> EMPTY_LIST = const <TypeParameterType>[];
+
@override
TypeParameterElement get element;
}
@@ -9634,6 +9792,7 @@ class TypeParameterTypeImpl extends TypeImpl implements TypeParameterType {
/**
* An empty list of type parameter types.
*/
+ @deprecated // Use TypeParameterType.EMPTY_LIST
static const List<TypeParameterType> EMPTY_ARRAY =
const <TypeParameterType>[];
@@ -9742,7 +9901,7 @@ class TypeParameterTypeImpl extends TypeImpl implements TypeParameterType {
List<TypeParameterElement> typeParameters) {
int count = typeParameters.length;
if (count == 0) {
- return EMPTY_ARRAY;
+ return TypeParameterType.EMPTY_LIST;
}
List<TypeParameterType> types = new List<TypeParameterType>(count);
for (int i = 0; i < count; i++) {
@@ -9891,6 +10050,11 @@ abstract class UriReferencedElementImpl extends ElementImpl
*/
abstract class VariableElement implements Element {
/**
+ * An empty list of variable elements.
+ */
+ static const List<VariableElement> EMPTY_LIST = const <VariableElement>[];
+
+ /**
* Return a synthetic function representing this variable's initializer, or
* `null` if this variable does not have an initializer. The function will
* have no parameters. The return type of the function will be the
@@ -9942,6 +10106,7 @@ abstract class VariableElementImpl extends ElementImpl
/**
* An empty list of variable elements.
*/
+ @deprecated // Use VariableElement.EMPTY_LIST
static const List<VariableElement> EMPTY_ARRAY = const <VariableElement>[];
/**
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698