Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 buffer.write('...'); | 121 buffer.write('...'); |
| 122 } | 122 } |
| 123 | 123 |
| 124 @override | 124 @override |
| 125 TypeImpl pruned(List<FunctionTypeAliasElement> prune) => this; | 125 TypeImpl pruned(List<FunctionTypeAliasElement> prune) => this; |
| 126 } | 126 } |
| 127 | 127 |
| 128 /** | 128 /** |
| 129 * An element that represents a class. | 129 * An element that represents a class. |
| 130 */ | 130 */ |
| 131 abstract class ClassElement implements Element { | 131 abstract class ClassElement implements TypeDefiningElement { |
| 132 /** | 132 /** |
| 133 * An empty list of class elements. | 133 * An empty list of class elements. |
| 134 */ | 134 */ |
| 135 static const List<ClassElement> EMPTY_LIST = const <ClassElement>[]; | 135 static const List<ClassElement> EMPTY_LIST = const <ClassElement>[]; |
| 136 | 136 |
| 137 /** | 137 /** |
| 138 * Return a list containing all of the accessors (getters and setters) | 138 * Return a list containing all of the accessors (getters and setters) |
| 139 * declared in this class. | 139 * declared in this class. |
| 140 */ | 140 */ |
| 141 List<PropertyAccessorElement> get accessors; | 141 List<PropertyAccessorElement> get accessors; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 261 * is possible for it to be semantically invalid. In particular, it is not | 261 * is possible for it to be semantically invalid. In particular, it is not |
| 262 * safe to assume that the inheritance structure of a class does not contain a | 262 * safe to assume that the inheritance structure of a class does not contain a |
| 263 * cycle. Clients that traverse the inheritance structure must explicitly | 263 * cycle. Clients that traverse the inheritance structure must explicitly |
| 264 * guard against infinite loops. | 264 * guard against infinite loops. |
| 265 */ | 265 */ |
| 266 InterfaceType get supertype; | 266 InterfaceType get supertype; |
| 267 | 267 |
| 268 /** | 268 /** |
| 269 * Return the type defined by the class. | 269 * Return the type defined by the class. |
| 270 */ | 270 */ |
| 271 @override | |
|
Brian Wilkerson
2015/06/08 18:22:24
We generally remove the comments for overriding me
Paul Berry
2015/06/08 18:26:24
Done.
| |
| 271 InterfaceType get type; | 272 InterfaceType get type; |
| 272 | 273 |
| 273 /** | 274 /** |
| 274 * Return a list containing all of the type parameters declared for this | 275 * Return a list containing all of the type parameters declared for this |
| 275 * class. | 276 * class. |
| 276 */ | 277 */ |
| 277 List<TypeParameterElement> get typeParameters; | 278 List<TypeParameterElement> get typeParameters; |
| 278 | 279 |
| 279 /** | 280 /** |
| 280 * Return the unnamed constructor declared in this class, or `null` if this | 281 * Return the unnamed constructor declared in this class, or `null` if this |
| (...skipping 1866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2147 } | 2148 } |
| 2148 | 2149 |
| 2149 @override | 2150 @override |
| 2150 DefaultFormalParameter computeNode() => | 2151 DefaultFormalParameter computeNode() => |
| 2151 getNodeMatching((node) => node is DefaultFormalParameter); | 2152 getNodeMatching((node) => node is DefaultFormalParameter); |
| 2152 } | 2153 } |
| 2153 | 2154 |
| 2154 /** | 2155 /** |
| 2155 * The synthetic element representing the declaration of the type `dynamic`. | 2156 * The synthetic element representing the declaration of the type `dynamic`. |
| 2156 */ | 2157 */ |
| 2157 class DynamicElementImpl extends ElementImpl { | 2158 class DynamicElementImpl extends ElementImpl implements TypeDefiningElement { |
| 2158 /** | 2159 /** |
| 2159 * Return the unique instance of this class. | 2160 * Return the unique instance of this class. |
| 2160 */ | 2161 */ |
| 2161 static DynamicElementImpl get instance => | 2162 static DynamicElementImpl get instance => |
| 2162 DynamicTypeImpl.instance.element as DynamicElementImpl; | 2163 DynamicTypeImpl.instance.element as DynamicElementImpl; |
| 2163 | 2164 |
| 2164 /** | 2165 /** |
| 2165 * The type defined by this element. | 2166 * The type defined by this element. |
| 2166 */ | 2167 */ |
| 2168 @override | |
| 2167 DynamicTypeImpl type; | 2169 DynamicTypeImpl type; |
| 2168 | 2170 |
| 2169 /** | 2171 /** |
| 2170 * Initialize a newly created instance of this class. Instances of this class | 2172 * Initialize a newly created instance of this class. Instances of this class |
| 2171 * should <b>not</b> be created except as part of creating the type associated | 2173 * should <b>not</b> be created except as part of creating the type associated |
| 2172 * with this element. The single instance of this class should be accessed | 2174 * with this element. The single instance of this class should be accessed |
| 2173 * through the method [getInstance]. | 2175 * through the method [getInstance]. |
| 2174 */ | 2176 */ |
| 2175 DynamicElementImpl() : super(Keyword.DYNAMIC.syntax, -1) { | 2177 DynamicElementImpl() : super(Keyword.DYNAMIC.syntax, -1) { |
| 2176 setModifier(Modifier.SYNTHETIC, true); | 2178 setModifier(Modifier.SYNTHETIC, true); |
| (...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4364 * Return the type resulting from substituting the given [argumentTypes] for | 4366 * Return the type resulting from substituting the given [argumentTypes] for |
| 4365 * this type's parameters. This is fully equivalent to | 4367 * this type's parameters. This is fully equivalent to |
| 4366 * `substitute(argumentTypes, getTypeArguments())`. | 4368 * `substitute(argumentTypes, getTypeArguments())`. |
| 4367 */ | 4369 */ |
| 4368 FunctionType substitute3(List<DartType> argumentTypes); | 4370 FunctionType substitute3(List<DartType> argumentTypes); |
| 4369 } | 4371 } |
| 4370 | 4372 |
| 4371 /** | 4373 /** |
| 4372 * A function type alias (`typedef`). | 4374 * A function type alias (`typedef`). |
| 4373 */ | 4375 */ |
| 4374 abstract class FunctionTypeAliasElement implements Element { | 4376 abstract class FunctionTypeAliasElement implements TypeDefiningElement { |
| 4375 /** | 4377 /** |
| 4376 * An empty array of type alias elements. | 4378 * An empty array of type alias elements. |
| 4377 */ | 4379 */ |
| 4378 static List<FunctionTypeAliasElement> EMPTY_LIST = | 4380 static List<FunctionTypeAliasElement> EMPTY_LIST = |
| 4379 new List<FunctionTypeAliasElement>(0); | 4381 new List<FunctionTypeAliasElement>(0); |
| 4380 | 4382 |
| 4381 /** | 4383 /** |
| 4382 * Return the compilation unit in which this type alias is defined. | 4384 * Return the compilation unit in which this type alias is defined. |
| 4383 */ | 4385 */ |
| 4384 @override | 4386 @override |
| 4385 CompilationUnitElement get enclosingElement; | 4387 CompilationUnitElement get enclosingElement; |
| 4386 | 4388 |
| 4387 /** | 4389 /** |
| 4388 * Return a list containing all of the parameters defined by this type alias. | 4390 * Return a list containing all of the parameters defined by this type alias. |
| 4389 */ | 4391 */ |
| 4390 List<ParameterElement> get parameters; | 4392 List<ParameterElement> get parameters; |
| 4391 | 4393 |
| 4392 /** | 4394 /** |
| 4393 * Return the return type defined by this type alias. | 4395 * Return the return type defined by this type alias. |
| 4394 */ | 4396 */ |
| 4395 DartType get returnType; | 4397 DartType get returnType; |
| 4396 | 4398 |
| 4397 /** | 4399 /** |
| 4398 * Return the type of function defined by this type alias. | 4400 * Return the type of function defined by this type alias. |
| 4399 */ | 4401 */ |
| 4402 @override | |
| 4400 FunctionType get type; | 4403 FunctionType get type; |
| 4401 | 4404 |
| 4402 /** | 4405 /** |
| 4403 * Return a list containing all of the type parameters defined for this type. | 4406 * Return a list containing all of the type parameters defined for this type. |
| 4404 */ | 4407 */ |
| 4405 List<TypeParameterElement> get typeParameters; | 4408 List<TypeParameterElement> get typeParameters; |
| 4406 | 4409 |
| 4407 /** | 4410 /** |
| 4408 * Return the resolved function type alias node that declares this element. | 4411 * Return the resolved function type alias node that declares this element. |
| 4409 * | 4412 * |
| (...skipping 5207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9617 | 9620 |
| 9618 @override | 9621 @override |
| 9619 accept(ElementVisitor visitor) => visitor.visitTopLevelVariableElement(this); | 9622 accept(ElementVisitor visitor) => visitor.visitTopLevelVariableElement(this); |
| 9620 | 9623 |
| 9621 @override | 9624 @override |
| 9622 VariableDeclaration computeNode() => | 9625 VariableDeclaration computeNode() => |
| 9623 getNodeMatching((node) => node is VariableDeclaration); | 9626 getNodeMatching((node) => node is VariableDeclaration); |
| 9624 } | 9627 } |
| 9625 | 9628 |
| 9626 /** | 9629 /** |
| 9630 * An element that defines a type. | |
| 9631 */ | |
| 9632 abstract class TypeDefiningElement implements Element { | |
| 9633 /** | |
| 9634 * Return the type defined by this element. | |
| 9635 */ | |
| 9636 DartType get type; | |
| 9637 } | |
| 9638 | |
| 9639 /** | |
| 9627 * The abstract class `TypeImpl` implements the behavior common to objects | 9640 * The abstract class `TypeImpl` implements the behavior common to objects |
| 9628 * representing the declared type of elements in the element model. | 9641 * representing the declared type of elements in the element model. |
| 9629 */ | 9642 */ |
| 9630 abstract class TypeImpl implements DartType { | 9643 abstract class TypeImpl implements DartType { |
| 9631 /** | 9644 /** |
| 9632 * An empty list of types. | 9645 * An empty list of types. |
| 9633 */ | 9646 */ |
| 9634 @deprecated // Use DartType.EMPTY_LIST | 9647 @deprecated // Use DartType.EMPTY_LIST |
| 9635 static const List<DartType> EMPTY_ARRAY = const <DartType>[]; | 9648 static const List<DartType> EMPTY_ARRAY = const <DartType>[]; |
| 9636 | 9649 |
| (...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10440 | 10453 |
| 10441 @override | 10454 @override |
| 10442 void visitElement(Element element) { | 10455 void visitElement(Element element) { |
| 10443 int offset = element.nameOffset; | 10456 int offset = element.nameOffset; |
| 10444 if (offset != -1) { | 10457 if (offset != -1) { |
| 10445 map[offset] = element; | 10458 map[offset] = element; |
| 10446 } | 10459 } |
| 10447 super.visitElement(element); | 10460 super.visitElement(element); |
| 10448 } | 10461 } |
| 10449 } | 10462 } |
| OLD | NEW |