Class ParameterRefParser
- java.lang.Object
-
- de.aristaflow.adept2.model.common.paramref.ParameterRefParser
-
- Direct Known Subclasses:
ParameterRefReplacer
public class ParameterRefParser extends Object
Parser for strings containing parameter references. The advantage compared toParameterRefTools.findParameterReferences(String, EnumSet)
is that the parser provides position information (start and end index of parameter reference).Instances are created using
ParameterRefTools.getParser(String, EnumSet)
or other specialised variants likeSystemDataTools.getParser(String)
.- Author:
- Patrick Schmidt
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
findNext()
Finds the next parameter reference.ProcessConstants.AdeptDataType
getDataType()
Returns the data type of the current parameter reference.int
getEnd()
Returns the index one position after the final character in the current match, i.e. one position after the final%
.String
getName()
Returns the name of the current parameter reference.String
getParameterisedString()
Returns the parameterised string being processed.ParameterRef
getParameterRef()
Returns the current parameter reference.int
getStart()
Returns the start index of the current match, i.e. the first%
.String
getUdtName()
Returns the name of the user-defined data type of the current parameter reference.
-
-
-
Method Detail
-
getParameterisedString
public String getParameterisedString()
Returns the parameterised string being processed.- Returns:
- the parameterised string being processed
-
findNext
public boolean findNext()
Finds the next parameter reference.- Returns:
- if a next parameter reference was found
-
getParameterRef
public ParameterRef getParameterRef()
Returns the current parameter reference.- Returns:
- the current parameter reference
-
getDataType
public ProcessConstants.AdeptDataType getDataType()
Returns the data type of the current parameter reference.- Returns:
- the data type of the current parameter reference
-
getUdtName
public String getUdtName()
Returns the name of the user-defined data type of the current parameter reference.- Returns:
- the name of the user-defined data type of the current parameter reference
-
getName
public String getName()
Returns the name of the current parameter reference.- Returns:
- the name of the current parameter reference
-
getStart
public int getStart()
Returns the start index of the current match, i.e. the first%
. This is index is valid in the original (unprocessed) string.- Returns:
- the start index of the current match
-
getEnd
public int getEnd()
Returns the index one position after the final character in the current match, i.e. one position after the final%
. This is index is valid in the original (unprocessed) string.- Returns:
- the index one position after the final character in the current match
-
-