Package io.quarkus.deployment.recording
Interface RecorderContext
-
- All Known Implementing Classes:
BytecodeRecorderImpl
public interface RecorderContext
An injectable utility class that contains methods that can be needed for dealing with recorders.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Class<?>
classProxy(String name)
Deprecated.This construct is no longer needed since directly loading deployment/application classes at processing time in build steps is now safe<T> RuntimeValue<T>
newInstance(String name)
Creates a RuntimeValue object that represents an object created via the default constructor.<T> void
registerNonDefaultConstructor(Constructor<T> constructor, Function<T,List<Object>> parameters)
Registers a way to construct an object via a non-default constructor.void
registerObjectLoader(ObjectLoader loader)
Register an object loader.<F,T>
voidregisterSubstitution(Class<F> from, Class<T> to, Class<? extends ObjectSubstitution<? super F,? super T>> substitution)
Registers a substitution to allow objects that are not serializable to bytecode to be substituted for an object that is.
-
-
-
Method Detail
-
registerNonDefaultConstructor
<T> void registerNonDefaultConstructor(Constructor<T> constructor, Function<T,List<Object>> parameters)
Registers a way to construct an object via a non-default constructor. Each object may only have at most one non-default constructor registered- Type Parameters:
T
- The type of the object- Parameters:
constructor
- The constructorparameters
- A function that maps the object to a list of constructor parameters
-
registerSubstitution
<F,T> void registerSubstitution(Class<F> from, Class<T> to, Class<? extends ObjectSubstitution<? super F,? super T>> substitution)
Registers a substitution to allow objects that are not serializable to bytecode to be substituted for an object that is.- Parameters:
from
- The class of the non-serializable objectto
- The class to serialize tosubstitution
- The subclass ofObjectSubstitution
that performs the substitution
-
registerObjectLoader
void registerObjectLoader(ObjectLoader loader)
Register an object loader.- Parameters:
loader
- the object loader (must not benull
)
-
classProxy
@Deprecated Class<?> classProxy(String name)
Deprecated.This construct is no longer needed since directly loading deployment/application classes at processing time in build steps is now safeCreates a Class instance that can be passed to a recording proxy as a substitute for a class that is not loadable at processing time. At runtime the actual class will be passed into the invoked method.- Parameters:
name
- The class name- Returns:
- A Class instance that can be passed to a recording proxy
-
newInstance
<T> RuntimeValue<T> newInstance(String name)
Creates a RuntimeValue object that represents an object created via the default constructor.This object can be passed into recorders, but must not be used directly at deployment time
- Type Parameters:
T
- The type of the class- Parameters:
name
- The name of the class- Returns:
- The class instance proxy
-
-