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

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

Issue 475673002: Generate public static EMPTY_ARRAY fields for each object. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: review 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
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 9e2931eff3dc01d33d28c21ef8a27cc0d7db5823..393a81306e3d04eb01db3f14d75ee46d23eebe30 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
@@ -31,16 +31,9 @@ import org.apache.commons.lang3.StringUtils;
public class Element {
/**
- * A bit-map containing the following flags:
- *
- * - 0x01 - set if the element is explicitly or implicitly abstract
- * - 0x02 - set if the element was declared to be ‘const’
- * - 0x04 - set if the element was declared to be ‘final’
- * - 0x08 - set if the element is a static member of a class or is a top-level function or field
- * - 0x10 - set if the element is private
- * - 0x20 - set if the element is deprecated
+ * An empty array of {@link Element}s.
*/
- private final int flags;
+ public static final Element[] EMPTY_ARRAY = new Element[0];
/**
* The kind of the element.
@@ -48,14 +41,26 @@ public class Element {
private final String kind;
/**
+ * The name of the element. This is typically used as the label in the outline.
+ */
+ private final String name;
+
+ /**
* The location of the name in the declaration of the element.
*/
private final Location location;
/**
- * The name of the element. This is typically used as the label in the outline.
+ * A bit-map containing the following flags:
+ *
+ * - 0x01 - set if the element is explicitly or implicitly abstract
+ * - 0x02 - set if the element was declared to be ‘const’
+ * - 0x04 - set if the element was declared to be ‘final’
+ * - 0x08 - set if the element is a static member of a class or is a top-level function or field
+ * - 0x10 - set if the element is private
+ * - 0x20 - set if the element is deprecated
*/
- private final String name;
+ private final int flags;
/**
* The parameter list for the element. If the element is not a method or function this field will

Powered by Google App Engine
This is Rietveld 408576698