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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/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
Index: pkg/analyzer_experimental/lib/src/generated/java_core.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/java_core.dart b/pkg/analyzer_experimental/lib/src/generated/java_core.dart
index f4b3937205dc5319f160445c3274982743570833..c3dadd0d2165b02dbdf197271e9fbf26b1c5806b 100644
--- a/pkg/analyzer_experimental/lib/src/generated/java_core.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/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;
}

Powered by Google App Engine
This is Rietveld 408576698