Class StepDeclaration
- All Implemented Interfaces:
PipelineExpression
- Direct Known Subclasses:
StepDefinition
,StepReference
AST for a single step.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Token
The first identifier that starts this step declaration.The identifier that specifies a named input which accepts the previous step in the chain's output, e.g. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
appendSource
(StringBuilder appendTo) protected abstract void
appendString
(StringBuilder appendTo) protected boolean
boolean
getIdent()
The first identifier that starts this step declaration.Get the input name, if any, that the output should be directed to.The identifier that specifies a named input which accepts the previous step in the chain's output, e.g.int
hashCode()
<T extends StepDeclaration>
Optional<T>Functional cast for a step, useful for definition or reference specific functional code in favour of if-for-instance style logicfinal String
toSource()
final String
toString()
Returns a simplified view of the ast in a source-like fashion, but with a lot of details left out for concisenessMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface nz.org.riskscape.pipeline.ast.PipelineExpression
getBoundary
-
Field Details
-
identToken
The first identifier that starts this step declaration. Will be either the name of the referenced step (StepReference) or the id of a step being defined (StepDefinition).
-
namedInputToken
The identifier that specifies a named input which accepts the previous step in the chain's output, e.g. the baz in
foo -> bar.baz
. Valid for references and definitions.
-
-
Constructor Details
-
StepDeclaration
-
-
Method Details
-
getNamedInput
Get the input name, if any, that the output should be directed to. Only applied to
StepReference
s.- Returns:
- input name, if any
-
getIdent
- Returns:
- the string value of this declaration's identifier
-
isA
Functional cast for a step, useful for definition or reference specific functional code in favour of if-for-instance style logic
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getIdentToken
The first identifier that starts this step declaration. Will be either the name of the referenced step (StepReference) or the id of a step being defined (StepDefinition).
-
getNamedInputToken
The identifier that specifies a named input which accepts the previous step in the chain's output, e.g. the baz in
foo -> bar.baz
. Valid for references and definitions. -
toString
Returns a simplified view of the ast in a source-like fashion, but with a lot of details left out for conciseness
-
appendString
-
toSource
- Specified by:
toSource
in interfacePipelineExpression
- Returns:
- a string that can be parsed back in to the same ast as this one. It might not be whitespace-faithful...
-
appendSource
-