Class WrapIdentifierDynamic<T extends JobParameters>
java.lang.Object
io.github.douira.glsl_transformer.transform.LifecycleUserImpl<T>
io.github.douira.glsl_transformer.transform.Transformation<T>
io.github.douira.glsl_transformer.core.WrapIdentifierDynamic<T>
- All Implemented Interfaces:
LifecycleUser<T>
- Direct Known Subclasses:
WrapIdentifierExternalDeclaration
The dynamic wrap identifier transformation has a number of abstract methods
that can be implemented in order to dynamically supply the parameters for
this identifier wrap operation. The wrapping injector is given directly
though since the injection methods can vary greatly.
TODO: add test that the replacer doesn't run on the injected code (i.e. that
all three steps are sequential)
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new wrap identifier transformation with no wrapping injector.WrapIdentifierDynamic(TransformationPhase<T> wrappingInjector) Creates a new wrap identifier transformation with a specified wrapping injector phase. -
Method Summary
Methods inherited from class io.github.douira.glsl_transformer.transform.Transformation
addDependency, addDependent, addEndDependent, addRootDependency, appendDependent, chainConcurrentDependency, chainConcurrentDependent, chainConcurrentSibling, chainDependency, chainDependent, prependDependency, setupGraphMethods inherited from class io.github.douira.glsl_transformer.transform.LifecycleUserImpl
getPlanner, isInitialized, setInitialized, setPlannerMethods 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
-
WrapIdentifierDynamic
Creates a new wrap identifier transformation with a specified wrapping injector phase.- Parameters:
wrappingInjector- A phase that injects the additional code into the tree required for making the wrap work
-
WrapIdentifierDynamic
protected WrapIdentifierDynamic()Creates a new wrap identifier transformation with no wrapping injector. The phase for that should be added to the transformation manually.
-
-
Method Details
-
isActiveDynamic
protected abstract boolean isActiveDynamic()Returns if the phases should be active.- Returns:
trueif the phases should be active
-
getWrapResultDynamic
Returns the wrapping result that is used as a replacement for the target.- Returns:
- The wrapping result
-
getWrapTargetDynamic
Returns the wrapping target. The wrapping target is the identifier that is replaced with the wrap result.- Returns:
- The wrapping target
-