v4: Simple use of generics

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9343]
This commit is contained in:
sharwell 2011-11-17 16:59:28 -08:00
parent 36a9af8b29
commit 818be0bfb7
2 changed files with 4 additions and 4 deletions

View File

@ -70,8 +70,8 @@ public class ATNState {
"PLUS_LOOP_BACK",
};
public static Map<Class, Integer> serializationTypes =
new HashMap<Class, Integer>() {{
public static Map<Class<? extends ATNState>, Integer> serializationTypes =
new HashMap<Class<? extends ATNState>, Integer>() {{
put(ATNState.class, BASIC);
put(RuleStartState.class, RULE_START);
put(BlockStartState.class, BLOCK_START);

View File

@ -71,8 +71,8 @@ public abstract class Transition {
"WILDCARD",
};
public static Map<Class, Integer> serializationTypes =
new HashMap<Class, Integer>() {{
public static Map<Class<? extends Transition>, Integer> serializationTypes =
new HashMap<Class<? extends Transition>, Integer>() {{
put(EpsilonTransition.class, EPSILON);
put(RangeTransition.class, RANGE);
put(RuleTransition.class, RULE);