public interface FieldConduit<T>
FieldConduit is an object that effectively replaces the field in the instantiated object.
All reads and writes of the field are replaced with invocations on the conduit. Once a field's access is replaced
with a conduit, the field itself is no longer used. The conduit will even see initializations of the field.
In Aspect Oriented Programming terms, a FieldConduit allows you to advise read and write access to the field.
If a field has both a FieldConduit and a FieldHandle, then the methods of the FieldHandle will be connected
to the methods of the FieldConduit.| Modifier and Type | Method and Description |
|---|---|
T |
get(Object instance,
InstanceContext context)
Invoked when the field is read.
|
void |
set(Object instance,
InstanceContext context,
T newValue)
Invoked when the field's value is updated.
|
T get(Object instance, InstanceContext context)
instance - the instance containing the fieldcontext - (see ClassInstantiator.with(Class, Object))void set(Object instance, InstanceContext context, T newValue)
instance - the instance containing the fieldcontext - (see ClassInstantiator.with(Class, Object))newValue - value assigned to the field5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.