public class ReflectUtil extends Object
| Constructor and Description |
|---|
ReflectUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Set<Class<?>> |
getParentTypes(Class<?> paramType)
Get the super class and interface type collection according to paramType.
|
static Object |
getValue(Object o,
Field field)
Break through the access rights of the object
and obtain the specified field value.
|
static boolean |
isCurrentTypeOrParentType(Class<?> paramType,
Class<?> parentType)
Determine whether parentType is paramType or its parent class or interface
|
public static Object getValue(Object o, Field field)
o - object of field value sourcefield - field used for get valuepublic static boolean isCurrentTypeOrParentType(Class<?> paramType, Class<?> parentType)
paramType - type to be determined - subclassparentType - type to be determined - parent class or interfaceCopyright © 2024. All rights reserved.