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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/Identifier.java

Issue 22854024: Rename Identifier.getElement (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: clean-up and fix Created 7 years, 4 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
Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/Identifier.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/Identifier.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/Identifier.java
index 8e4f866295f55f0bfeae85f360d1f414755d697a..a9ae0772ce65adb76f1a6270d95be26aec3d4124 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/Identifier.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/Identifier.java
@@ -40,14 +40,14 @@ public abstract class Identifier extends Expression {
}
/**
- * Return the element associated with this identifier based on propagated type information, or
- * {@code null} if the AST structure has not been resolved or if this identifier could not be
- * resolved. One example of the latter case is an identifier that is not defined within the scope
- * in which it appears.
+ * Return the best element available for this operator. If resolution was able to find a better
+ * element based on type propagation, that element will be returned. Otherwise, the element found
+ * using the result of static analysis will be returned. If resolution has not been performed,
+ * then {@code null} will be returned.
*
- * @return the element associated with this identifier
+ * @return the best element available for this operator
*/
- public abstract Element getElement();
+ public abstract Element getBestElement();
/**
* Return the lexical representation of the identifier.
@@ -57,6 +57,16 @@ public abstract class Identifier extends Expression {
public abstract String getName();
/**
+ * Return the element associated with this identifier based on propagated type information, or
+ * {@code null} if the AST structure has not been resolved or if this identifier could not be
+ * resolved. One example of the latter case is an identifier that is not defined within the scope
+ * in which it appears.
+ *
+ * @return the element associated with this identifier
+ */
+ public abstract Element getPropagatedElement();
+
+ /**
* Return the element associated with this identifier based on static type information, or
* {@code null} if the AST structure has not been resolved or if this identifier could not be
* resolved. One example of the latter case is an identifier that is not defined within the scope

Powered by Google App Engine
This is Rietveld 408576698