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
Perform's String substitution by replacing the matching target sequence with the specified literal replacement sequence.
-
-
Constructor Summary
Constructors Constructor Description StringReplacementAlgo(Map<String,String> substitutionMap)ConstructStringReplacementAlgofor the given substitutable key/value pair.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsubstitute(Substitutable resolver)Perform's string substitution.
-
-
-
Constructor Detail
-
StringReplacementAlgo
public StringReplacementAlgo(Map<String,String> substitutionMap)
ConstructStringReplacementAlgofor 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:SubstitutionAlgorithmPerform's string substitution.Reads the character stream from the given
Substitutableobject, perform substitution and writes it back to the object.- Specified by:
substitutein interfaceSubstitutionAlgorithm- Parameters:
resolver- Provide input and output stream.- Throws:
StringSubstitutionException- If any error occurs during substitution operation.
-
-