public enum JavaReflectionCache extends Enum<JavaReflectionCache>
| Enum Constant and Description |
|---|
INSTANCE
Singleton instance.
|
| Modifier and Type | Method and Description |
|---|---|
ClassLoader |
getAppClassLoader() |
Class<?> |
getClass(String className)
returns class.
|
Constructor<?> |
getConstructor(String className,
Class<?>... arguments)
Returns constructor.
|
Field |
getField(Class<?> cls,
String name)
returns field from class or super-classes.
|
Method |
getMethod(String className,
String methodName,
Class<?>[] arguments)
Returns method.
|
Class |
getPojo(String className) |
ProtectionDomain |
getProtectionDomain() |
void |
init()
Initialize.
|
void |
setAppClassLoader(ClassLoader classLoader) |
void |
setAppProtectionDomain(ProtectionDomain appProtectionDomain) |
static JavaReflectionCache |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JavaReflectionCache[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JavaReflectionCache INSTANCE
public static JavaReflectionCache[] values()
for (JavaReflectionCache c : JavaReflectionCache.values()) System.out.println(c);
public static JavaReflectionCache valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic void init()
public ClassLoader getAppClassLoader()
public void setAppClassLoader(ClassLoader classLoader)
public ProtectionDomain getProtectionDomain()
public void setAppProtectionDomain(ProtectionDomain appProtectionDomain)
public Class<?> getClass(String className) throws ClassNotFoundException
className - ClassNotFoundExceptionpublic Method getMethod(String className, String methodName, Class<?>[] arguments) throws ClassNotFoundException, SecurityException, NoSuchMethodException
className - methodName - arguments - ClassNotFoundExceptionSecurityExceptionNoSuchMethodExceptionpublic Constructor<?> getConstructor(String className, Class<?>... arguments) throws ClassNotFoundException, SecurityException, NoSuchMethodException
className - arguments - ClassNotFoundExceptionSecurityExceptionNoSuchMethodExceptionpublic Field getField(Class<?> cls, String name) throws SecurityException, NoSuchFieldException
cls - name - SecurityExceptionNoSuchFieldExceptionCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.