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

Side by Side Diff: pkg/analyzer/lib/dart/element/element.dart

Issue 1633823003: Move Modifier out of the public API (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/element/type.dart'; 8 import 'package:analyzer/dart/element/type.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 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 */ 1340 */
1341 List<ImportElement> get imports; 1341 List<ImportElement> get imports;
1342 1342
1343 /** 1343 /**
1344 * Return `true` if this library is an application that can be run in the 1344 * Return `true` if this library is an application that can be run in the
1345 * browser. 1345 * browser.
1346 */ 1346 */
1347 bool get isBrowserApplication; 1347 bool get isBrowserApplication;
1348 1348
1349 /** 1349 /**
1350 * Return `true` if this library is the dart:async library.
1351 */
1352 bool get isDartAsync;
1353
1354 /**
1350 * Return `true` if this library is the dart:core library. 1355 * Return `true` if this library is the dart:core library.
1351 */ 1356 */
1352 bool get isDartCore; 1357 bool get isDartCore;
1353 1358
1354 /** 1359 /**
1355 * Return `true` if this library is the dart:async library.
1356 */
1357 bool get isDartAsync;
1358
1359 /**
1360 * Return `true` if this library is part of the SDK. 1360 * Return `true` if this library is part of the SDK.
1361 */ 1361 */
1362 bool get isInSdk; 1362 bool get isInSdk;
1363 1363
1364 /** 1364 /**
1365 * Return the element representing the synthetic function `loadLibrary` that 1365 * Return the element representing the synthetic function `loadLibrary` that
1366 * is implicitly defined for this library if the library is imported using a 1366 * is implicitly defined for this library if the library is imported using a
1367 * deferred import. 1367 * deferred import.
1368 */ 1368 */
1369 FunctionElement get loadLibraryFunction; 1369 FunctionElement get loadLibraryFunction;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 /** 1468 /**
1469 * An empty list of method elements. 1469 * An empty list of method elements.
1470 */ 1470 */
1471 static const List<MethodElement> EMPTY_LIST = const <MethodElement>[]; 1471 static const List<MethodElement> EMPTY_LIST = const <MethodElement>[];
1472 1472
1473 @override 1473 @override
1474 MethodDeclaration computeNode(); 1474 MethodDeclaration computeNode();
1475 } 1475 }
1476 1476
1477 /** 1477 /**
1478 * The enumeration `Modifier` defines constants for all of the modifiers defined
1479 * by the Dart language and for a few additional flags that are useful.
1480 *
1481 * Clients may not extend, implement or mix-in this class.
1482 */
1483 class Modifier extends Enum<Modifier> {
1484 /**
1485 * Indicates that the modifier 'abstract' was applied to the element.
1486 */
1487 static const Modifier ABSTRACT = const Modifier('ABSTRACT', 0);
1488
1489 /**
1490 * Indicates that an executable element has a body marked as being
1491 * asynchronous.
1492 */
1493 static const Modifier ASYNCHRONOUS = const Modifier('ASYNCHRONOUS', 1);
1494
1495 /**
1496 * Indicates that the modifier 'const' was applied to the element.
1497 */
1498 static const Modifier CONST = const Modifier('CONST', 2);
1499
1500 /**
1501 * Indicates that the import element represents a deferred library.
1502 */
1503 static const Modifier DEFERRED = const Modifier('DEFERRED', 3);
1504
1505 /**
1506 * Indicates that a class element was defined by an enum declaration.
1507 */
1508 static const Modifier ENUM = const Modifier('ENUM', 4);
1509
1510 /**
1511 * Indicates that a class element was defined by an enum declaration.
1512 */
1513 static const Modifier EXTERNAL = const Modifier('EXTERNAL', 5);
1514
1515 /**
1516 * Indicates that the modifier 'factory' was applied to the element.
1517 */
1518 static const Modifier FACTORY = const Modifier('FACTORY', 6);
1519
1520 /**
1521 * Indicates that the modifier 'final' was applied to the element.
1522 */
1523 static const Modifier FINAL = const Modifier('FINAL', 7);
1524
1525 /**
1526 * Indicates that an executable element has a body marked as being a
1527 * generator.
1528 */
1529 static const Modifier GENERATOR = const Modifier('GENERATOR', 8);
1530
1531 /**
1532 * Indicates that the pseudo-modifier 'get' was applied to the element.
1533 */
1534 static const Modifier GETTER = const Modifier('GETTER', 9);
1535
1536 /**
1537 * A flag used for libraries indicating that the defining compilation unit
1538 * contains at least one import directive whose URI uses the "dart-ext"
1539 * scheme.
1540 */
1541 static const Modifier HAS_EXT_URI = const Modifier('HAS_EXT_URI', 10);
1542
1543 /**
1544 * Indicates that the associated element did not have an explicit type
1545 * associated with it. If the element is an [ExecutableElement], then the
1546 * type being referred to is the return type.
1547 */
1548 static const Modifier IMPLICIT_TYPE = const Modifier('IMPLICIT_TYPE', 11);
1549
1550 /**
1551 * Indicates that a class is a mixin application.
1552 */
1553 static const Modifier MIXIN_APPLICATION =
1554 const Modifier('MIXIN_APPLICATION', 12);
1555
1556 /**
1557 * Indicates that the value of a parameter or local variable might be mutated
1558 * within the context.
1559 */
1560 static const Modifier POTENTIALLY_MUTATED_IN_CONTEXT =
1561 const Modifier('POTENTIALLY_MUTATED_IN_CONTEXT', 13);
1562
1563 /**
1564 * Indicates that the value of a parameter or local variable might be mutated
1565 * within the scope.
1566 */
1567 static const Modifier POTENTIALLY_MUTATED_IN_SCOPE =
1568 const Modifier('POTENTIALLY_MUTATED_IN_SCOPE', 14);
1569
1570 /**
1571 * Indicates that a class contains an explicit reference to 'super'.
1572 */
1573 static const Modifier REFERENCES_SUPER =
1574 const Modifier('REFERENCES_SUPER', 15);
1575
1576 /**
1577 * Indicates that the pseudo-modifier 'set' was applied to the element.
1578 */
1579 static const Modifier SETTER = const Modifier('SETTER', 16);
1580
1581 /**
1582 * Indicates that the modifier 'static' was applied to the element.
1583 */
1584 static const Modifier STATIC = const Modifier('STATIC', 17);
1585
1586 /**
1587 * Indicates that the element does not appear in the source code but was
1588 * implicitly created. For example, if a class does not define any
1589 * constructors, an implicit zero-argument constructor will be created and it
1590 * will be marked as being synthetic.
1591 */
1592 static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 18);
1593
1594 static const List<Modifier> values = const [
1595 ABSTRACT,
1596 ASYNCHRONOUS,
1597 CONST,
1598 DEFERRED,
1599 ENUM,
1600 EXTERNAL,
1601 FACTORY,
1602 FINAL,
1603 GENERATOR,
1604 GETTER,
1605 HAS_EXT_URI,
1606 IMPLICIT_TYPE,
1607 MIXIN_APPLICATION,
1608 POTENTIALLY_MUTATED_IN_CONTEXT,
1609 POTENTIALLY_MUTATED_IN_SCOPE,
1610 REFERENCES_SUPER,
1611 SETTER,
1612 STATIC,
1613 SYNTHETIC
1614 ];
1615
1616 const Modifier(String name, int ordinal) : super(name, ordinal);
1617 }
1618
1619 /**
1620 * A pseudo-element that represents multiple elements defined within a single 1478 * A pseudo-element that represents multiple elements defined within a single
1621 * scope that have the same name. This situation is not allowed by the language, 1479 * scope that have the same name. This situation is not allowed by the language,
1622 * so objects implementing this interface always represent an error. As a 1480 * so objects implementing this interface always represent an error. As a
1623 * result, most of the normal operations on elements do not make sense and will 1481 * result, most of the normal operations on elements do not make sense and will
1624 * return useless results. 1482 * return useless results.
1625 * 1483 *
1626 * Clients may not extend, implement or mix-in this class. 1484 * Clients may not extend, implement or mix-in this class.
1627 */ 1485 */
1628 abstract class MultiplyDefinedElement implements Element { 1486 abstract class MultiplyDefinedElement implements Element {
1629 /** 1487 /**
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2043 */ 1901 */
2044 bool get isStatic; 1902 bool get isStatic;
2045 1903
2046 /** 1904 /**
2047 * Return the declared type of this variable, or `null` if the variable did 1905 * Return the declared type of this variable, or `null` if the variable did
2048 * not have a declared type (such as if it was declared using the keyword 1906 * not have a declared type (such as if it was declared using the keyword
2049 * 'var'). 1907 * 'var').
2050 */ 1908 */
2051 DartType get type; 1909 DartType get type;
2052 } 1910 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698