public class ReflectUtils extends Object
| Constructor and Description |
|---|
ReflectUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Method |
findMethod(Class<?> clazz,
String method)
Get method by class.
|
static Field |
getField(Class<?> beanClass,
String name)
Gets field.
|
static Object |
getFieldValue(Object obj,
Field field)
Gets field value.
|
static Object |
getFieldValue(Object obj,
String fieldName)
Get field value object.
|
static Object |
invokeMethod(Class<?> clazz,
String method)
Invoke method by class.
|
public static Field getField(Class<?> beanClass, String name) throws SecurityException
beanClass - the bean classname - the nameSecurityException - the security exceptionpublic static Object getFieldValue(Object obj, String fieldName)
obj - the objfieldName - the field namepublic static Object getFieldValue(Object obj, Field field)
obj - the objfield - the fieldpublic static Object invokeMethod(Class<?> clazz, String method)
clazz - class typemethod - methodCopyright © 2021 The Apache Software Foundation. All rights reserved.