Class GetDeclaredMethodHandle
- java.lang.Object
-
- org.hibernate.validator.internal.util.privilegedactions.GetDeclaredMethodHandle
-
- All Implemented Interfaces:
PrivilegedAction<MethodHandle>
public final class GetDeclaredMethodHandle extends Object implements PrivilegedAction<MethodHandle>
Returns the declared method with the specified name and parameter types in the form of aMethodHandleornullif it does not exist or cannot be accessed.- Author:
- Guillaume Smet
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GetDeclaredMethodHandleaction(MethodHandles.Lookup lookup, Class<?> clazz, String methodName, Class<?>... parameterTypes)static GetDeclaredMethodHandleandMakeAccessible(MethodHandles.Lookup lookup, Class<?> clazz, String methodName, Class<?>... parameterTypes)Before using this method on arbitrary classes, you need to check theHibernateValidatorPermission.ACCESS_PRIVATE_MEMBERSpermission against the security manager, if the calling class exposes the handle to clients.MethodHandlerun()
-
-
-
Method Detail
-
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_MEMBERSpermission against the security manager, if the calling class exposes the handle to clients.
-
run
public MethodHandle run()
- Specified by:
runin interfacePrivilegedAction<MethodHandle>
-
-