|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpmp.EmptyMatcher
public final class EmptyMatcher
Represents empty regular expression matcher. Behaves exactly in the same way as JavaMatcher object created with empty regular expression but this class is much faster since it doesn't use regular expressions.
Title: PMP: Macroprocessor
Description: Java macroprocessor
Copyright: Copyright (c) 2005
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pmp.MatcherIface |
---|
MatcherIface.State |
Field Summary | |
---|---|
static java.lang.String |
EMPTY_PATTERN
This is fast matcher for empty expression. |
Constructor Summary | |
---|---|
EmptyMatcher(Token token)
Creates new instance. |
Method Summary | |
---|---|
void |
feed(int c)
Appends character to matched string snd updates stato of this matcher. |
int |
getMatchingLength()
Returns length of input subsequence that matches pattern. |
java.lang.String |
getPattern()
Returns pattern associated with this matcher. |
MatcherIface.State |
getState()
Returns state of matcher. |
Token |
getToken()
Returns token that would be produced by this class. |
MatcherIface.State |
matches(java.lang.StringBuilder text)
Resets this matcher with given string. |
void |
reset()
Resets matcher. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String EMPTY_PATTERN
Constructor Detail |
---|
public EmptyMatcher(Token token)
token
- Method Detail |
---|
public void feed(int c)
MatcherIface
feed
in interface MatcherIface
c
- chracter to be appendedpublic MatcherIface.State getState()
MatcherIface
getState
in interface MatcherIface
public MatcherIface.State matches(java.lang.StringBuilder text)
MatcherIface
matches
in interface MatcherIface
public java.lang.String getPattern()
MatcherIface
getPattern
in interface MatcherIface
public Token getToken()
MatcherIface
getToken
in interface MatcherIface
public int getMatchingLength()
MatcherIface
MatcherIface.State.PARTIAL
and MatcherIface.State.OVERFEED
.
getMatchingLength
in interface MatcherIface
public java.lang.String toString()
toString
in class java.lang.Object
public void reset()
MatcherIface
reset
in interface MatcherIface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |