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

Unified Diff: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/TypeHierarchyItem.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: 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/TypeHierarchyItem.java
diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/TypeHierarchyItem.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/TypeHierarchyItem.java
index 457c13675109234f6aaf4158f69be302ae6dcbac..b55f9e5a58ac426682a06a9f7da45acb48819785 100644
--- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/TypeHierarchyItem.java
+++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/TypeHierarchyItem.java
@@ -31,6 +31,11 @@ import org.apache.commons.lang3.StringUtils;
public class TypeHierarchyItem {
/**
+ * An empty array of {@link TypeHierarchyItem}s.
+ */
+ public static final TypeHierarchyItem[] EMPTY_ARRAY = new TypeHierarchyItem[0];
+
+ /**
* The class element represented by this item.
*/
private final Element classElement;
@@ -43,12 +48,6 @@ public class TypeHierarchyItem {
private final String displayName;
/**
- * The indexes of the items representing the interfaces implemented by this class. The list will be
- * empty if there are no implemented interfaces.
- */
- private final int[] interfaces;
-
- /**
* The member in the class corresponding to the member on which the hierarchy was requested. This
* field will be omitted if the hierarchy was not requested for a member or if the class does not
* have a corresponding member.
@@ -56,6 +55,18 @@ public class TypeHierarchyItem {
private final Element memberElement;
/**
+ * The index of the item representing the superclass of this class. This field will be omitted if
+ * this item represents the class Object.
+ */
+ private final int superclass;
+
+ /**
+ * The indexes of the items representing the interfaces implemented by this class. The list will be
+ * empty if there are no implemented interfaces.
+ */
+ private final int[] interfaces;
+
+ /**
* The indexes of the items representing the mixins referenced by this class. The list will be
* empty if there are no classes mixed in to this class.
*/
@@ -68,12 +79,6 @@ public class TypeHierarchyItem {
private final int[] subclasses;
/**
- * The index of the item representing the superclass of this class. This field will be omitted if
- * this item represents the class Object.
- */
- private final int superclass;
-
- /**
* Constructor for {@link TypeHierarchyItem}.
*/
public TypeHierarchyItem(Element classElement, String displayName, Element memberElement, int superclass, int[] interfaces, int[] mixins, int[] subclasses) {

Powered by Google App Engine
This is Rietveld 408576698