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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/FunctionTypeAlias.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/FunctionTypeAlias.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/FunctionTypeAlias.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/FunctionTypeAlias.java
index 2a666185a552a921f7eb119c08159ea4bf9d9c0c..67a51a1d4e0db50a39224c53d377a9a7e865c226 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/FunctionTypeAlias.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/FunctionTypeAlias.java
@@ -13,6 +13,7 @@
*/
package com.google.dart.engine.ast;
+import com.google.dart.engine.element.TypeAliasElement;
import com.google.dart.engine.scanner.Token;
import java.util.List;
@@ -79,6 +80,16 @@ public class FunctionTypeAlias extends TypeAlias {
}
/**
+ * Return the {@link TypeAliasElement} associated with this type alias, or {@code null} if the AST
+ * structure has not been resolved.
+ *
+ * @return the {@link TypeAliasElement} associated with this type alias
+ */
+ public TypeAliasElement getElement() {
+ return name != null ? (TypeAliasElement) name.getElement() : null;
+ }
+
+ /**
* Return the name of the function type being declared.
*
* @return the name of the function type being declared

Powered by Google App Engine
This is Rietveld 408576698