Class ReplaceTokens
- java.lang.Object
-
- com.sun.identity.install.tools.util.ReplaceTokens
-
public final class ReplaceTokens extends Object
Class ReplaceTokens has the functionality to scan sourceFile extract tokens, match them with any token replacements in the provided token replacement Map and perform a replacement if a match is found. The entire transformation is written to a specified destination file.
-
-
Constructor Summary
Constructors Constructor Description ReplaceTokens(String sourceFile, String destFile, Map tokens)Constructs a ReplaceTokens object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtagSwapAndCopyFile()Method to perform the token-tag swap and create a destination file with the transformation.
-
-
-
Constructor Detail
-
ReplaceTokens
public ReplaceTokens(String sourceFile, String destFile, Map tokens) throws Exception
Constructs a ReplaceTokens object.- Parameters:
sourceFile- the source file whose tokens-tags need to be swapped.destFile- the destination file which would be the transformed sourceFile with token-tags swapped. transformedtokens- a Map containing the token name and the replacement value- Throws:
Exception
-
-