Package io.jans.configapi.core.util
Class DataUtil
- java.lang.Object
-
- io.jans.configapi.core.util.DataUtil
-
@ApplicationScoped @Named("dataUtil") public class DataUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description DataUtil()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
containsField(List<Field> allFields, String attribute)
static List<Field>
getAllFields(Class<?> type)
static List<Field>
getAllFields(List<Field> fields, Class<?> type)
static Map<String,String>
getFieldTypeMap(Class<?> clazz)
static io.jans.orm.reflect.property.Getter
getGetterMethod(Class<?> clazz, String name)
static Class<?>
getPropertType(String className, String name)
static Method
getSetter(String fieldName, Class<?> clazz)
static io.jans.orm.reflect.property.Setter
getSetterMethod(Class<?> clazz, String name)
static Object
getValue(Object object, String property)
static Object
invokeGetterMethod(Object obj, String variableName)
static Object
invokeMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes)
Object
invokeReflectionGetter(Object obj, String variableName)
static void
invokeReflectionSetter(Object obj, String propertyName, Object variableValue)
static boolean
isAttributeInExclusion(String className, String attribute, Map<String,List<String>> exclusionMap)
static boolean
isKeyPresentInMap(String key, Map<String,String> map)
boolean
isStringField(Map<String,String> objectPropertyMap, String attribute)
-
-
-
Method Detail
-
getPropertType
public static Class<?> getPropertType(String className, String name) throws io.jans.orm.exception.MappingException
- Throws:
io.jans.orm.exception.MappingException
-
getGetterMethod
public static io.jans.orm.reflect.property.Getter getGetterMethod(Class<?> clazz, String name) throws io.jans.orm.exception.MappingException
- Throws:
io.jans.orm.exception.MappingException
-
getSetterMethod
public static io.jans.orm.reflect.property.Setter getSetterMethod(Class<?> clazz, String name) throws io.jans.orm.exception.MappingException
- Throws:
io.jans.orm.exception.MappingException
-
getValue
public static Object getValue(Object object, String property) throws io.jans.orm.exception.MappingException
- Throws:
io.jans.orm.exception.MappingException
-
getSetter
public static Method getSetter(String fieldName, Class<?> clazz) throws IntrospectionException
- Throws:
IntrospectionException
-
invokeMethod
public static Object invokeMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException
-
invokeReflectionSetter
public static void invokeReflectionSetter(Object obj, String propertyName, Object variableValue)
-
isStringField
public boolean isStringField(Map<String,String> objectPropertyMap, String attribute)
-
-