org.hibernate.validator.internal.util.privilegedactions.NewProxyInstance Maven / Gradle / Ivy
/*
* Hibernate Validator, declare and validate application constraints
*
* License: Apache License, Version 2.0
* See the license.txt file in the root directory or .
*/
package org.hibernate.validator.internal.util.privilegedactions;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;
import java.security.PrivilegedAction;
/**
* Execute proxy creation as privileged action.
*
* @author Guillaume Smet
*/
public final class NewProxyInstance implements PrivilegedAction {
private final ClassLoader classLoader;
private final Class[] interfaces;
private final InvocationHandler invocationHandler;
public static NewProxyInstance action(ClassLoader classLoader, Class interfaze, InvocationHandler invocationHandler) {
return new NewProxyInstance( classLoader, interfaze, invocationHandler );
}
public static NewProxyInstance