Class IOParameterRefParser

java.lang.Object
de.aristaflow.adept2.model.common.paramref.IOParameterRefParser
Direct Known Subclasses:
IOParameterRefReplacer

public class IOParameterRefParser extends Object
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 Details

    • findNext

      public boolean findNext()
      Finds the next parameter reference.
      Returns:
      if a next parameter reference was found
    • getParameterRef

      public IOParameterRef getParameterRef()
      Returns the current IO parameter reference.
      Returns:
      the current IO parameter reference
    • getDataType

      public ProcessConstants.AdeptDataType getDataType()
      Returns the data type of the current IO parameter reference.
      Returns:
      the data type of the current IO parameter reference
    • getInputName

      public String getInputName()
      Returns the name of the referenced input parameter.
      Returns:
      the name of the referenced input parameter
    • getOutputName

      public String 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