java.lang.reflect.InvocationHandler
. The adapter allows the invocation handler
to also intercept method calls to non-interface methods.
Modifier and Type | Class and Description |
---|---|
public static interface | InvocationHandlerAdapter.AssignerConfigurable
Allows for the configuration of an |
protected static class | InvocationHandlerAdapter.ForField
An implementation of an |
protected static class | InvocationHandlerAdapter.ForInstance
An implementation of an |
public static interface | InvocationHandlerAdapter.WithoutPrivilegeConfiguration
Allows the configuration of privileged lookup for the resolution of |
Modifier and Type | Field and Description |
---|---|
protected final Assigner | assigner
The assigner that is used for assigning the return invocation handler's return value to the intercepted method's return value. |
private static final boolean | CACHED
Indicates that a |
protected final boolean | cached
Determines if the |
private static final boolean | DROPPING
Indicates that a handler is dropping its return value. |
protected final String | fieldName
The name of the field for storing an invocation handler. |
private static final TypeDescription. | INVOCATION_HANDLER_TYPE
A type description of the |
private static final boolean | PRIVILEGED
Indicates that a lookup of a method constant should be looked up using an |
protected final boolean | privileged
Determines if the |
private static final boolean | RETURNING
Indicates that a handler is returning its return value. |
protected final boolean | returning
Determines if this implementation is returning the result value or is dropping it. |
private static final boolean | UNCACHED
Indicates that a value should not be cached. |
private static final boolean | UNPRIVILEGED
Indicates that a lookup of a method constant should not be looked up using an |
Access | Constructor and Description |
---|---|
protected | InvocationHandlerAdapter(String
The name of the field. fieldName, boolean Determines if the cached, boolean java. instances that are handed to the
intercepted methods are cached in static fields.Determines if the privileged, boolean java. instances are retrieved by using an java.security.AccessController .Determines if this implementation is returning the result value or is dropping it. returning, Assigner The assigner to apply when defining this implementation. assigner)Creates a new invocation handler for a given field. |
Modifier and Type | Method and Description |
---|---|
protected ByteCodeAppender. | Returns: The size of the applied assignment.The method visitor for writing the byte code to. methodVisitor, Implementation.The implementation context for the current implementation. implementationContext,The method that is instrumented. instrumentedMethod, StackManipulation A stack manipulation that applies any preparation to the operand stack. preparingManipulation, FieldDescription The field that contains the value for the invocation handler. fieldDescription)Applies an implementation that delegates to a invocation handler. |
private List | Returns: A list of stack manipulation that loads all arguments of an instrumented method.The method that is instrumented. instrumentedMethod)Returns a list of stack manipulations that loads all arguments of an instrumented method. |
public static InvocationHandlerAdapter | Returns: An implementation that delegates all method interceptions to the given invocation handler.The invocation handler to which all method calls are delegated. invocationHandler)Creates an implementation for any instance of an |
public static InvocationHandlerAdapter | Returns: An implementation that delegates all method interceptions to the given invocation handler.The invocation handler to which all method calls are delegated. invocationHandler, String The name of the field. fieldName)Creates an implementation for any instance of an |
public static InvocationHandlerAdapter | Returns: An implementation that delegates all method interceptions to an instance field of the given name.The name of the field. name)Creates an implementation for any |
public static InvocationHandlerAdapter | Returns: An implementation that delegates all method interceptions to an instance field of the given name.The name of the field. name, FieldLocator.The field locator factory fieldLocatorFactoryCreates an implementation for any |
public abstract Implementation | Returns: This instrumentation with the givenassigner configured.The assigner to apply when defining this implementation. assigner)Configures an assigner to use with this invocation handler adapter. |
public abstract InvocationHandlerAdapter. | Returns: A similar invocation handler adapter that applies caching.By default, any |
public abstract InvocationHandlerAdapter. | Returns: This instrumentation with a privileged lookup configured.Configures that the method constants supplied to the invocation handler adapter are resolved using an |