public abstract class RegexASTSubtreeRootNode extends Term implements RegexASTVisitorIterable
Group which contains the syntactic subtree, as well as a MatchFound
node, which is needed for NFA-like traversal of the AST, see
NFATraversalRegexASTVisitor.| Modifier and Type | Method and Description |
|---|---|
abstract RegexASTSubtreeRootNode |
copy(RegexAST ast,
boolean recursive)
Copy this node, in one of the following ways:
if
recursive is true, recursively copy this subtree. |
Term |
getAnchoredFinalState() |
Term |
getAnchoredInitialState() |
Group |
getGroup()
Returns the
Group that represents the contents of this subtree. |
MatchFound |
getMatchFound()
Returns this subtree's corresponding
MatchFound node. |
abstract String |
getPrefix() |
int |
getSubTreeId() |
Term |
getUnAnchoredInitialState() |
void |
resetVisitorIterator() |
void |
setAnchoredFinalState(PositionAssertion anchoredFinalState) |
void |
setAnchoredInitialState(PositionAssertion anchoredInitialState) |
void |
setGroup(Group group)
Sets the contents of this subtree.
|
void |
setMatchFound(MatchFound matchFound) |
void |
setSubTreeId(int subTreeId) |
void |
setUnAnchoredInitialState(MatchFound unAnchoredInitialState) |
boolean |
subTreeIdInitialized() |
protected JsonObject |
toJson(String typeName) |
String |
toString() |
RegexASTNode |
visitorGetNext(boolean reverse) |
boolean |
visitorHasNext() |
getSeqIndex, getSubTreeParent, setSeqIndexasBackReference, asCharacterClass, asGroup, asLookAheadAssertion, asLookAroundAssertion, asLookBehindAssertion, asMatchFound, asPositionAssertion, asQuantifiableTerm, asSequence, astNodeId, endsWithDollar, equalsSemantic, getFlags, getId, getMaxPath, getMinPath, getParent, hasBackReferences, hasCaptureGroups, hasCaret, hasDollar, hasEmptyGuard, hasLookAheads, hasLookBehinds, hasLoops, hasQuantifiers, idInitialized, incMaxPath, incMaxPath, incMinPath, incMinPath, isBackReference, isCaret, isCharacterClass, isDead, isDollar, isExpandedQuantifier, isFlagSet, isGroup, isInLookAheadAssertion, isInLookBehindAssertion, isLookAheadAssertion, isLookAroundAssertion, isLookBehindAssertion, isMatchFound, isPositionAssertion, isPrefix, isQuantifiableTerm, isRoot, isSequence, isSubtreeRoot, markAsDead, setDead, setEmptyGuard, setEndsWithDollar, setEndsWithDollar, setExpandedQuantifier, setFlag, setFlag, setFlags, setHasBackReferences, setHasCaptureGroups, setHasCaret, setHasCaret, setHasDollar, setHasDollar, setHasLookAheads, setHasLookBehinds, setHasLoops, setHasLoops, setHasQuantifiers, setId, setMaxPath, setMinPath, setParent, setPrefix, setStartsWithCaret, setStartsWithCaret, startsWithCaret, toStringWithIDclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIdtoJsonpublic boolean subTreeIdInitialized()
public int getSubTreeId()
public void setSubTreeId(int subTreeId)
public abstract RegexASTSubtreeRootNode copy(RegexAST ast, boolean recursive)
RegexASTNoderecursive is true, recursively copy this subtree. This method should
be used instead of CopyVisitor if the copying process is required to be thread-safe.
public void setGroup(Group group)
This method should be called after creating any instance of this class. Otherwise, methods of
this class could throw NullPointerExceptions or return nulls.
public MatchFound getMatchFound()
MatchFound node.public void setMatchFound(MatchFound matchFound)
public Term getAnchoredInitialState()
public void setAnchoredInitialState(PositionAssertion anchoredInitialState)
public Term getUnAnchoredInitialState()
public void setUnAnchoredInitialState(MatchFound unAnchoredInitialState)
public Term getAnchoredFinalState()
public void setAnchoredFinalState(PositionAssertion anchoredFinalState)
public boolean visitorHasNext()
visitorHasNext in interface RegexASTVisitorIterablepublic RegexASTNode visitorGetNext(boolean reverse)
visitorGetNext in interface RegexASTVisitorIterablepublic void resetVisitorIterator()
resetVisitorIterator in interface RegexASTVisitorIterablepublic abstract String getPrefix()
protected JsonObject toJson(String typeName)
toJson in class RegexASTNode