public class ReflectUtil extends Object
| Constructor and Description |
|---|
ReflectUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getField(Class classz,
Object object,
Class<T> t,
String fieldName)
Get the private property of an object.
|
static void |
invoke(Class classz,
Object object,
String methodName) |
static void |
setField(Class classz,
Object object,
String fieldName,
Object value)
Set the private property of an object.
|
public static void invoke(Class classz, Object object, String methodName)
classz - classzobject - objectmethodName - methodNamepublic static <T> T getField(Class classz, Object object, Class<T> t, String fieldName)
T - class of the private propertyclassz - class of objectobject - objectt - class of the private propertyfieldName - of the private propertyCopyright © 2023 openGauss. All rights reserved.