protected static class InvocationHandlerAdapter.ForField extends InvocationHandlerAdapter implements InvocationHandlerAdapter.AssignerConfigurable
InvocationHandlerAdapter that delegates method
invocations to an adapter that is stored in an instance field.| Modifier and Type | Class and Description |
|---|---|
protected class |
InvocationHandlerAdapter.ForField.Appender
An appender for implementing the
InvocationHandlerAdapter.ForField. |
InvocationHandlerAdapter.AssignerConfigurable, InvocationHandlerAdapter.ForField, InvocationHandlerAdapter.ForInstanceImplementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.Targetassigner, cacheMethods, CACHING, fieldName| Modifier | Constructor and Description |
|---|---|
protected |
ForField(String fieldName,
boolean cacheMethods,
Assigner assigner,
FieldLocator.Factory fieldLocatorFactory)
Creates a new invocation handler adapter that loads its value from a field.
|
| Modifier and Type | Method and Description |
|---|---|
ByteCodeAppender |
appender(Implementation.Target implementationTarget)
Creates a byte code appender that determines the implementation of the instrumented type's methods.
|
boolean |
equals(Object object) |
int |
hashCode() |
InstrumentedType |
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.
|
String |
toString() |
Implementation |
withAssigner(Assigner assigner)
Configures an assigner to use with this invocation handler adapter.
|
InvocationHandlerAdapter.AssignerConfigurable |
withoutMethodCache()
By default, any
Method instance that is handed over to an
InvocationHandler is cached in a static field. |
protected ForField(String fieldName, boolean cacheMethods, Assigner assigner, FieldLocator.Factory fieldLocatorFactory)
fieldName - The name of the field.cacheMethods - Determines if the Method instances that are handed to the
intercepted methods are cached in static fields.assigner - The assigner to apply when defining this implementation.fieldLocatorFactory - The field locator factory to use.public InvocationHandlerAdapter.AssignerConfigurable withoutMethodCache()
InvocationHandlerAdapterMethod instance that is handed over to an
InvocationHandler is cached in a static field. By invoking this method,
this feature can be disabled.withoutMethodCache in class InvocationHandlerAdapterpublic Implementation withAssigner(Assigner assigner)
InvocationHandlerAdapter.AssignerConfigurablewithAssigner in interface InvocationHandlerAdapter.AssignerConfigurableassigner - The assigner to apply when defining this implementation.assigner configured.public InstrumentedType prepare(InstrumentedType instrumentedType)
InstrumentedType.Prepareableprepare in interface InstrumentedType.PrepareableinstrumentedType - The instrumented type in its current form.public ByteCodeAppender appender(Implementation.Target implementationTarget)
Implementationappender in interface ImplementationimplementationTarget - The target of the current implementation.InstrumentedType.Prepareable.prepare(InstrumentedType).public boolean equals(Object object)
equals in class InvocationHandlerAdapterpublic int hashCode()
hashCode in class InvocationHandlerAdapterCopyright © 2014–2016. All rights reserved.