Class RegexReachabilityChecker
- java.lang.Object
-
- org.sonarsource.analyzer.commons.regex.helpers.RegexReachabilityChecker
-
public class RegexReachabilityChecker extends Object
-
-
Constructor Summary
Constructors Constructor Description RegexReachabilityChecker(boolean defaultAnswer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanReach(AutomatonState start, AutomatonState goal)booleancanReachWithConsumingInput(AutomatonState start, AutomatonState goal, Set<AutomatonState> visited)static booleancanReachWithoutConsumingInput(AutomatonState start, AutomatonState goal)Check if the automaton can reach the goal state from start state, ignoring boundaries (seeBoundaryTree)static booleancanReachWithoutConsumingInputNorCrossingBoundaries(AutomatonState start, AutomatonState goal)Check if the automaton can reach the goal state from start state, taking into consideration boundaries (seeBoundaryTree)voidclearCache()
-
-
-
Method Detail
-
clearCache
public void clearCache()
-
canReach
public boolean canReach(AutomatonState start, AutomatonState goal)
-
canReachWithConsumingInput
public boolean canReachWithConsumingInput(AutomatonState start, AutomatonState goal, Set<AutomatonState> visited)
-
canReachWithoutConsumingInput
public static boolean canReachWithoutConsumingInput(AutomatonState start, AutomatonState goal)
Check if the automaton can reach the goal state from start state, ignoring boundaries (seeBoundaryTree)- Parameters:
start- The start stategoal- the targeted state- Returns:
- true if the goal state can be reached from start, ignoring boundaries
-
canReachWithoutConsumingInputNorCrossingBoundaries
public static boolean canReachWithoutConsumingInputNorCrossingBoundaries(AutomatonState start, AutomatonState goal)
Check if the automaton can reach the goal state from start state, taking into consideration boundaries (seeBoundaryTree)- Parameters:
start- The start stategoal- the targeted state- Returns:
- true if the goal state can be reached from start, stopping if encountering boundaries
-
-