Module org.praxislive.code
Package org.praxislive.code
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>
A task for creating a component or context for a given delegate.
-
Method Summary
Modifier and TypeMethodDescriptionattachLogging(LogBuilder log) Attach a log builder to the task.attachPrevious(Class<D> previous) Attach the previous iteration of delegate class, if available, that is being replaced.createComponent(D delegate) Create a CodeComponent for the provided delegate.createContext(D delegate) Create a CodeContext for the provided delegate, for installation in an existing component.Get access to the CodeFactory this task was created for.getLog()Get the log for reporting messages during context creation.Get the previous delegate class installed on the component.
-
Method Details
-
attachLogging
Attach a log builder to the task.- Parameters:
log- log builder- Returns:
- this for chaining
-
attachPrevious
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
Create a CodeComponent for the provided delegate. This callscreateContext(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
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
Get the log for reporting messages during context creation.- Returns:
- log builder
-
getPrevious
Get the previous delegate class installed on the component. May be null.- Returns:
- previous delegate class
-
getFactory
Get access to the CodeFactory this task was created for.- Returns:
- code factory
-