Class ReflectUtil
java.lang.Object
org.flowable.common.engine.impl.util.ReflectUtil
- Author:
- Tom Baeyens
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleanfieldTypeCompatible(Object value, Field field) protected static <T> Constructor<T>findMatchingConstructor(Class<T> clazz, Object[] args) static ClassLoaderprotected static ClassLoaderstatic FieldReturns the field of the given class or null if it doesn't exist.static FieldReturns the field of the given object or null if it doesn't exist.static StringgetGetterShorthandName(Method method) static URLgetResource(String name) static InputStreamgetResourceAsStream(String name) static MethodReturns the setter-method for the given field name or null if no setter exists.static StringgetSetterShorthandName(Method method) static Objectinstantiate(String className) static Objectinstantiate(String className, Object[] args) static Objectstatic voidinvokeSetter(Method setterMethod, Object target, String name, Object value) static voidinvokeSetterOrField(Object target, String name, Object value, boolean throwExceptionOnMissingField) static booleanstatic booleanstatic booleanprotected static ClassloadClass(ClassLoader classLoader, String className) static Class<?>protected static booleanstatic 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
-