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

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

Issue 11787017: Initial implementation of MemoryIndexStoreImpl and IndexContributor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/ClassDeclaration.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ClassDeclaration.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ClassDeclaration.java
index d79de7485d164f706e8d2e3ef4cea8efeef553bf..2a847137cd56755bb15ab60d73172ad5cc652cff 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ClassDeclaration.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ClassDeclaration.java
@@ -13,6 +13,7 @@
*/
package com.google.dart.engine.ast;
+import com.google.dart.engine.element.ClassElement;
import com.google.dart.engine.scanner.Token;
import java.util.List;
@@ -137,6 +138,14 @@ public class ClassDeclaration extends CompilationUnitMember {
return classKeyword;
}
+ /**
+ * @return the {@link ClassElement} associated with this identifier, or {@code null} if the AST
+ * structure has not been resolved or if this identifier could not be resolved.
+ */
+ public ClassElement getElement() {
+ return name != null ? (ClassElement) name.getElement() : null;
+ }
+
@Override
public Token getEndToken() {
return rightBracket;

Powered by Google App Engine
This is Rietveld 408576698