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

Unified Diff: editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart

Issue 23852002: java2dart improvements and new analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
diff --git a/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart b/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
index f4b3937205dc5319f160445c3274982743570833..c3dadd0d2165b02dbdf197271e9fbf26b1c5806b 100644
--- a/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
+++ b/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
@@ -554,7 +554,13 @@ class JavaStringBuilder {
}
}
-abstract class Enum<E> implements Comparable<E> {
- int get ordinal;
- String get name;
+abstract class Enum<E extends Enum> implements Comparable<E> {
+ /// The name of this enum constant, as declared in the enum declaration.
+ final String name;
+ /// The position in the enum declaration.
+ final int ordinal;
+ Enum(this.name, this.ordinal);
+ int get hashCode => ordinal;
+ String toString() => name;
+ int compareTo(E other) => ordinal - other.ordinal;
}
« no previous file with comments | « no previous file | editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698