Class StandardParameterReference

java.lang.Object
org.apache.nifi.parameter.StandardParameterReference
All Implemented Interfaces:
ParameterReference, ParameterToken

public class StandardParameterReference extends Object implements ParameterReference
  • Field Details

    • parameterName

      private final String parameterName
    • startOffset

      private final int startOffset
    • endOffset

      private final int endOffset
    • referenceText

      private final String referenceText
  • Constructor Details

    • StandardParameterReference

      public StandardParameterReference(String parameterName, int startOffset, int endOffset, String referenceText)
  • Method Details

    • getParameterName

      public String getParameterName()
      Specified by:
      getParameterName in interface ParameterReference
      Returns:
      the name of the Parameter that is referenced
    • getStartOffset

      public int getStartOffset()
      Specified by:
      getStartOffset in interface ParameterToken
      Returns:
      the 0-based index in the String at which the token begins
    • getEndOffset

      public int getEndOffset()
      Specified by:
      getEndOffset in interface ParameterToken
      Returns:
      the 0-based index in the String at which the token ends
    • getText

      public String getText()
      Specified by:
      getText in interface ParameterToken
      Returns:
      the portion of the input text that corresponds to this token
    • isEscapeSequence

      public boolean isEscapeSequence()
      Specified by:
      isEscapeSequence in interface ParameterToken
      Returns:
      true if this token represents an escape sequence such as ##{param} or ## in the case of ###{param} or ####{param}, false if this token does not represent an escape sequence.
    • isParameterReference

      public boolean isParameterReference()
      Specified by:
      isParameterReference in interface ParameterToken
      Returns:
      true if this token represents a reference to a Parameter. If this method returns true, then this token can be cast as a ParameterReference.
    • getValue

      public String getValue(ParameterLookup parameterLookup)
      Description copied from interface: ParameterToken
      Returns the 'value' of the token. If this token is a parameter reference, it will return the value of the Parameter, according to the given Parameter Context. If this token is an Escape Sequence, it will return the un-escaped version of the escape sequence.
      Specified by:
      getValue in interface ParameterToken
      Parameters:
      parameterLookup - the Parameter Lookup to use for looking up values
      Returns:
      the value of the Token