|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.bval.util.PrivilegedActions
org.apache.bval.jsr303.util.SecureActions
public class SecureActions
Description: utility methods to perform actions with AccessController or without.
| Constructor Summary | |
|---|---|
SecureActions()
|
|
| Method Summary | ||
|---|---|---|
static ClassLoader |
getClassLoader(Class<?> clazz)
Get class loader of clazz. |
|
static
|
getConstructor(Class<T> clazz,
Class<?>... params)
Get the constructor of clazz matching params. |
|
static ClassLoader |
getContextClassLoader(Thread thread)
Get context class loader of thread. |
|
static Field |
getDeclaredField(Class<?> clazz,
String fieldName)
Get a field declared on a given class. |
|
static Field[] |
getDeclaredFields(Class<?> clazz)
Get all fields declared on a given class. |
|
static Method[] |
getDeclaredMethods(Class<?> clazz)
Get methods declared on clazz. |
|
static Method |
getGetter(Class<?> clazz,
String methodName)
Returns the public method with the specified name or null if it does not exist. |
|
static Method |
getMethod(Class<?> clazz,
String methodName)
Get the method of methodName available on clazz. |
|
static Class<?> |
loadClass(String className,
Class<?> caller)
Load a class. |
|
static
|
newInstance(Class<T> cls)
Create a new instance of the class using the default no-arg constructor. |
|
static
|
newInstance(Class<T> cls,
Class<?>[] paramTypes,
Object[] values)
Create a new instance of a specified class, rethrowing ValidationException. |
|
| Methods inherited from class org.apache.bval.util.PrivilegedActions |
|---|
getAnnotationValue, getLineSeparator, getPathSeparator, getProperty, newInstance, newInstance, run |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SecureActions()
| Method Detail |
|---|
public static <T> T newInstance(Class<T> cls)
cls - - the class (no interface, non-abstract, has accessible default no-arg-constructor)
public static <T> T newInstance(Class<T> cls,
Class<?>[] paramTypes,
Object[] values)
ValidationException.
T - cls - - the class (no interface, non-abstract, has accessible matching constructor)paramTypes - values -
public static Class<?> loadClass(String className,
Class<?> caller)
className - caller -
public static Field getDeclaredField(Class<?> clazz,
String fieldName)
clazz - fieldName -
public static Field[] getDeclaredFields(Class<?> clazz)
clazz -
public static Method getGetter(Class<?> clazz,
String methodName)
clazz - methodName -
public static Method getMethod(Class<?> clazz,
String methodName)
methodName available on clazz.
clazz - methodName -
Method foundpublic static Method[] getDeclaredMethods(Class<?> clazz)
clazz.
clazz -
Method arraypublic static ClassLoader getClassLoader(Class<?> clazz)
clazz.
clazz -
ClassLoaderpublic static ClassLoader getContextClassLoader(Thread thread)
thread.
thread -
ClassLoader
public static <T> Constructor<T> getConstructor(Class<T> clazz,
Class<?>... params)
clazz matching params.
T - clazz - params -
Constructor found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||