Class GetDeclaredMethodHandle
java.lang.Object
org.hibernate.validator.internal.util.privilegedactions.GetDeclaredMethodHandle
- All Implemented Interfaces:
PrivilegedAction<MethodHandle>
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic GetDeclaredMethodHandle
action
(MethodHandles.Lookup lookup, Class<?> clazz, String methodName, Class<?>... parameterTypes) static GetDeclaredMethodHandle
andMakeAccessible
(MethodHandles.Lookup lookup, Class<?> clazz, String methodName, Class<?>... parameterTypes) Before using this method on arbitrary classes, you need to check theHibernateValidatorPermission.ACCESS_PRIVATE_MEMBERS
permission against the security manager, if the calling class exposes the handle to clients.run()
-
Method Details
-
action
public static GetDeclaredMethodHandle action(MethodHandles.Lookup lookup, Class<?> clazz, String methodName, Class<?>... parameterTypes) -
andMakeAccessible
public static GetDeclaredMethodHandle andMakeAccessible(MethodHandles.Lookup lookup, Class<?> clazz, String methodName, Class<?>... parameterTypes) Before using this method on arbitrary classes, you need to check theHibernateValidatorPermission.ACCESS_PRIVATE_MEMBERS
permission against the security manager, if the calling class exposes the handle to clients. -
run
- Specified by:
run
in interfacePrivilegedAction<MethodHandle>
-