de.xabsl.jxabslx.utils
Class ClassUtils
java.lang.Object
de.xabsl.jxabslx.utils.ClassUtils
public class ClassUtils
- extends java.lang.Object
Various useful functions in dealing with types
Method Summary |
static java.util.List<java.lang.reflect.Field> |
findFields(java.lang.Object instance,
java.lang.String fieldName,
ClassUtils.XabslType type)
Finds all field with a certain name in an instance |
static java.util.List<java.lang.reflect.Method> |
findMethods(java.lang.Object instance,
java.lang.String methodName,
ClassUtils.XabslType returnType,
int numberOfDecimalParameters,
int numberOfBooleanParameters,
int numberOfEnumeratedParameters)
Finds all member methods of an object that match the given criteria. |
static java.lang.Class |
wrapperTypeForPrimitive(java.lang.Class type)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassUtils
public ClassUtils()
wrapperTypeForPrimitive
public static java.lang.Class wrapperTypeForPrimitive(java.lang.Class type)
- Parameters:
type
- a primitive java type
- Returns:
- the appropriate wrapper type
findMethods
public static java.util.List<java.lang.reflect.Method> findMethods(java.lang.Object instance,
java.lang.String methodName,
ClassUtils.XabslType returnType,
int numberOfDecimalParameters,
int numberOfBooleanParameters,
int numberOfEnumeratedParameters)
- Finds all member methods of an object that match the given criteria.
- Parameters:
instance
- Object to contain methods. If of type Class, then only static
methods in that class will be considered.methodName
- returntype
- null for any typenumberOfDecimalParameters
- numberOfBooleanParameters
- numberOfEnumeratedParameters
-
- Returns:
findFields
public static java.util.List<java.lang.reflect.Field> findFields(java.lang.Object instance,
java.lang.String fieldName,
ClassUtils.XabslType type)
- Finds all field with a certain name in an instance