DynamicLinkerFactory#setInternalObjectsFilter(MethodHandleTransformer)
that delegates to a pair of filtering method handles. It takes a method
handle of Object(Object)
type for filtering parameter values and
another one of the same type for filtering return values. It applies them as
parameter and return value filters on method handles passed to its
transform(MethodHandle)
method, on those parameters and return values
that are declared to have type Object
. Also handles
method handles that support variable
arity calls
with a last Object[]
parameter. You can broadly think of
the parameter filter as being a wrapping method for exposing internal runtime
objects wrapped into an adapter with some public interface, and the return
value filter as being its inverse unwrapping method.
Modifier and Type | Field and Description |
---|---|
private static final MethodHandle | |
private final MethodHandle | |
private final MethodHandle | |
private final MethodHandle |
Access | Constructor and Description |
---|---|
public | DefaultInternalObjectFilter(final MethodHandle
the filter for method parameters. Must be of type
parameterFilter, final MethodHandle Object(Object) , or null .the filter for return values. Must be of type
returnFilter)Object(Object) , or null .Creates a new filter. |
Modifier and Type | Method and Description |
---|---|
private static MethodHandle | |
private static Object[] | |
public MethodHandle | transform(final MethodHandle
the method handle being transformed. target)Implements jdk. Transforms a method handle. |
FILTER_VARARGS | back to summary |
---|---|
private static final MethodHandle FILTER_VARARGS |
parameterFilter | back to summary |
---|---|
private final MethodHandle parameterFilter |
returnFilter | back to summary |
---|---|
private final MethodHandle returnFilter |
varArgFilter | back to summary |
---|---|
private final MethodHandle varArgFilter |
DefaultInternalObjectFilter | back to summary |
---|---|
public DefaultInternalObjectFilter(final MethodHandle parameterFilter, final MethodHandle returnFilter) Creates a new filter.
|
checkHandle | back to summary |
---|---|
private static MethodHandle checkHandle(final MethodHandle handle, final String handleKind) |
filterVarArgs | back to summary |
---|---|
private static Object[] filterVarArgs(final MethodHandle parameterFilter, final Object[] args) throws Throwable
|
transform | back to summary |
---|---|
public MethodHandle transform(final MethodHandle target) Implements jdk. Doc from jdk. Transforms a method handle.
|