public class PatternTokenMatcher extends Object
Constructor and Description |
---|
PatternTokenMatcher(PatternToken patternToken) |
Modifier and Type | Method and Description |
---|---|
void |
addMemberAndGroup(AnalyzedToken token)
Enables testing multiple conditions specified by different elements.
|
boolean |
checkAndGroup(boolean previousValue) |
PatternToken |
getPatternToken() |
boolean |
hasPreviousException() |
boolean |
isExceptionMatchedCompletely(AnalyzedToken token) |
boolean |
isMatched(AnalyzedToken token)
Checks whether the rule element matches the token given as a parameter.
|
boolean |
isMatchedByPreviousException(AnalyzedTokenReadings token) |
boolean |
isMatchedByScopeNextException(AnalyzedToken token) |
void |
resolveReference(int firstMatchToken,
AnalyzedTokenReadings[] tokens,
Language language) |
String |
toString() |
public PatternTokenMatcher(PatternToken patternToken)
public void resolveReference(int firstMatchToken, AnalyzedTokenReadings[] tokens, Language language) throws IOException
IOException
public PatternToken getPatternToken()
public final boolean isMatched(AnalyzedToken token)
token
- AnalyzedToken to check matching againstpublic final void addMemberAndGroup(AnalyzedToken token)
prepareAndGroup(int, AnalyzedTokenReadings[], Language)
, and followed by checkAndGroup(boolean)
token
- the token checked.public final boolean checkAndGroup(boolean previousValue)
public final boolean isMatchedByScopeNextException(AnalyzedToken token)
public final boolean isExceptionMatchedCompletely(AnalyzedToken token)
public boolean hasPreviousException()
public boolean isMatchedByPreviousException(AnalyzedTokenReadings token)