Class ReflectUtil
java.lang.Object
org.flowable.common.engine.impl.util.ReflectUtil
- Author:
- Tom Baeyens
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static boolean
fieldTypeCompatible
(Object value, Field field) protected static <T> Constructor<T>
findMatchingConstructor
(Class<T> clazz, Object[] args) static ClassLoader
protected static ClassLoader
static Field
Returns the field of the given class or null if it doesn't exist.static Field
Returns the field of the given object or null if it doesn't exist.static String
getGetterShorthandName
(Method method) static URL
getResource
(String name) static InputStream
getResourceAsStream
(String name) static Method
Returns the setter-method for the given field name or null if no setter exists.static String
getSetterShorthandName
(Method method) static Object
instantiate
(String className) static Object
instantiate
(String className, Object[] args) static Object
static void
invokeSetter
(Method setterMethod, Object target, String name, Object value) static void
invokeSetterOrField
(Object target, String name, Object value, boolean throwExceptionOnMissingField) static boolean
static boolean
static boolean
protected static Class
loadClass
(ClassLoader classLoader, String className) static Class<?>
protected static boolean
static void
-
Constructor Details
-
ReflectUtil
public ReflectUtil()
-
-
Method Details
-
getClassLoader
-
loadClass
-
getResourceAsStream
-
getResource
-
instantiate
-
invoke
-
invokeSetterOrField
-
getField
Returns the field of the given object or null if it doesn't exist. -
getField
Returns the field of the given class or null if it doesn't exist. -
setField
-
getSetter
Returns the setter-method for the given field name or null if no setter exists. -
invokeSetter
-
instantiate
-
findMatchingConstructor
-
matches
-
fieldTypeCompatible
-
getCustomClassLoader
-
loadClass
protected static Class loadClass(ClassLoader classLoader, String className) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
isGetter
-
isSetter
-
isSetter
-
getGetterShorthandName
-
getSetterShorthandName
-