Package org.jboss.as.pojo.service
Class Configurator
- java.lang.Object
-
- org.jboss.as.pojo.service.Configurator
-
public class Configurator extends Object
Configuration util.- Author:
- Ales Justin
-
-
Field Summary
Fields Modifier and Type Field Description static String[]NO_PARAMS_TYPESNo parameter types
-
Constructor Summary
Constructors Constructor Description Configurator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ObjectconvertValue(Class<?> clazz, Object value, boolean replaceProperties, boolean trim)Convert a valuestatic booleanequals(String[] typeNames, Class<?>[] typeInfos)Test whether type names are equal to type infosstatic MethodfindMethod(org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex index, Class classInfo, String name, String[] paramTypes, boolean isStatic, boolean isPublic, boolean strict)Find method infostatic String[]getTypes(ValueConfig[] values)Get types from values.protected static booleansimpleCheck(String[] typeNames, Class<?>[] typeInfos)A simple null and length check.static Class<?>toClass(Type type)Turn type into class.
-
-
-
Field Detail
-
NO_PARAMS_TYPES
public static final String[] NO_PARAMS_TYPES
No parameter types
-
-
Method Detail
-
toClass
public static Class<?> toClass(Type type)
Turn type into class.- Parameters:
type- the type- Returns:
- class
-
convertValue
public static Object convertValue(Class<?> clazz, Object value, boolean replaceProperties, boolean trim) throws Throwable
Convert a value- Parameters:
clazz- the classvalue- the valuereplaceProperties- whether to replace system propertiestrim- whether to trim string value- Returns:
- the value or null if there is no editor
- Throws:
Throwable- for any error
-
getTypes
public static String[] getTypes(ValueConfig[] values)
Get types from values.- Parameters:
values- the values- Returns:
- the values' types
-
findMethod
public static Method findMethod(org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex index, Class classInfo, String name, String[] paramTypes, boolean isStatic, boolean isPublic, boolean strict) throws IllegalArgumentException
Find method info- Parameters:
index- the deployment reflection indexclassInfo- the class infoname- the method nameparamTypes- the parameter typesisStatic- must the method be staticisPublic- must the method be publicstrict- is strict about method modifiers- Returns:
- the method info
- Throws:
IllegalArgumentException- when no such method
-
equals
public static boolean equals(String[] typeNames, Class<?>[] typeInfos)
Test whether type names are equal to type infos- Parameters:
typeNames- the type namestypeInfos- the type infos- Returns:
- true when they are equal
-
-