| 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 /** | 5 /** |
| 6 * Defines the element model. The element model describes the semantic (as | 6 * Defines the element model. The element model describes the semantic (as |
| 7 * opposed to syntactic) structure of Dart code. The syntactic structure of the | 7 * opposed to syntactic) structure of Dart code. The syntactic structure of the |
| 8 * code is modeled by the [AST structure](../ast/ast.dart). | 8 * code is modeled by the [AST structure](../ast/ast.dart). |
| 9 * | 9 * |
| 10 * The element model consists of two closely related kinds of objects: elements | 10 * The element model consists of two closely related kinds of objects: elements |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 * | 30 * |
| 31 * The element model does not contain everything in the code, only those things | 31 * The element model does not contain everything in the code, only those things |
| 32 * that are declared by the code. For example, it does not include any | 32 * that are declared by the code. For example, it does not include any |
| 33 * representation of the statements in a method body, but if one of those | 33 * representation of the statements in a method body, but if one of those |
| 34 * statements declares a local variable then the local variable will be | 34 * statements declares a local variable then the local variable will be |
| 35 * represented by an element. | 35 * represented by an element. |
| 36 */ | 36 */ |
| 37 library analyzer.dart.element.element; | 37 library analyzer.dart.element.element; |
| 38 | 38 |
| 39 import 'package:analyzer/dart/ast/ast.dart'; | 39 import 'package:analyzer/dart/ast/ast.dart'; |
| 40 import 'package:analyzer/dart/constant/value.dart'; |
| 40 import 'package:analyzer/dart/element/type.dart'; | 41 import 'package:analyzer/dart/element/type.dart'; |
| 41 import 'package:analyzer/src/generated/constant.dart' show DartObject; | |
| 42 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; | 42 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; |
| 43 import 'package:analyzer/src/generated/java_core.dart'; | 43 import 'package:analyzer/src/generated/java_core.dart'; |
| 44 import 'package:analyzer/src/generated/java_engine.dart'; | 44 import 'package:analyzer/src/generated/java_engine.dart'; |
| 45 import 'package:analyzer/src/generated/resolver.dart'; | 45 import 'package:analyzer/src/generated/resolver.dart'; |
| 46 import 'package:analyzer/src/generated/source.dart'; | 46 import 'package:analyzer/src/generated/source.dart'; |
| 47 import 'package:analyzer/src/generated/utilities_dart.dart'; | 47 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 48 import 'package:analyzer/src/task/dart.dart'; | 48 import 'package:analyzer/src/task/dart.dart'; |
| 49 import 'package:analyzer/task/model.dart' show AnalysisTarget; | 49 import 'package:analyzer/task/model.dart' show AnalysisTarget; |
| 50 | 50 |
| 51 /** | 51 /** |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 */ | 801 */ |
| 802 Element get element; | 802 Element get element; |
| 803 | 803 |
| 804 /** | 804 /** |
| 805 * Return `true` if this annotation marks the associated element as being | 805 * Return `true` if this annotation marks the associated element as being |
| 806 * deprecated. | 806 * deprecated. |
| 807 */ | 807 */ |
| 808 bool get isDeprecated; | 808 bool get isDeprecated; |
| 809 | 809 |
| 810 /** | 810 /** |
| 811 * Return `true` if this annotation marks the associated member as requiring |
| 812 * overriding methods to call super. |
| 813 */ |
| 814 bool get isMustCallSuper; |
| 815 |
| 816 /** |
| 811 * Return `true` if this annotation marks the associated method as being | 817 * Return `true` if this annotation marks the associated method as being |
| 812 * expected to override an inherited method. | 818 * expected to override an inherited method. |
| 813 */ | 819 */ |
| 814 bool get isOverride; | 820 bool get isOverride; |
| 815 | 821 |
| 816 /** | 822 /** |
| 817 * Return `true` if this annotation marks the associated member as requiring | |
| 818 * overriding methods to call super. | |
| 819 */ | |
| 820 bool get isMustCallSuper; | |
| 821 | |
| 822 /** | |
| 823 * Return `true` if this annotation marks the associated member as being | 823 * Return `true` if this annotation marks the associated member as being |
| 824 * protected. | 824 * protected. |
| 825 */ | 825 */ |
| 826 bool get isProtected; | 826 bool get isProtected; |
| 827 | 827 |
| 828 /** | 828 /** |
| 829 * Return `true` if this annotation marks the associated class as implementing | 829 * Return `true` if this annotation marks the associated class as implementing |
| 830 * a proxy object. | 830 * a proxy object. |
| 831 */ | 831 */ |
| 832 bool get isProxy; | 832 bool get isProxy; |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1323 * | 1323 * |
| 1324 * Clients may not extend, implement or mix-in this class. | 1324 * Clients may not extend, implement or mix-in this class. |
| 1325 */ | 1325 */ |
| 1326 abstract class LibraryElement implements Element { | 1326 abstract class LibraryElement implements Element { |
| 1327 /** | 1327 /** |
| 1328 * An empty list of library elements. | 1328 * An empty list of library elements. |
| 1329 */ | 1329 */ |
| 1330 static const List<LibraryElement> EMPTY_LIST = const <LibraryElement>[]; | 1330 static const List<LibraryElement> EMPTY_LIST = const <LibraryElement>[]; |
| 1331 | 1331 |
| 1332 /** | 1332 /** |
| 1333 * Return a list containing the strongly connected component in the | |
| 1334 * import/export graph in which the current library resides. | |
| 1335 */ | |
| 1336 List<LibraryElement> get libraryCycle; | |
| 1337 | |
| 1338 /** | |
| 1339 * Return the compilation unit that defines this library. | 1333 * Return the compilation unit that defines this library. |
| 1340 */ | 1334 */ |
| 1341 CompilationUnitElement get definingCompilationUnit; | 1335 CompilationUnitElement get definingCompilationUnit; |
| 1342 | 1336 |
| 1343 /** | 1337 /** |
| 1344 * Return the entry point for this library, or `null` if this library does not | 1338 * Return the entry point for this library, or `null` if this library does not |
| 1345 * have an entry point. The entry point is defined to be a zero argument | 1339 * have an entry point. The entry point is defined to be a zero argument |
| 1346 * top-level function whose name is `main`. | 1340 * top-level function whose name is `main`. |
| 1347 */ | 1341 */ |
| 1348 FunctionElement get entryPoint; | 1342 FunctionElement get entryPoint; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1410 * Return `true` if this library is the dart:core library. | 1404 * Return `true` if this library is the dart:core library. |
| 1411 */ | 1405 */ |
| 1412 bool get isDartCore; | 1406 bool get isDartCore; |
| 1413 | 1407 |
| 1414 /** | 1408 /** |
| 1415 * Return `true` if this library is part of the SDK. | 1409 * Return `true` if this library is part of the SDK. |
| 1416 */ | 1410 */ |
| 1417 bool get isInSdk; | 1411 bool get isInSdk; |
| 1418 | 1412 |
| 1419 /** | 1413 /** |
| 1414 * Return a list containing the strongly connected component in the |
| 1415 * import/export graph in which the current library resides. |
| 1416 */ |
| 1417 List<LibraryElement> get libraryCycle; |
| 1418 |
| 1419 /** |
| 1420 * Return the element representing the synthetic function `loadLibrary` that | 1420 * Return the element representing the synthetic function `loadLibrary` that |
| 1421 * is implicitly defined for this library if the library is imported using a | 1421 * is implicitly defined for this library if the library is imported using a |
| 1422 * deferred import. | 1422 * deferred import. |
| 1423 */ | 1423 */ |
| 1424 FunctionElement get loadLibraryFunction; | 1424 FunctionElement get loadLibraryFunction; |
| 1425 | 1425 |
| 1426 /** | 1426 /** |
| 1427 * Return a list containing all of the compilation units that are included in | 1427 * Return a list containing all of the compilation units that are included in |
| 1428 * this library using a `part` directive. This does not include the defining | 1428 * this library using a `part` directive. This does not include the defining |
| 1429 * compilation unit that contains the `part` directives. | 1429 * compilation unit that contains the `part` directives. |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1968 */ | 1968 */ |
| 1969 bool get isStatic; | 1969 bool get isStatic; |
| 1970 | 1970 |
| 1971 /** | 1971 /** |
| 1972 * Return the declared type of this variable, or `null` if the variable did | 1972 * Return the declared type of this variable, or `null` if the variable did |
| 1973 * not have a declared type (such as if it was declared using the keyword | 1973 * not have a declared type (such as if it was declared using the keyword |
| 1974 * 'var'). | 1974 * 'var'). |
| 1975 */ | 1975 */ |
| 1976 DartType get type; | 1976 DartType get type; |
| 1977 } | 1977 } |
| OLD | NEW |