Top Description Fields Constructors Methods
org.hibernate.validator.internal.util.privilegedactions

public final Class GetDeclaredMethodHandle

extends Object
implements PrivilegedAction<MethodHandle>
Class Inheritance
All Implemented Interfaces
java.security.PrivilegedAction
Imports
java.lang.invoke.MethodHandle, .MethodHandles, .MethodHandles.Lookup, java.lang.reflect.Method, java.security.PrivilegedAction, org.hibernate.validator.internal.util.logging.Log, .LoggerFactory

Returns the declared method with the specified name and parameter types in the form of a MethodHandle or null if it does not exist or cannot be accessed.
Author
Guillaume Smet

Field Summary

Modifier and TypeField and Description
private final Class<?>
private static final Log
private final MethodHandles.Lookup
private final boolean
private final String
private final Class<?>[]

Constructor Summary

AccessConstructor and Description
private
GetDeclaredMethodHandle(MethodHandles.Lookup lookup, Class<?> clazz, String methodName, boolean makeAccessible, Class<?>... parameterTypes)

Method Summary

Modifier and TypeMethod and Description
public static GetDeclaredMethodHandle
action(MethodHandles.Lookup lookup, Class<?> clazz, String methodName, Class<?>... parameterTypes)

public static GetDeclaredMethodHandle
andMakeAccessible(MethodHandles.Lookup lookup, Class<?> clazz, String methodName, Class<?>... parameterTypes)

Before using this method on arbitrary classes, you need to check the HibernateValidatorPermission.ACCESS_PRIVATE_MEMBERS permission against the security manager, if the calling class exposes the handle to clients.

public MethodHandle
run()

Implements java.security.PrivilegedAction.run.

Performs the computation.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clazzback to summary
private final Class<?> clazz
LOGback to summary
private static final Log LOG
lookupback to summary
private final MethodHandles.Lookup lookup
makeAccessibleback to summary
private final boolean makeAccessible
methodNameback to summary
private final String methodName
parameterTypesback to summary
private final Class<?>[] parameterTypes

Constructor Detail

GetDeclaredMethodHandleback to summary
private GetDeclaredMethodHandle(MethodHandles.Lookup lookup, Class<?> clazz, String methodName, boolean makeAccessible, Class<?>... parameterTypes)

Method Detail

actionback to summary
public static GetDeclaredMethodHandle action(MethodHandles.Lookup lookup, Class<?> clazz, String methodName, Class<?>... parameterTypes)
andMakeAccessibleback to summary
public static GetDeclaredMethodHandle andMakeAccessible(MethodHandles.Lookup lookup, Class<?> clazz, String methodName, Class<?>... parameterTypes)

Before using this method on arbitrary classes, you need to check the HibernateValidatorPermission.ACCESS_PRIVATE_MEMBERS permission against the security manager, if the calling class exposes the handle to clients.

runback to summary
public MethodHandle run()

Implements java.security.PrivilegedAction.run.

Doc from java.security.PrivilegedAction.run.

Performs the computation. This method will be called by AccessController.doPrivileged after enabling privileges.

Returns:MethodHandle

a class-dependent value that may represent the results of the computation. Each class that implements PrivilegedAction should document what (if anything) this value represents.

Annotations
@Override