public class ReflectionUtils extends Object
| Constructor and Description |
|---|
ReflectionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
callIfExists(T object,
String methodName)
Call a method if it exists.
|
static Method |
findSetter(Class<?> onClass,
Class<?> targetClass)
Squishy way to find a setter method.
|
static Class<?> |
loadClass(String classname)
Loads a class.
|
public static <T> void callIfExists(T object,
String methodName)
throws SecurityException,
IllegalAccessException,
IllegalArgumentException,
InvocationTargetException
object - The objectmethodName - Method name to call on the objectSecurityException - reflection - security manager to indicate a security violationIllegalAccessException - reflection - does not allow accessIllegalArgumentException - reflection - argument not allowedInvocationTargetException - reflection - exception thrown by an invoked method or constructorCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.