From ff4eb0f744805019c08865e9eebcd99bf99d59dc Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Thu, 2 Aug 2012 12:10:07 -0500 Subject: [PATCH] Transition classes except for SetTransition are final --- runtime/Java/src/org/antlr/v4/runtime/atn/ActionTransition.java | 2 +- runtime/Java/src/org/antlr/v4/runtime/atn/AtomTransition.java | 2 +- .../Java/src/org/antlr/v4/runtime/atn/EpsilonTransition.java | 2 +- runtime/Java/src/org/antlr/v4/runtime/atn/NotSetTransition.java | 2 +- .../Java/src/org/antlr/v4/runtime/atn/PredicateTransition.java | 2 +- runtime/Java/src/org/antlr/v4/runtime/atn/RangeTransition.java | 2 +- runtime/Java/src/org/antlr/v4/runtime/atn/RuleTransition.java | 2 +- .../Java/src/org/antlr/v4/runtime/atn/WildcardTransition.java | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ActionTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ActionTransition.java index 546fdea35..23162f1b5 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/atn/ActionTransition.java +++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ActionTransition.java @@ -31,7 +31,7 @@ package org.antlr.v4.runtime.atn; import org.antlr.v4.runtime.misc.NotNull; -public class ActionTransition extends Transition { +public final class ActionTransition extends Transition { public final int ruleIndex; public final int actionIndex; public final boolean isCtxDependent; // e.g., $i ref in action diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/AtomTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/AtomTransition.java index 8adb833f3..37c868fc6 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/atn/AtomTransition.java +++ b/runtime/Java/src/org/antlr/v4/runtime/atn/AtomTransition.java @@ -33,7 +33,7 @@ import org.antlr.v4.runtime.misc.NotNull; import org.antlr.v4.runtime.misc.IntervalSet; /** TODO: make all transitions sets? no, should remove set edges */ -public class AtomTransition extends Transition { +public final class AtomTransition extends Transition { /** The token type or character value; or, signifies special label. */ public final int label; diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/EpsilonTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/EpsilonTransition.java index 8678ecf1a..3ff8a97a0 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/atn/EpsilonTransition.java +++ b/runtime/Java/src/org/antlr/v4/runtime/atn/EpsilonTransition.java @@ -31,7 +31,7 @@ package org.antlr.v4.runtime.atn; import org.antlr.v4.runtime.misc.NotNull; -public class EpsilonTransition extends Transition { +public final class EpsilonTransition extends Transition { public EpsilonTransition(@NotNull ATNState target) { super(target); } @Override diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/NotSetTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/NotSetTransition.java index 11e060283..5f66abec3 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/atn/NotSetTransition.java +++ b/runtime/Java/src/org/antlr/v4/runtime/atn/NotSetTransition.java @@ -33,7 +33,7 @@ import org.antlr.v4.runtime.misc.IntervalSet; import org.antlr.v4.runtime.misc.NotNull; import org.antlr.v4.runtime.misc.Nullable; -public class NotSetTransition extends SetTransition { +public final class NotSetTransition extends SetTransition { public NotSetTransition(@NotNull ATNState target, @Nullable IntervalSet set) { super(target, set); } diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/PredicateTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/PredicateTransition.java index 32b389b2f..4e6d17bcc 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/atn/PredicateTransition.java +++ b/runtime/Java/src/org/antlr/v4/runtime/atn/PredicateTransition.java @@ -37,7 +37,7 @@ import org.antlr.v4.runtime.misc.NotNull; * may have to combine a bunch of them as it collects predicates from * multiple ATN configurations into a single DFA state. */ -public class PredicateTransition extends Transition { +public final class PredicateTransition extends Transition { public final int ruleIndex; public final int predIndex; public final boolean isCtxDependent; // e.g., $i ref in pred diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/RangeTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/RangeTransition.java index b2212c3f7..988b36640 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/atn/RangeTransition.java +++ b/runtime/Java/src/org/antlr/v4/runtime/atn/RangeTransition.java @@ -32,7 +32,7 @@ package org.antlr.v4.runtime.atn; import org.antlr.v4.runtime.misc.NotNull; import org.antlr.v4.runtime.misc.IntervalSet; -public class RangeTransition extends Transition { +public final class RangeTransition extends Transition { public final int from; public final int to; diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/RuleTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/RuleTransition.java index 4c1128083..b7f4cf10f 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/atn/RuleTransition.java +++ b/runtime/Java/src/org/antlr/v4/runtime/atn/RuleTransition.java @@ -32,7 +32,7 @@ package org.antlr.v4.runtime.atn; import org.antlr.v4.runtime.misc.NotNull; /** */ -public class RuleTransition extends Transition { +public final class RuleTransition extends Transition { /** Ptr to the rule definition object for this rule ref */ public final int ruleIndex; // no Rule object at runtime diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/WildcardTransition.java b/runtime/Java/src/org/antlr/v4/runtime/atn/WildcardTransition.java index f5b175ef7..22c8edd97 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/atn/WildcardTransition.java +++ b/runtime/Java/src/org/antlr/v4/runtime/atn/WildcardTransition.java @@ -31,7 +31,7 @@ package org.antlr.v4.runtime.atn; import org.antlr.v4.runtime.misc.NotNull; -public class WildcardTransition extends Transition { +public final class WildcardTransition extends Transition { public WildcardTransition(@NotNull ATNState target) { super(target); } @Override