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 booleancontainsField(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.GettergetGetterMethod(Class<?> clazz, String name)static Class<?>getPropertType(String className, String name)static MethodgetSetter(String fieldName, Class<?> clazz)static io.jans.orm.reflect.property.SettergetSetterMethod(Class<?> clazz, String name)static ObjectgetValue(Object object, String property)static ObjectinvokeGetterMethod(Object obj, String variableName)static ObjectinvokeMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes)ObjectinvokeReflectionGetter(Object obj, String variableName)static voidinvokeReflectionSetter(Object obj, String propertyName, Object variableValue)static booleanisAttributeInExclusion(String className, String attribute, Map<String,List<String>> exclusionMap)static booleanisKeyPresentInMap(String key, Map<String,String> map)booleanisStringField(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)
-
-