| 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 library analyzer.dart.element.element; | 5 library analyzer.dart.element.element; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/element/type.dart'; | 7 import 'package:analyzer/dart/element/type.dart'; |
| 8 import 'package:analyzer/src/generated/ast.dart'; | 8 import 'package:analyzer/src/generated/ast.dart'; |
| 9 import 'package:analyzer/src/generated/constant.dart' show DartObject; | 9 import 'package:analyzer/src/generated/constant.dart' show DartObject; |
| 10 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; | 10 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 * Return the display name of this element, or `null` if this element does not | 551 * Return the display name of this element, or `null` if this element does not |
| 552 * have a name. | 552 * have a name. |
| 553 * | 553 * |
| 554 * In most cases the name and the display name are the same. Differences | 554 * In most cases the name and the display name are the same. Differences |
| 555 * though are cases such as setters where the name of some setter `set f(x)` | 555 * though are cases such as setters where the name of some setter `set f(x)` |
| 556 * is `f=`, instead of `f`. | 556 * is `f=`, instead of `f`. |
| 557 */ | 557 */ |
| 558 String get displayName; | 558 String get displayName; |
| 559 | 559 |
| 560 /** | 560 /** |
| 561 * Return the content of the documentation comment (including delimiters) for | |
| 562 * this element, or `null` if this element does not or cannot have | |
| 563 * documentation. | |
| 564 */ | |
| 565 String get documentationComment; | |
| 566 | |
| 567 /** | |
| 568 * Return the source range of the documentation comment for this element, | 561 * Return the source range of the documentation comment for this element, |
| 569 * or `null` if this element does not or cannot have a documentation. | 562 * or `null` if this element does not or cannot have a documentation. |
| 570 * | 563 * |
| 571 * Deprecated. Use [documentationComment] instead. | 564 * Deprecated. Use [documentationComment] instead. |
| 572 */ | 565 */ |
| 573 @deprecated | 566 @deprecated |
| 574 SourceRange get docRange; | 567 SourceRange get docRange; |
| 575 | 568 |
| 576 /** | 569 /** |
| 570 * Return the content of the documentation comment (including delimiters) for |
| 571 * this element, or `null` if this element does not or cannot have |
| 572 * documentation. |
| 573 */ |
| 574 String get documentationComment; |
| 575 |
| 576 /** |
| 577 * Return the element that either physically or logically encloses this | 577 * Return the element that either physically or logically encloses this |
| 578 * element. This will be `null` if this element is a library because libraries | 578 * element. This will be `null` if this element is a library because libraries |
| 579 * are the top-level elements in the model. | 579 * are the top-level elements in the model. |
| 580 */ | 580 */ |
| 581 Element get enclosingElement; | 581 Element get enclosingElement; |
| 582 | 582 |
| 583 /** | 583 /** |
| 584 * The unique integer identifier of this element. | 584 * The unique integer identifier of this element. |
| 585 */ | 585 */ |
| 586 int get id; | 586 int get id; |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 | 1146 |
| 1147 @override | 1147 @override |
| 1148 FunctionDeclaration computeNode(); | 1148 FunctionDeclaration computeNode(); |
| 1149 } | 1149 } |
| 1150 | 1150 |
| 1151 /** | 1151 /** |
| 1152 * A function type alias (`typedef`). | 1152 * A function type alias (`typedef`). |
| 1153 * | 1153 * |
| 1154 * Clients may not extend, implement or mix-in this class. | 1154 * Clients may not extend, implement or mix-in this class. |
| 1155 */ | 1155 */ |
| 1156 abstract class FunctionTypeAliasElement implements FunctionTypedElement { | 1156 abstract class FunctionTypeAliasElement |
| 1157 implements FunctionTypedElement, TypeDefiningElement { |
| 1157 /** | 1158 /** |
| 1158 * An empty array of type alias elements. | 1159 * An empty array of type alias elements. |
| 1159 */ | 1160 */ |
| 1160 static List<FunctionTypeAliasElement> EMPTY_LIST = | 1161 static List<FunctionTypeAliasElement> EMPTY_LIST = |
| 1161 new List<FunctionTypeAliasElement>(0); | 1162 new List<FunctionTypeAliasElement>(0); |
| 1162 | 1163 |
| 1163 /** | 1164 /** |
| 1164 * Return the compilation unit in which this type alias is defined. | 1165 * Return the compilation unit in which this type alias is defined. |
| 1165 */ | 1166 */ |
| 1166 @override | 1167 @override |
| 1167 CompilationUnitElement get enclosingElement; | 1168 CompilationUnitElement get enclosingElement; |
| 1168 | 1169 |
| 1169 @override | 1170 @override |
| 1170 FunctionTypeAlias computeNode(); | 1171 FunctionTypeAlias computeNode(); |
| 1171 } | 1172 } |
| 1172 | 1173 |
| 1173 /** | 1174 /** |
| 1174 * An element that has a [FunctionType] as its [type]. | 1175 * An element that has a [FunctionType] as its [type]. |
| 1175 * | 1176 * |
| 1176 * This also provides convenient access to the parameters and return type. | 1177 * This also provides convenient access to the parameters and return type. |
| 1177 * | 1178 * |
| 1178 * Clients may not extend, implement or mix-in this class. | 1179 * Clients may not extend, implement or mix-in this class. |
| 1179 */ | 1180 */ |
| 1180 abstract class FunctionTypedElement | 1181 abstract class FunctionTypedElement implements TypeParameterizedElement { |
| 1181 implements TypeDefiningElement, TypeParameterizedElement { | |
| 1182 /** | 1182 /** |
| 1183 * Return a list containing all of the parameters defined by this executable | 1183 * Return a list containing all of the parameters defined by this executable |
| 1184 * element. | 1184 * element. |
| 1185 */ | 1185 */ |
| 1186 List<ParameterElement> get parameters; | 1186 List<ParameterElement> get parameters; |
| 1187 | 1187 |
| 1188 /** | 1188 /** |
| 1189 * Return the return type defined by this element. If the element model is | 1189 * Return the return type defined by this element. If the element model is |
| 1190 * fully populated, then the [returnType] will not be `null`, even if no | 1190 * fully populated, then the [returnType] will not be `null`, even if no |
| 1191 * return type was explicitly specified. | 1191 * return type was explicitly specified. |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2042 */ | 2042 */ |
| 2043 bool get isStatic; | 2043 bool get isStatic; |
| 2044 | 2044 |
| 2045 /** | 2045 /** |
| 2046 * Return the declared type of this variable, or `null` if the variable did | 2046 * Return the declared type of this variable, or `null` if the variable did |
| 2047 * not have a declared type (such as if it was declared using the keyword | 2047 * not have a declared type (such as if it was declared using the keyword |
| 2048 * 'var'). | 2048 * 'var'). |
| 2049 */ | 2049 */ |
| 2050 DartType get type; | 2050 DartType get type; |
| 2051 } | 2051 } |
| OLD | NEW |