Class LifecycleUserImpl<T extends JobParameters>
java.lang.Object
io.github.douira.glsl_transformer.transform.LifecycleUserImpl<T>
- All Implemented Interfaces:
Activatable,ActivatableLifecycleUser<T>,LifecycleUser<T>
- Direct Known Subclasses:
TokenFilter,Transformation
public class LifecycleUserImpl<T extends JobParameters>
extends Object
implements ActivatableLifecycleUser<T>
This implementation of a lifecycle user may be used if a class can be
extended. A custom implementation should be considered if another class needs
to be extended. An instance of this class could also be held as a "trait" and
accessed through delegate methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivation(Supplier<Boolean> activation) Override to make type more specificReturns the execution planner set on this child.booleanisActive()Gets the current activation state.booleanChecks if this lifecycle user has been initialized.voidMarks this lifecycle user as initialized.voidsetPlanner(ExecutionPlanner<T> planner) Sets the parent planner of this child.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.douira.glsl_transformer.transform.LifecycleUser
getJobParameters, getLexer, getParser, getRootNode, init, initOnce, resetState
-
Constructor Details
-
LifecycleUserImpl
public LifecycleUserImpl()
-
-
Method Details
-
getPlanner
Description copied from interface:LifecycleUserReturns the execution planner set on this child.- Specified by:
getPlannerin interfaceLifecycleUser<T extends JobParameters>- Returns:
- The currently set execution planner
-
setPlanner
Description copied from interface:LifecycleUserSets the parent planner of this child.- Specified by:
setPlannerin interfaceLifecycleUser<T extends JobParameters>- Parameters:
planner- The execution planner to set as the parent
-
isInitialized
public boolean isInitialized()Description copied from interface:LifecycleUserChecks if this lifecycle user has been initialized.- Specified by:
isInitializedin interfaceLifecycleUser<T extends JobParameters>- Returns:
- True if initialized, false otherwise
-
setInitialized
public void setInitialized()Description copied from interface:LifecycleUserMarks this lifecycle user as initialized.- Specified by:
setInitializedin interfaceLifecycleUser<T extends JobParameters>
-
activation
Description copied from interface:ActivatableLifecycleUserOverride to make type more specific- Specified by:
activationin interfaceActivatable- Specified by:
activationin interfaceActivatableLifecycleUser<T extends JobParameters>- Parameters:
activation- The activation supplier- Returns:
- This object
-
isActive
public boolean isActive()Description copied from interface:ActivatableGets the current activation state.- Specified by:
isActivein interfaceActivatable- Returns:
trueif the object is active
-