@HashCodeAndEqualsPlugin.Enhance protected static class InvocationHandlerAdapter.ForInstance extends InvocationHandlerAdapter implements InvocationHandlerAdapter.WithoutPrivilegeConfiguration
InvocationHandlerAdapter that delegates method
 invocations to an adapter that is stored in a static field.| Modifier and Type | Class and Description | 
|---|---|
| protected class  | InvocationHandlerAdapter.ForInstance.AppenderAn appender for implementing the  InvocationHandlerAdapter.ForInstance. | 
InvocationHandlerAdapter.AssignerConfigurable, InvocationHandlerAdapter.ForField, InvocationHandlerAdapter.ForInstance, InvocationHandlerAdapter.WithoutPrivilegeConfigurationImplementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.TargetInstrumentedType.Prepareable.NoOp| Modifier and Type | Field and Description | 
|---|---|
| protected InvocationHandler | invocationHandlerThe invocation handler to which method interceptions are to be delegated. | 
assigner, cached, fieldName, privileged, returning| Modifier | Constructor and Description | 
|---|---|
| protected  | ForInstance(String fieldName,
           boolean cached,
           boolean privileged,
           boolean returning,
           Assigner assigner,
           InvocationHandler invocationHandler)Creates a new invocation handler adapter for delegating invocations to an invocation handler that is stored
 in a static field. | 
| Modifier and Type | Method and Description | 
|---|---|
| Implementation.Composable | andThen(Implementation.Composable implementation)Appends the supplied composable implementation to this implementation. | 
| Implementation | andThen(Implementation implementation)Appends the supplied implementation to this implementation. | 
| ByteCodeAppender | appender(Implementation.Target implementationTarget)Creates a byte code appender that determines the implementation of the instrumented type's methods. | 
| InstrumentedType | prepare(InstrumentedType instrumentedType)Prepares a given instrumented type. | 
| Implementation.Composable | withAssigner(Assigner assigner)Configures an assigner to use with this invocation handler adapter. | 
| InvocationHandlerAdapter.WithoutPrivilegeConfiguration | withoutMethodCache()By default, any  Methodinstance that is handed over to anInvocationHandleris cached in a static field. | 
| InvocationHandlerAdapter.AssignerConfigurable | withPrivilegedLookup()Configures that the method constants supplied to the invocation handler adapter are resolved using an  java.security.AccessController. | 
protected final InvocationHandler invocationHandler
protected ForInstance(String fieldName, boolean cached, boolean privileged, boolean returning, Assigner assigner, InvocationHandler invocationHandler)
fieldName - The name of the field.cached - Determines if the Method instances that are handed to the
                          intercepted methods are cached in static fields.privileged - Determines if the Method instances are retrieved by
                          using an java.security.AccessController.returning - Determines if this implementation is returning the result value or is dropping it.assigner - The assigner to apply when defining this implementation.invocationHandler - The invocation handler to which all method calls are delegated.public InvocationHandlerAdapter.WithoutPrivilegeConfiguration 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.Composable withAssigner(Assigner assigner)
InvocationHandlerAdapterwithAssigner in interface InvocationHandlerAdapter.AssignerConfigurablewithAssigner in class InvocationHandlerAdapterassigner - The assigner to apply when defining this implementation.assigner configured.public InvocationHandlerAdapter.AssignerConfigurable withPrivilegedLookup()
InvocationHandlerAdapterjava.security.AccessController.withPrivilegedLookup in interface InvocationHandlerAdapter.WithoutPrivilegeConfigurationwithPrivilegedLookup in class InvocationHandlerAdapterpublic Implementation andThen(Implementation implementation)
andThen in interface Implementation.Composableimplementation - The subsequent implementation.public Implementation.Composable andThen(Implementation.Composable implementation)
andThen in interface Implementation.Composableimplementation - The subsequent composable implementation.public InstrumentedType prepare(InstrumentedType instrumentedType)
prepare in interface InstrumentedType.PrepareableinstrumentedType - The instrumented type in its current form.public ByteCodeAppender appender(Implementation.Target implementationTarget)
appender in interface ImplementationimplementationTarget - The target of the current implementation.InstrumentedType.Prepareable.prepare(InstrumentedType).Copyright © 2014–1970. All rights reserved.