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

Unified Diff: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Occurrences.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/Occurrences.java
diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Occurrences.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Occurrences.java
index 6fa79fd50488fc72fe2f1ee12991c00ad2878638..eb842ea14d4369e6cad745f1c1892bb08f4070a9 100644
--- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Occurrences.java
+++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/Occurrences.java
@@ -31,14 +31,14 @@ import org.apache.commons.lang3.StringUtils;
public class Occurrences {
/**
- * The element that was referenced.
+ * An empty array of {@link Occurrences}s.
*/
- private final Element element;
+ public static final Occurrences[] EMPTY_ARRAY = new Occurrences[0];
/**
- * The length of the name of the referenced element.
+ * The element that was referenced.
*/
- private final int length;
+ private final Element element;
/**
* The offsets of the name of the referenced element within the file.
@@ -46,6 +46,11 @@ public class Occurrences {
private final int[] offsets;
/**
+ * The length of the name of the referenced element.
+ */
+ private final int length;
+
+ /**
* Constructor for {@link Occurrences}.
*/
public Occurrences(Element element, int[] offsets, int length) {

Powered by Google App Engine
This is Rietveld 408576698