Interface TransientHandler
- All Known Implementing Classes:
SpringTransientHandler
public interface TransientHandler
Implementors of this interface are responsible for inspecting objects to
gather information about transient fields instances to be able to inject them
again on different instances.
Field values should be encoded into a reference identifier by
inspect(Object) method, in a format that allows
inject(Object, List) to inject the correct instances later on.-
Method Summary
Modifier and TypeMethodDescriptionvoidinject(Object object, List<TransientDescriptor> transients) Injects values into the transient fields of given object.Inspects an object for injectable transient fields and returns a description of the field and a symbolic reference of the instance in the form ofTransientDescriptorobjects.
-
Method Details
-
inspect
Inspects an object for injectable transient fields and returns a description of the field and a symbolic reference of the instance in the form ofTransientDescriptorobjects. If no eligible transient fields are found, the method must return an empty list.- Parameters:
object- object to be inspected for transient fields.- Returns:
- transient fields descriptors, never null.
-
inject
Injects values into the transient fields of given object.- Parameters:
object- object target of injection, never null.transients- descriptors of transient fields that should be injected, never null.
-