Class ParameterRefParser
java.lang.Object
de.aristaflow.adept2.model.common.paramref.ParameterRefParser
- Direct Known Subclasses:
ParameterRefReplacer
Parser for strings containing parameter references. The advantage compared to
ParameterRefTools.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 like
SystemDataTools.getParser(String).
- Author:
- Patrick Schmidt
-
Method Summary
Modifier and TypeMethodDescriptionbooleanfindNext()Finds the next parameter reference.Returns the data type of the current parameter reference.intgetEnd()Returns the index one position after the final character in the current match, i.e.getName()Returns the name of the current parameter reference.Returns the parameterised string being processed.Returns the current parameter reference.intgetStart()Returns the start index of the current match, i.e.Returns the name of the user-defined data type of the current parameter reference.
-
Method Details
-
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
Returns the current parameter reference.- Returns:
- the current parameter reference
-
getDataType
Returns the data type of the current parameter reference.- Returns:
- the data type of the current parameter reference
-
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
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
-