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

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

Issue 198453002: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | « pkg/analyzer/lib/src/generated/constant.dart ('k') | pkg/analyzer/lib/src/generated/engine.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 def17b3596d031faeec43c59127cc7b4e7ce1223..9f273be81549e47ce4687bf5496356c55244dcb4 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -204,6 +204,13 @@ abstract class ClassElement implements Element {
bool get hasReferenceToSuper;
/**
+ * Return `true` if this class declares a static member.
+ *
+ * @return `true` if this class declares a static member
+ */
+ bool get hasStaticMember;
+
+ /**
* Return `true` if this class is abstract. A class is abstract if it has an explicit
* `abstract` modifier. Note, that this definition of <i>abstract</i> is different from
* <i>has unimplemented members</i>.
@@ -1226,14 +1233,6 @@ abstract class ImportElement implements Element, UriReferencedElement {
* @return the offset of the prefix of this import
*/
int get prefixOffset;
-
- /**
- * Return the offset of the character immediately following the last character of this node's URI,
- * or `-1` for synthetic import.
- *
- * @return the offset of the character just past the node's URI
- */
- int get uriEnd;
}
/**
@@ -1743,6 +1742,21 @@ abstract class UndefinedElement implements Element {
*/
abstract class UriReferencedElement implements Element {
/**
+ * Return the offset of the character immediately following the last character of this node's URI,
+ * or `-1` for synthetic import.
+ *
+ * @return the offset of the character just past the node's URI
+ */
+ int get uriEnd;
+
+ /**
+ * Return the offset of the URU in the file, or `-1` if this element is synthetic.
+ *
+ * @return the offset of the URI
+ */
+ int get uriOffset;
+
+ /**
* Return the URI that is used to include this element into the enclosing library, or `null`
* if this is the defining compilation unit of a library.
*
@@ -2805,6 +2819,21 @@ class ClassElementImpl extends ElementImpl implements ClassElement {
bool get hasReferenceToSuper => hasModifier(Modifier.REFERENCES_SUPER);
@override
+ bool get hasStaticMember {
+ for (MethodElement method in _methods) {
+ if (method.isStatic) {
+ return true;
+ }
+ }
+ for (PropertyAccessorElement accessor in _accessors) {
+ if (accessor.isStatic) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @override
bool get isAbstract => hasModifier(Modifier.ABSTRACT);
@override
@@ -3109,7 +3138,7 @@ class ClassElementImpl extends ElementImpl implements ClassElement {
* Instances of the class `CompilationUnitElementImpl` implement a
* [CompilationUnitElement].
*/
-class CompilationUnitElementImpl extends ElementImpl implements CompilationUnitElement {
+class CompilationUnitElementImpl extends UriReferencedElementImpl implements CompilationUnitElement {
/**
* An empty array of compilation unit elements.
*/
@@ -3152,12 +3181,6 @@ class CompilationUnitElementImpl extends ElementImpl implements CompilationUnitE
List<TopLevelVariableElement> _variables = TopLevelVariableElementImpl.EMPTY_ARRAY;
/**
- * The URI that is specified by the "part" directive in the enclosing library, or `null` if
- * this is the defining compilation unit of a library.
- */
- String uri;
-
- /**
* An array containing all of the Angular views contained in this compilation unit.
*/
List<AngularViewElement> _angularViews = AngularViewElement.EMPTY_ARRAY;
@@ -4519,12 +4542,7 @@ abstract class ExecutableElementImpl extends ElementImpl implements ExecutableEl
/**
* Instances of the class `ExportElementImpl` implement an [ExportElement].
*/
-class ExportElementImpl extends ElementImpl implements ExportElement {
- /**
- * The URI that is specified by this directive.
- */
- String uri;
-
+class ExportElementImpl extends UriReferencedElementImpl implements ExportElement {
/**
* The library that is exported from this library by this export directive.
*/
@@ -4539,7 +4557,7 @@ class ExportElementImpl extends ElementImpl implements ExportElement {
/**
* Initialize a newly created export element.
*/
- ExportElementImpl() : super.forNode(null);
+ ExportElementImpl() : super(null, -1);
@override
accept(ElementVisitor visitor) => visitor.visitExportElement(this);
@@ -5027,13 +5045,7 @@ abstract class HtmlScriptElementImpl extends ElementImpl implements HtmlScriptEl
/**
* Instances of the class `ImportElementImpl` implement an [ImportElement].
*/
-class ImportElementImpl extends ElementImpl implements ImportElement {
- /**
- * The offset of the character immediately following the last character of this node's URI, may be
- * `-1` if synthetic.
- */
- int uriEnd = -1;
-
+class ImportElementImpl extends UriReferencedElementImpl implements ImportElement {
/**
* The offset of the prefix of this import in the file that contains the this import directive, or
* `-1` if this import is synthetic.
@@ -5041,11 +5053,6 @@ class ImportElementImpl extends ElementImpl implements ImportElement {
int prefixOffset = 0;
/**
- * The URI that is specified by this directive.
- */
- String uri;
-
- /**
* The library that is imported into this library by this import directive.
*/
LibraryElement importedLibrary;
@@ -6583,6 +6590,36 @@ class TypeParameterElementImpl extends ElementImpl implements TypeParameterEleme
}
/**
+ * Instances of the class `UriReferencedElementImpl` implement an [UriReferencedElement]
+ * .
+ */
+abstract class UriReferencedElementImpl extends ElementImpl implements UriReferencedElement {
+ /**
+ * The offset of the URU in the file, may be `-1` if synthetic.
+ */
+ int uriOffset = -1;
+
+ /**
+ * The offset of the character immediately following the last character of this node's URI, may be
+ * `-1` if synthetic.
+ */
+ int uriEnd = -1;
+
+ /**
+ * The URI that is specified by this directive.
+ */
+ String uri;
+
+ /**
+ * Initialize a newly created import element.
+ *
+ * @param name the name of this element
+ * @param offset the directive offset, may be `-1` if synthetic.
+ */
+ UriReferencedElementImpl(String name, int offset) : super(name, offset);
+}
+
+/**
* Instances of the class `VariableElementImpl` implement a `VariableElement`.
*/
abstract class VariableElementImpl extends ElementImpl implements VariableElement {
« no previous file with comments | « pkg/analyzer/lib/src/generated/constant.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698