Class IOParameterRefReplacer
- java.lang.Object
-
- de.aristaflow.adept2.model.common.paramref.IOParameterRefParser
-
- de.aristaflow.adept2.model.common.paramref.IOParameterRefReplacer
-
public class IOParameterRefReplacer extends IOParameterRefParser
Facilitates the process of parameterised strings and replace the parameter references with values. It works similarly toMatcherand is supposed to be used in a loop like this:SystemDataTools.Formatter formatter = SystemDataTools.getFormatter(<string>); while (formatter.findNext()) { ... formatter.replaceWith(<someValue>); } System.out.println(formatter.getProcessedString());Instances are created usingParameterRefTools.getIOReplacer(String, EnumSet)or other specialised variants if available.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanfindNext()Finds the next parameter reference.StringgetProcessedString()Returns the processed string.voidreplaceWith(String string)Replace the current parameter reference with the specified string.-
Methods inherited from class de.aristaflow.adept2.model.common.paramref.IOParameterRefParser
getDataType, getEnd, getInputName, getOutputName, getParameterRef, getStart
-
-
-
-
Method Detail
-
findNext
public boolean findNext()
Finds the next parameter reference. Once this method returnsfalsetheprocessed stringis complete.- Overrides:
findNextin classIOParameterRefParser- Returns:
- if a next parameter reference was found
-
replaceWith
public void replaceWith(String string)
Replace the current parameter reference with the specified string. This method is optional, i.e. not every parameter reference must be replaced.- Parameters:
string- the string to replace the current parameter reference with
-
getProcessedString
public String getProcessedString()
Returns the processed string.- Returns:
- the processed string
-
-