public class Copy extends AbstractFaAction
FaAction
which merely copies matched input to
the output. If only a Copy
object with priority zero
is needed, then predefined object COPY
should be used
instead of creating a new Copy
object.Modifier and Type | Field and Description |
---|---|
static FaAction |
COPY
a predefined
FaAction with priority 0 which merely copies
matched text unchanged to the output. |
Constructor and Description |
---|
Copy(int priority)
use only if
COPY is not what you want, because you
have to specify a priority. |
Modifier and Type | Method and Description |
---|---|
void |
invoke(java.lang.StringBuilder out,
int start,
DfaRun runner)
is called by methods of
DfaRun in case of a
match. |
java.lang.String |
toString() |
mergeWith, setPriority
public static final FaAction COPY
public Copy(int priority)
COPY
is not what you want, because you
have to specify a priority.public void invoke(java.lang.StringBuilder out, int start, DfaRun runner)
FaAction
is called by methods of DfaRun
in case of a
match. Parameter yytext
contains the matching text
from position start
onwards. The callback may change
the whole of yytext
, but the under most
circumstances, only the matching text should be
changed. Parameter runner
is the DfaRun
object which called this function. Of interest are its fields
DfaRun.clientData
and DfaRun.collect
.
public java.lang.String toString()
toString
in class java.lang.Object