java.lang.Object
com.blackbuild.klum.ast.runtime.internal.process.PhaseDriver

public class PhaseDriver extends Object
  • Constructor Details

    • PhaseDriver

      public PhaseDriver()
  • Method Details

    • getInstance

      @NotNull public static @NotNull PhaseDriver getInstance()
    • getCurrentPhase

      public static KlumPhase getCurrentPhase()
    • getCurrentPhaseActionType

      public static String getCurrentPhaseActionType()
    • getContext

      public static PhaseDriver.Context getContext()
    • setCurrentMember

      public static void setCurrentMember(String member)
    • addPhase

      public void addPhase(PhaseAction action)
    • registerApplyLaterPhase

      public void registerApplyLaterPhase(int phaseNumber)
    • postPhaseApply

      public static void postPhaseApply(groovy.lang.Closure<?> closure)
      Registers a closure to be run directly after the current phase. This can be used to circumvent corner cases, where an object modifies its own containing datastructure.
      Parameters:
      closure - The closure to be executed after the current phase.
    • withPhaseDriver

      public static <T> T withPhaseDriver(Supplier<T> generator, Consumer<T> action)
    • withBuilderLifecycle

      public static <T> T withBuilderLifecycle(Supplier<? extends InternalKlumBuilder<T>> generator, Consumer<InternalKlumBuilder<T>> action)
      Runs one complete Builder lifecycle and returns its completed model.
    • attachToCurrentConstructionSession

      public static void attachToCurrentConstructionSession(InternalKlumBuilder<?> builder)
      Associates a newly allocated Builder with the active root lifecycle, if one exists.
    • requireActiveConstructionSession

      public static void requireActiveConstructionSession()
      Rejects Builder-producing factory calls that are not owned by a root lifecycle.
    • requireCurrentConstructionSession

      public static void requireCurrentConstructionSession(InternalKlumBuilder<?> builder)
      Rejects use of a Builder from a missing, completed, or different Construction session.
    • enter

      public static void enter(Object object)
    • leave

      public static void leave()
    • executeIfReady

      public static void executeIfReady()
    • getRootObject

      public Object getRootObject()