Class CodeFactory.Task<D extends CodeDelegate>

java.lang.Object
org.praxislive.code.CodeFactory.Task<D>
Type Parameters:
D - delegate base type
Enclosing class:
CodeFactory<D extends CodeDelegate>

public static final class CodeFactory.Task<D extends CodeDelegate> extends Object
A task for creating a component or context for a given delegate.
  • Method Details

    • attachLogging

      public CodeFactory.Task<D> attachLogging(LogBuilder log)
      Attach a log builder to the task.
      Parameters:
      log - log builder
      Returns:
      this for chaining
    • attachPrevious

      public CodeFactory.Task<D> attachPrevious(Class<D> previous)
      Attach the previous iteration of delegate class, if available, that is being replaced. May be null.
      Parameters:
      previous - previous iteration of delegate class
      Returns:
      this for chaining
    • createComponent

      public CodeComponent<D> createComponent(D delegate)
      Create a CodeComponent for the provided delegate. This calls createContext(org.praxislive.code.CodeDelegate) and installs the context on a new instance of CodeComponent.
      Parameters:
      delegate - delegate to create component for
      Returns:
      code component
    • createContext

      public CodeContext<D> createContext(D delegate)
      Create a CodeContext for the provided delegate, for installation in an existing component. By default just calls through to
      invalid reference
      #createCodeContext(org.praxislive.code.CodeDelegate)
      .
      Parameters:
      delegate - delegate to create context for
      Returns:
      code context
    • getLog

      public LogBuilder getLog()
      Get the log for reporting messages during context creation.
      Returns:
      log builder
    • getPrevious

      public Class<D> getPrevious()
      Get the previous delegate class installed on the component. May be null.
      Returns:
      previous delegate class
    • getFactory

      public CodeFactory<D> getFactory()
      Get access to the CodeFactory this task was created for.
      Returns:
      code factory