Class StepDefinition
- All Implemented Interfaces:
AST,PipelineAST
Defines a step. May optionally include parameter defaults and name for the step.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class nz.org.riskscape.rl.ast.StepDeclaration
identToken, namedInputToken -
Constructor Summary
ConstructorsConstructorDescriptionStepDefinition(String id) StepDefinition(Token identifier, List<StepDefinition.Argument> arguments, Optional<Token> nameToken, Optional<Token> namedInputToken, Optional<Pair<Token, Token>> boundary) -
Method Summary
Modifier and TypeMethodDescription<T,R> R accept(PipelineVisitor<T, R> visitor, T data) protected voidappendSource(StringBuilder appendTo) Implementers extend this to append their source to the given string builder.protected static voidappendSource(AST ast, StringBuilder appendTo) Helper method for appending the source of another ast element to a string builder, efficiently if possible.protected voidappendString(StringBuilder appendTo) Append a simplified string representation to the builder.boolean@NonNull List<StepDefinition.Argument>Collects all theStepReferences from any arguments viaInputChain.getStepReferences()getName()inthashCode()final StringtoSource()final StringtoString()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 nz.org.riskscape.rl.ast.StepDeclaration
canEqual, getIdent, getIdentToken, getNamedInput, getNamedInputTokenMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface nz.org.riskscape.rl.ast.AST
isA, switchType, toSource
-
Constructor Details
-
StepDefinition
-
StepDefinition
-
-
Method Details
-
getStepId
- Returns:
- an identifier used to link the step definition to a
Stepthat the engine provides for pipeline processing
-
getName
- Returns:
- a name that the user assigned to this step definition, or empty if the step is anonymous
-
getStepParameters
-
getStepIdToken
- Returns:
- the ast token for the identifier used to link the step definition to a
Stepthat the engine provides for pipeline processing
-
appendSource
Implementers extend this to append their source to the given string builder. Done via string builder to encourage a more efficient implementation than is possible with concatenating multiple toString calls that typically contruct a string builder anyway.
-
appendString
Append a simplified string representation to the builder. Default implementation uses appendSource. Subclasses can override to provide a more concise representation.
-
equals
- Overrides:
equalsin classStepDeclaration
-
hashCode
public int hashCode()- Overrides:
hashCodein classStepDeclaration
-
accept
-
getInputChainStepReferences
Collects all the
StepReferences from any arguments viaInputChain.getStepReferences() -
getArguments
-
getNameToken
-
getBoundary
- Returns:
- a pair of tokens that represent the start and end of this expression, to be used when giving users information about where errors have occurred. If the expression has been rebuilt then the boundary may be empty or it may be from the original AST. Intended for use in problems to trace errors back to their source.
-
appendSource
Helper method for appending the source of another ast element to a string builder, efficiently if possible.
-
toString
Returns a simplified view of the ast in a source-like fashion, but with a lot of details left out for conciseness
-
toSource
-