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

public final Class GetMethodFromGetterNameCandidates

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

Returns the method with the specified property name or null if it does not exist. This action will iterate through getter name candidates and return the first found method.

GetMethodFromPropertyName#lookForMethodsInHierarchy parameter controls if we need to check for methods on superclasses/implemented interfaces or not, if equals to false it will use Class#getDeclaredMethod(String, Class[]), and Class#getMethod(String, Class[]) otherwise.

Author
Marko Bekhta

Field Summary

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

Constructor Summary

AccessConstructor and Description
private
GetMethodFromGetterNameCandidates(Class<?> clazz, List<String> getterNameCandidates, boolean lookForMethodsInHierarchy)

Method Summary

Modifier and TypeMethod and Description
public static GetMethodFromGetterNameCandidates
action(Class<?> clazz, List<String> getterNameCandidates)

public static GetMethodFromGetterNameCandidates
action(Class<?> clazz, List<String> possibleMethodNames, boolean lookForMethodsInHierarchy)

public Method
run()

Implements java.security.PrivilegedAction.run.

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

Field Detail

clazzback to summary
private final Class<?> clazz
getterNameCandidatesback to summary
private final List<String> getterNameCandidates
lookForMethodsInHierarchyback to summary
private final boolean lookForMethodsInHierarchy

Constructor Detail

GetMethodFromGetterNameCandidatesback to summary
private GetMethodFromGetterNameCandidates(Class<?> clazz, List<String> getterNameCandidates, boolean lookForMethodsInHierarchy)

Method Detail

actionback to summary
public static GetMethodFromGetterNameCandidates action(Class<?> clazz, List<String> getterNameCandidates)
actionback to summary
public static GetMethodFromGetterNameCandidates action(Class<?> clazz, List<String> possibleMethodNames, boolean lookForMethodsInHierarchy)
runback to summary
public Method 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:Method

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