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

public final Class GetDeclaredField

extends Object
implements PrivilegedAction<Field>
Class Inheritance
All Implemented Interfaces
java.security.PrivilegedAction
Imports
java.lang.reflect.Field, java.security.PrivilegedAction

Returns the declared field with the specified name or null if it does not exist.
Author
Emmanuel Bernard

Field Summary

Modifier and TypeField and Description
private final Class<?>
private final String
private final boolean

Constructor Summary

AccessConstructor and Description
private
GetDeclaredField(Class<?> clazz, String fieldName, boolean makeAccessible)

Method Summary

Modifier and TypeMethod and Description
public static GetDeclaredField
action(Class<?> clazz, String fieldName)

public static GetDeclaredField
andMakeAccessible(Class<?> clazz, String fieldName)

Before using this method, you need to check the HibernateValidatorPermission.ACCESS_PRIVATE_MEMBERS permission against the security manager.

public Field
run()

Implements java.security.PrivilegedAction.run.

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

Field Detail

clazzback to summary
private final Class<?> clazz
fieldNameback to summary
private final String fieldName
makeAccessibleback to summary
private final boolean makeAccessible

Constructor Detail

GetDeclaredFieldback to summary
private GetDeclaredField(Class<?> clazz, String fieldName, boolean makeAccessible)

Method Detail

actionback to summary
public static GetDeclaredField action(Class<?> clazz, String fieldName)
andMakeAccessibleback to summary
public static GetDeclaredField andMakeAccessible(Class<?> clazz, String fieldName)

Before using this method, you need to check the HibernateValidatorPermission.ACCESS_PRIVATE_MEMBERS permission against the security manager.

runback to summary
public Field 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:Field

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