|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.engine.impl.util.ReflectUtil
public abstract class ReflectUtil
| Constructor Summary | |
|---|---|
ReflectUtil()
|
|
| Method Summary | ||
|---|---|---|
static ClassLoader |
getClassLoader()
|
|
static Field |
getField(String fieldName,
Class<?> clazz)
Returns the field of the given class or null if it doesnt exist. |
|
static Field |
getField(String fieldName,
Object object)
Returns the field of the given object or null if it doesnt exist. |
|
static Method |
getMethod(Class<?> declaringType,
String methodName,
Class<?>... parameterTypes)
Finds a method by name and parameter types. |
|
static URL |
getResource(String name)
|
|
static InputStream |
getResourceAsStream(String name)
|
|
static String |
getResourceUrlAsString(String name)
|
|
static Method |
getSetter(String fieldName,
Class<?> clazz,
Class<?> fieldType)
Returns the setter-method for the given field name or null if no setter exists. |
|
static Method |
getSingleSetter(String fieldName,
Class<?> clazz)
Returns a setter method based on the fieldName and the java beans setter naming convention or null if none exists. |
|
static
|
instantiate(Class<T> type)
|
|
static Object |
instantiate(String className)
|
|
static Object |
instantiate(String className,
Object[] args)
|
|
static Object |
invoke(Object target,
String methodName,
Object[] args)
|
|
static Class<?> |
loadClass(String className)
|
|
static void |
setField(Field field,
Object object,
Object value)
|
|
static URI |
urlToURI(URL url)
Converts an url to an uri. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReflectUtil()
| Method Detail |
|---|
public static ClassLoader getClassLoader()
public static Class<?> loadClass(String className)
public static InputStream getResourceAsStream(String name)
public static URL getResource(String name)
public static String getResourceUrlAsString(String name)
public static URI urlToURI(URL url)
url - the url to convert
ProcessEngineException - if the url has invalid syntaxpublic static Object instantiate(String className)
public static <T> T instantiate(Class<T> type)
public static Object invoke(Object target,
String methodName,
Object[] args)
public static Field getField(String fieldName,
Object object)
public static Field getField(String fieldName,
Class<?> clazz)
public static void setField(Field field,
Object object,
Object value)
public static Method getSetter(String fieldName,
Class<?> clazz,
Class<?> fieldType)
public static Method getSingleSetter(String fieldName,
Class<?> clazz)
public static Object instantiate(String className,
Object[] args)
public static Method getMethod(Class<?> declaringType,
String methodName,
Class<?>... parameterTypes)
declaringType - the name of the classmethodName - the name of the method to look forparameterTypes - the types of the parameters
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||