Class StringReplacementAlgo
- java.lang.Object
-
- com.sun.enterprise.admin.servermgmt.stringsubs.impl.algorithm.StringReplacementAlgo
-
- All Implemented Interfaces:
SubstitutionAlgorithm
public class StringReplacementAlgo extends Object implements SubstitutionAlgorithm
Performs String substitution by replacing the matching target sequence with the specified literal replacement sequence.
-
-
Constructor Summary
Constructors Constructor Description StringReplacementAlgo(Map<String,String> substitutionMap)
ConstructStringReplacementAlgo
for the given substitutable key/value pair.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
substitute(Substitutable resolver)
Perform's string substitution.
-
-
-
Constructor Detail
-
StringReplacementAlgo
public StringReplacementAlgo(Map<String,String> substitutionMap)
ConstructStringReplacementAlgo
for the given substitutable key/value pair.- Parameters:
substitutionMap
- Map of substitutable key/value pairs.
-
-
Method Detail
-
substitute
public void substitute(Substitutable resolver) throws StringSubstitutionException
Description copied from interface:SubstitutionAlgorithm
Perform's string substitution.Reads the character stream from the given
Substitutable
object, perform substitution and writes it back to the object.- Specified by:
substitute
in interfaceSubstitutionAlgorithm
- Parameters:
resolver
- Provide input and output stream.- Throws:
StringSubstitutionException
- If any error occurs during substitution operation.
-
-