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

Unified Diff: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Element.java

Issue 482833002: Add additional flag methods and fields onto the generated Element type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « no previous file | pkg/analysis_server/tool/spec/codegen_java_types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Element.java
diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Element.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Element.java
index fc875545a2492906b91aa6056caa10c7d9c7834e..bfd72fcf75f06e8a579480b17f91c8d7cf4b661e 100644
--- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Element.java
+++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Element.java
@@ -35,6 +35,18 @@ public class Element {
*/
public static final Element[] EMPTY_ARRAY = new Element[0];
+ private static final int ABSTRACT = 0x01;
+
+ private static final int CONST = 0x02;
+
+ private static final int FINAL = 0x04;
+
+ private static final int TOP_LEVEL_STATIC = 0x08;
+
+ private static final int PRIVATE = 0x10;
+
+ private static final int DEPRECATED = 0x20;
+
/**
* The kind of the element.
*/
@@ -154,6 +166,30 @@ public class Element {
return returnType;
}
+ public boolean isAbstract() {
+ return (flags & ABSTRACT) != 0;
+ }
+
+ public boolean isConst() {
+ return (flags & CONST) != 0;
+ }
+
+ public boolean isDeprecated() {
+ return (flags & DEPRECATED) != 0;
+ }
+
+ public boolean isFinal() {
+ return (flags & FINAL) != 0;
+ }
+
+ public boolean isPrivate() {
+ return (flags & PRIVATE) != 0;
+ }
+
+ public boolean isTopLevelOrStatic() {
+ return (flags & TOP_LEVEL_STATIC) != 0;
+ }
+
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
« no previous file with comments | « no previous file | pkg/analysis_server/tool/spec/codegen_java_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698