Index: pkg/analyzer/lib/dart/element/element.dart |
diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart |
index ae0c19d51245ad8751988300a4c01cd244cefda6..ce89e898f89f7552b1b173f38ab3e590679e51ad 100644 |
--- a/pkg/analyzer/lib/dart/element/element.dart |
+++ b/pkg/analyzer/lib/dart/element/element.dart |
@@ -412,7 +412,7 @@ abstract class ClassMemberElement implements Element { |
* |
* Clients may not extend, implement or mix-in this class. |
*/ |
-abstract class CompilationUnitElement implements Element { |
+abstract class CompilationUnitElement implements Element, UriReferencedElement { |
/** |
* An empty list of compilation unit elements. |
*/ |
@@ -1161,7 +1161,7 @@ abstract class ExecutableElement implements FunctionTypedElement { |
* |
* Clients may not extend, implement or mix-in this class. |
*/ |
-abstract class ExportElement implements Element { |
+abstract class ExportElement implements Element, UriReferencedElement { |
/** |
* An empty list of export elements. |
*/ |
@@ -1349,7 +1349,7 @@ abstract class HideElementCombinator implements NamespaceCombinator { |
* |
* Clients may not extend, implement or mix-in this class. |
*/ |
-abstract class ImportElement implements Element { |
+abstract class ImportElement implements Element, UriReferencedElement { |
/** |
* An empty list of import elements. |
*/ |
@@ -1949,6 +1949,31 @@ abstract class TypeParameterizedElement implements Element { |
abstract class UndefinedElement implements Element {} |
/** |
+ * An element included into a library using some URI. |
+ * |
+ * Clients may not extend, implement or mix-in this class. |
+ */ |
+abstract class UriReferencedElement implements Element { |
+ /** |
+ * 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. |
+ */ |
+ String get uri; |
+ |
+ /** |
+ * Return the offset of the character immediately following the last character |
+ * of this node's URI, or `-1` for synthetic import. |
+ */ |
+ int get uriEnd; |
+ |
+ /** |
+ * Return the offset of the URI in the file, or `-1` if this element is |
+ * synthetic. |
+ */ |
+ int get uriOffset; |
+} |
+ |
+/** |
* A variable. There are more specific subclasses for more specific kinds of |
* variables. |
* |