Class IOParameterRefParser
java.lang.Object
de.aristaflow.adept2.model.common.paramref.IOParameterRefParser
- Direct Known Subclasses:
IOParameterRefReplacer
Parser for strings containing IO 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.getIOParser(String, EnumSet) or other specialised
variants if available.
- Author:
- Patrick Schmidt
-
Method Summary
Modifier and TypeMethodDescriptionbooleanfindNext()Finds the next parameter reference.Returns the data type of the current IO parameter reference.intgetEnd()Returns the index one position after the final character in the current match, i.e.Returns the name of the referenced input parameter.Returns the name of the referenced output parameter.Returns the current IO parameter reference.intgetStart()Returns the start index of the current match, i.e.
-
Method Details
-
findNext
public boolean findNext()Finds the next parameter reference.- Returns:
- if a next parameter reference was found
-
getParameterRef
Returns the current IO parameter reference.- Returns:
- the current IO parameter reference
-
getDataType
Returns the data type of the current IO parameter reference.- Returns:
- the data type of the current IO parameter reference
-
getInputName
Returns the name of the referenced input parameter.- Returns:
- the name of the referenced input parameter
-
getOutputName
Returns the name of the referenced output parameter.- Returns:
- the name of the referenced output parameter
-
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
-