|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.oro.text.regex.StringSubstitution
Untamed: StringSubstitution implements a Substitution consisting of a simple
literal string. This class is intended for use with
Util.substitute
.
Substitution
,
Util
,
Util.substitute(org.apache.oro.text.regex.PatternMatcher, org.apache.oro.text.regex.Pattern, org.apache.oro.text.regex.Substitution, java.lang.String, int)
,
Substitution
,
Perl5Substitution
Field Summary | |
(package private) int |
_subLength
|
(package private) String |
_substitution
|
Constructor Summary | |
StringSubstitution()
Enabled: Default constructor initializing substitution to a zero length String. |
|
StringSubstitution(String substitution)
Enabled: Creates a StringSubstitution representing the given string. |
Method Summary | |
void |
appendSubstitution(StringBuffer appendBuffer,
MatchResult match,
int substitutionCount,
String originalInput,
PatternMatcher matcher,
Pattern pattern)
Enabled: Appends the substitution to a buffer containing the original input with substitutions applied for the pattern matches found so far. |
String |
getSubstitution()
Enabled: Returns the string substitution represented by this object. |
void |
setSubstitution(String substitution)
Enabled: Sets the substitution represented by this StringSubstitution. |
String |
toString()
Suppressed: Returns the same value as getSubstitution() . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
int _subLength
String _substitution
Constructor Detail |
public StringSubstitution()
public StringSubstitution(String substitution)
substitution
- The string to use as a substitution.Method Detail |
public void setSubstitution(String substitution)
substitution
- The string to use as a substitution.public String getSubstitution()
public String toString()
getSubstitution()
.
toString
in class Object
public void appendSubstitution(StringBuffer appendBuffer, MatchResult match, int substitutionCount, String originalInput, PatternMatcher matcher, Pattern pattern)
Substitution.appendSubstition()
for more details regarding the expected behavior of this method.
appendSubstitution
in interface Substitution
appendBuffer
- The buffer containing the new string resulting
from performing substitutions on the original input.match
- The current match causing a substitution to be made.substitutionCount
- The number of substitutions that have been
performed so far by Util.substitute.originalInput
- The original input upon which the substitutions are
being performed.matcher
- The PatternMatcher used to find the current match.pattern
- The Pattern used to find the current match.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |