APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.dynalink.beans

pack-priv Class CallerSensitiveDynamicMethod

extends SingleDynamicMethod
Class Inheritance
Imports
java.lang.invoke.MethodHandle, .MethodHandles, .MethodType, java.lang.reflect.Constructor, .Executable, .Method, .Modifier, jdk.dynalink.CallSiteDescriptor, jdk.dynalink.linker.support.Lookup

A dynamic method bound to exactly one Java method or constructor that is caller sensitive. Since the target method is caller sensitive, it doesn't cache a method handle but rather uses the passed lookup object in getTarget(CallSiteDescriptor) to unreflect a method handle from the reflective member on every request.

Field Summary

Modifier and TypeField and Description
private final Executable
private final MethodType

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv MethodType
getMethodType()

Implements abstract jdk.dynalink.beans.SingleDynamicMethod.getMethodType.

Returns this method's native type.

private static MethodType
private static String
pack-priv MethodHandle
getTarget(final CallSiteDescriptor desc)

Implements abstract jdk.dynalink.beans.SingleDynamicMethod.getTarget.

Given a specified call site descriptor, returns a method handle to this method's target.

pack-priv boolean
isConstructor()

Overrides jdk.dynalink.beans.DynamicMethod.isConstructor.

True if this method happens to be a constructor method.

pack-priv boolean
isVarArgs()

Implements abstract jdk.dynalink.beans.SingleDynamicMethod.isVarArgs.

Returns true if this method is variable arity.

private static MethodHandle
unreflect(final MethodHandles.Lookup lookup, final Method m)

private static MethodHandle
Inherited from jdk.dynalink.beans.SingleDynamicMethod:
collectArgumentscontainsgetInvocationgetInvocationgetMethodForExactParamTypesgetMethodNameWithSignature

Field Detail

targetback to summary
private final Executable target
typeback to summary
private final MethodType type

Constructor Detail

CallerSensitiveDynamicMethodback to summary
pack-priv CallerSensitiveDynamicMethod(final Executable target)

Method Detail

getMethodTypeback to summary
pack-priv MethodType getMethodType()

Implements abstract jdk.dynalink.beans.SingleDynamicMethod.getMethodType.

Doc from jdk.dynalink.beans.SingleDynamicMethod.getMethodType.

Returns this method's native type.

Annotations
@Override
getMethodTypeback to summary
private static MethodType getMethodType(final Executable m)
getNameback to summary
private static String getName(final Executable m)
getTargetback to summary
pack-priv MethodHandle getTarget(final CallSiteDescriptor desc)

Implements abstract jdk.dynalink.beans.SingleDynamicMethod.getTarget.

Doc from jdk.dynalink.beans.SingleDynamicMethod.getTarget.

Given a specified call site descriptor, returns a method handle to this method's target. The target should only depend on the descriptor's lookup, and it should only retrieve it (as a privileged operation) when it is absolutely needed.

Annotations
@Override
isConstructorback to summary
pack-priv boolean isConstructor()

Overrides jdk.dynalink.beans.DynamicMethod.isConstructor.

Doc from jdk.dynalink.beans.DynamicMethod.isConstructor.

True if this method happens to be a constructor method.

Annotations
@Override
isVarArgsback to summary
pack-priv boolean isVarArgs()

Implements abstract jdk.dynalink.beans.SingleDynamicMethod.isVarArgs.

Doc from jdk.dynalink.beans.SingleDynamicMethod.isVarArgs.

Returns true if this method is variable arity.

Annotations
@Override
unreflectback to summary
private static MethodHandle unreflect(final MethodHandles.Lookup lookup, final Method m)
unreflectConstructorback to summary
private static MethodHandle unreflectConstructor(final MethodHandles.Lookup lookup, final Constructor<?> c)