Class ReflectionUtils
java.lang.Object
de.hybris.platform.webservicescommons.jaxb.util.ReflectionUtils
Helper class focusing on extracting data from fields. Mainly used by moxy context factory.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<Class>extractActualType(Type... types) Extract actual base classes used to construct given typesstatic Collection<Class>extractTypes(Field field) Extract actual base types used to define this field.static Collection<Field>getAllFields(Class<?> clazz) Retrieves all fields (also private) from given class and its superclass.static ClassgetArrayType(Class clazz) Removes array property from given class.
-
Method Details
-
extractTypes
Extract actual base types used to define this field.for example:
- List<String> will return String
- Map<String,Integer> will return String, Integer
- Parameters:
field- field to process- Returns:
- Base types used to construct this field
-
extractActualType
Extract actual base classes used to construct given types- Parameters:
types-- Returns:
- Collection of actual base classes from given types
-
getArrayType
Removes array property from given class.- Parameters:
clazz-- Returns:
- Base class of given array
-
getAllFields
Retrieves all fields (also private) from given class and its superclass. Up to Object level which properties are ignored.- Parameters:
clazz-- Returns:
- Collection of fields declared in class
-