Package org.jboss.as.pojo.service
Class Configurator
java.lang.Object
org.jboss.as.pojo.service.Configurator
Configuration util.
- Author:
- Ales Justin
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectconvertValue(Class<?> clazz, Object value, boolean replaceProperties, boolean trim) Convert a valuestatic booleanTest 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<?>Turn type into class.
-
Field Details
-
NO_PARAMS_TYPES
No parameter types
-
-
Constructor Details
-
Configurator
public Configurator()
-
-
Method Details
-
toClass
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
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
Test whether type names are equal to type infos- Parameters:
typeNames- the type namestypeInfos- the type infos- Returns:
- true when they are equal
-
simpleCheck
A simple null and length check.- Parameters:
typeNames- the type namestypeInfos- the type infos- Returns:
- false if either argument is null or lengths differ, else true
-