Package io.rxson.reactive
Class ReflectionUtils
java.lang.Object
io.rxson.reactive.ReflectionUtils
public class ReflectionUtils extends Object
- Author:
- Mohamed Aly Bou Hanane © 2020
-
Constructor Summary
Constructors Constructor Description ReflectionUtils()
-
Method Summary
Modifier and Type Method Description static Collection<Field>
getAllFields(Class clazz)
static List<Field>
getClassFields(Class clazz)
static List<Field>
getClassVisibleFields(Class clazz)
static Class<?>
getGenericType(Field field)
Finds the generic type of the field.static String
getJsonPath(Field field)
static String
getJsonPath(Field field, String key)
static Class<?>
getType(Field field)
static void
invokeSetter(Object obj, String fieldName, Object fieldValue)
static boolean
isArray(Field field)
static boolean
isPublisher(Field field)
-
Constructor Details
-
ReflectionUtils
public ReflectionUtils()
-
-
Method Details
-
isArray
-
isPublisher
-
getAllFields
-
getClassFields
-
getClassVisibleFields
-
getGenericType
Finds the generic type of the field. If the field is not generic it returns Object.class.- Parameters:
field
- to be evaluated
-
getType
-
invokeSetter
-
getJsonPath
-
getJsonPath
-