Class AppendStepChange

All Implemented Interfaces:

public class AppendStepChange extends BasePipelineChange<>

Change for appending a StepChain to a StepChain, elongating it (not creating a branch)

  • Constructor Details

    • AppendStepChange

      public AppendStepChange(Answer answer, String source)
  • Method Details

    • getSource

      protected String getSource()
      Description copied from class: BasePipelineChange

      TODO maybe break this up in to something else?

      Specified by:
      getSource in class BasePipelineChange<>
      the source code that was assembled to be parsed in to a PipelineDeclaration
    • validateParsedSegment

      protected validateParsedSegment( declaration)

      Validate and extract the relevant bit of AST from the parsed pipeline - relevance is as decided by the change and is mostly a convenience / reminder to do this step

      Specified by:
      validateParsedSegment in class BasePipelineChange<>
      the interesting bit of the pipeline, e.g. a single step, a step chain, whatever
    • updateAst

      protected updateAst(IncrementalBuildState state, astSegment, validated)
      Description copied from class: BasePipelineChange

      Build a new AST that is the result of this change

      Specified by:
      updateAst in class BasePipelineChange<>
      state - the previous build state that we are building upon
      astSegment - the segment that was parsed and validated. This is not the previous state's ast.
      validated - the chunk of the parsed segment that the validate routine method returned - this is often the node of interest that ultimately gets added to the previous state's ast
      a pipeline ast to be used in the next IncrementalBuildState