public abstract class ReplaceRule extends Object
NullRule
,
AmpersandRule
,
BackRefRule
,
LeftRule
,
RightRule
,
StringRule
Modifier and Type | Field and Description |
---|---|
protected ReplaceRule |
next
points to the next ReplaceRule in the linked list.
|
Constructor and Description |
---|
ReplaceRule() |
Modifier and Type | Method and Description |
---|---|
ReplaceRule |
add(ReplaceRule adding) |
void |
addRule(ReplaceRule r)
Add another ReplaceRule to the linked list.
|
abstract void |
apply(StringBufferLike sb,
RegRes r)
This function appends to the StringBufferLike the text you want
to replaced the portion of the String last matched.
|
ReplaceRule |
arg(String s)
Modified the behavior of a ReplaceRule by supplying
an argument.
|
Object |
clone()
Create a field for field copy of this Object if this Object
implements the Cloneable interface.
|
Object |
clone1()
A rule describing how to clone only the current ReplaceRule,
and none of the others in this linked list.
|
static void |
define(String s,
Regex r) |
static void |
define(String s,
ReplaceRule r) |
static void |
define(String s,
Transformer t) |
static boolean |
isDefined(String s) |
static ReplaceRule |
perlCode(String s)
Compile a ReplaceRule using the text that would go between
the second and third /'s in a typical substitution pattern
in Perl: s/ ... / The argument to ReplaceRule.perlCode /.
|
String |
toString()
Convert to a String.
|
String |
toString1()
This tells how to convert just the current element (and none
of the other items in the linked list) to a String.
|
static void |
undefine(String s) |
protected ReplaceRule next
public abstract void apply(StringBufferLike sb, RegRes r)
public Object clone1()
public final Object clone()
Object
public ReplaceRule add(ReplaceRule adding)
public void addRule(ReplaceRule r)
public static ReplaceRule perlCode(String s)
public static boolean isDefined(String s)
public static void define(String s, ReplaceRule r)
public static void define(String s, Transformer t)
public static void undefine(String s)
public String toString1()
public final String toString()
public ReplaceRule arg(String s)
Validator.arg(java.lang.String)