Package nl.lexemmens.podman.helper
Class ParameterReplacer
- java.lang.Object
-
- nl.lexemmens.podman.helper.ParameterReplacer
-
public class ParameterReplacer extends Object
Class that helps replacing a character in a String by a character sequence. i.e. %v might return the project version.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceParameterReplacer.ReplacementReplacement interface.
-
Constructor Summary
Constructors Constructor Description ParameterReplacer(Map<String,ParameterReplacer.Replacement> replacementMap)Constructs a new instance of this class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadaptReplacements(SingleImageConfiguration imageConfiguration)Adapt all known replacements based on the suppliedSingleImageConfiguration.Stringreplace(String input)Replaces all format parameters in the provided input with their respective replacement value.
-
-
-
Constructor Detail
-
ParameterReplacer
public ParameterReplacer(Map<String,ParameterReplacer.Replacement> replacementMap)
Constructs a new instance of this class- Parameters:
replacementMap- The map of all character replacers, where the key is the character.
-
-
Method Detail
-
adaptReplacements
public void adaptReplacements(SingleImageConfiguration imageConfiguration)
Adapt all known replacements based on the suppliedSingleImageConfiguration.Some
ParameterReplacer.Replacementinstances may require adaptation as they are dependant on one or more other variables of theSingleImageConfiguration- Parameters:
imageConfiguration- TheSingleImageConfigurationto adapt theParameterReplacer.Replacements to.
-
-