public final class SystemDataTools
extends java.lang.Object
parameter references in the strings returned by
SystemDataConsumer
annotated methods.| Modifier and Type | Method and Description |
|---|---|
static ParameterRef[] |
findParameterReferences(java.lang.String parameterisedString)
Finds all parameter references (see
SystemDataConsumer)
in the given string and returns them. |
static ParameterRefParser |
getParser(java.lang.String parameterisedString)
Returns a parser for the specified parameterised string.
|
static ParameterRefReplacer |
getReplacer(java.lang.String parameterisedString)
Returns a replacer for the specified parameterised string to replace
parameter references with actual values.
|
static boolean |
isCompatibleParameter(ParameterRef paramRef,
Parameter parameter)
Returns true, if the parameter reference and the given parameter
are compatible.
|
static ParameterRef |
parseParameterReference(java.lang.String parameterReference)
Parses the specified string representation of a parameter reference
(including the enclosing '%'s) and returns it as a
ParameterRef
object (or null if the reference is in any way illegal). |
public static ParameterRef[] findParameterReferences(java.lang.String parameterisedString)
SystemDataConsumer)
in the given string and returns them. This method will avoid returning
duplicates (i.e. two parameter references that exactly match in name and
type).
This method will only recognise parameter references with data types that are supported by system/node parameters (INTEGER, FLOAT and STRING).
parameterisedString - a string, potentially containing variables /
parameter referencespublic static ParameterRef parseParameterReference(java.lang.String parameterReference)
ParameterRef
object (or null if the reference is in any way illegal).
This method will only recognise parameter references with data types that are supported by system/node parameters (INTEGER, FLOAT and STRING).
parameterReference - string representation of a parameter referenceParameterRef object or null if the
reference is in any way illegalpublic static ParameterRefParser getParser(java.lang.String parameterisedString)
findParameterReferences(String) is that the parser
provides position information (start and end index of parameter reference).
This method will only recognise parameter references with data types that are supported by system/node parameters (INTEGER, FLOAT and STRING).
parameterisedString - the parameterised string to be formattedpublic static ParameterRefReplacer getReplacer(java.lang.String parameterisedString)
This method will only recognise parameter references with data types that are supported by system/node parameters (INTEGER, FLOAT and STRING).
parameterisedString - the parameterised string to be processedpublic static boolean isCompatibleParameter(ParameterRef paramRef,
Parameter parameter)
paramRef - Parameter reference.parameter - Real parameter.