Package org.apache.nifi.parameter
Class StandardParameterReference
java.lang.Object
org.apache.nifi.parameter.StandardParameterReference
- All Implemented Interfaces:
ParameterReference
,ParameterToken
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStandardParameterReference
(String parameterName, int startOffset, int endOffset, String referenceText) -
Method Summary
Modifier and TypeMethodDescriptionint
int
getText()
getValue
(ParameterLookup parameterLookup) Returns the 'value' of the token.boolean
boolean
-
Field Details
-
parameterName
-
startOffset
private final int startOffset -
endOffset
private final int endOffset -
referenceText
-
-
Constructor Details
-
StandardParameterReference
-
-
Method Details
-
getParameterName
- Specified by:
getParameterName
in interfaceParameterReference
- Returns:
- the name of the Parameter that is referenced
-
getStartOffset
public int getStartOffset()- Specified by:
getStartOffset
in interfaceParameterToken
- Returns:
- the 0-based index in the String at which the token begins
-
getEndOffset
public int getEndOffset()- Specified by:
getEndOffset
in interfaceParameterToken
- Returns:
- the 0-based index in the String at which the token ends
-
getText
- Specified by:
getText
in interfaceParameterToken
- Returns:
- the portion of the input text that corresponds to this token
-
isEscapeSequence
public boolean isEscapeSequence()- Specified by:
isEscapeSequence
in interfaceParameterToken
- 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 interfaceParameterToken
- Returns:
true
if this token represents a reference to a Parameter. If this method returnstrue
, then this token can be cast as aParameterReference
.
-
getValue
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 interfaceParameterToken
- Parameters:
parameterLookup
- the Parameter Lookup to use for looking up values- Returns:
- the value of the Token
-