Interface LifecycleUser<T>

All Known Implementing Classes:
ChannelFilter, HandlerTarget, HandlerTargetImpl, LifecycleUserImpl, MultiFilter, NewlineFilter, ParsedReplaceTarget, ParsedReplaceTargetImpl, ReplaceTarget, RunPhase, SearchTerminals, SearchTerminalsDynamic, SearchTerminalsImpl, StringFilter, TerminalReplaceTarget, TerminalReplaceTargetImpl, ThrowTarget, ThrowTargetImpl, TokenFilter, Transformation, TransformationPhase, WalkPhase, WrapIdentifier, WrapIdentifierDynamic, WrapIdentifierExternalDeclaration, WrapThrowTarget, WrapThrowTargetImpl

public interface LifecycleUser<T>
Implemented by classes that have an execution planner parent and can receive job parameters. All lifecycle users are notified of init and reset events as well as job parameters by the execution planner. init() is called the before the first reset while the reset resetState() is called for every transformation job. For transformations, state is reset before execution starts. For transformation phases, state is reset before the phase's execution level is executed.
  • Method Summary

    Modifier and Type
    Method
    Description
    default T
    Returns the execution planner's current job parameters.
    default Lexer
    Returns the executing execution planner's lexer.
    default Parser
    Returns the executing execution planner's parser.
    Returns the execution planner set on this child.
    default io.github.douira.glsl_transformer.GLSLParser.TranslationUnitContext
    Returns the root node taken from the execution planner that is currently executing this phase.
    default void
    Called when this object is set up in a processing environment like the printer or the execution planner.
    default void
    Called before this object is used on a job.
    void
    Sets the parent planner of this child.
  • Method Details

    • setPlanner

      void setPlanner(ExecutionPlanner<T> planner)
      Sets the parent planner of this child.
      Parameters:
      planner - The execution planner to set as the parent
    • getPlanner

      ExecutionPlanner<T> getPlanner()
      Returns the execution planner set on this child.
      Returns:
      The currently set execution planner
    • getParser

      default Parser getParser()
      Returns the executing execution planner's parser.
      Returns:
      The parser
    • getLexer

      default Lexer getLexer()
      Returns the executing execution planner's lexer.
      Returns:
      The lexer
    • getRootNode

      default io.github.douira.glsl_transformer.GLSLParser.TranslationUnitContext getRootNode()
      Returns the root node taken from the execution planner that is currently executing this phase.
      Returns:
      The root node of the current executing execution planner
    • getJobParameters

      default T getJobParameters()
      Returns the execution planner's current job parameters.
      Returns:
      The execution planner's current job parameters
      See Also:
      • ExecutionPlanner.getJobParameters()
    • init

      default void init()
      Called when this object is set up in a processing environment like the printer or the execution planner.
    • resetState

      default void resetState()
      Called before this object is used on a job. This is called before each transformation/printing job.