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

public final Class NewInstance<T>

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

Execute instance creation as privileged action.
Authors
Emmanuel Bernard, Hardy Ferentschik

Field Summary

Modifier and TypeField and Description
private final Class<T>
private static final Log
private final String

Constructor Summary

AccessConstructor and Description
private
NewInstance(Class<T> clazz, String message)

Method Summary

Modifier and TypeMethod and Description
public static <T> NewInstance<T>
action(Class<T> clazz, String message)

public T
run()

Implements java.security.PrivilegedAction.run.

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

Field Detail

clazzback to summary
private final Class<T> clazz
LOGback to summary
private static final Log LOG
messageback to summary
private final String message

Constructor Detail

NewInstanceback to summary
private NewInstance(Class<T> clazz, String message)

Method Detail

actionback to summary
public static <T> NewInstance<T> action(Class<T> clazz, String message)
runback to summary
public T 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:T

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