|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.obe.util.ClassUtils
Provides helpers for performing reflection-based introspections.
Field Summary | |
static java.util.Comparator |
featureDescriptorComparator
|
Method Summary | |
static java.lang.Class[] |
classesForNames(java.lang.String[] classNames)
Returns an array of classes to match the supplied names. |
static java.lang.Class |
classForName(java.lang.String className)
Returns the class that matches the supplied names. |
static java.lang.reflect.Method |
findMethod(java.lang.String className,
java.lang.String methodSig)
Returns the method that matches a specified signature. |
static java.lang.String[] |
getPropertyNames(java.beans.PropertyDescriptor[] propDescs)
|
static java.beans.PropertyDescriptor[] |
introspect(java.lang.Class beanClass,
java.lang.Class stopClass)
Introspects properties of the specified class(es) into a map. |
static java.lang.String[] |
namesForClasses(java.lang.Class[] parmTypes)
Converts an array of classes to an array of class names. |
static java.lang.String |
signatureFromMethod(java.lang.reflect.Method method)
Generates a string method description from a Method object. |
static java.lang.String |
signatureFromMethod(java.lang.reflect.Method method,
boolean includeModifiers,
boolean includeReturn,
boolean includeClass,
boolean includeMethod,
boolean includeParameterTypes,
boolean includeExceptions)
Generates a string method description from a Method object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.util.Comparator featureDescriptorComparator
Method Detail |
public static java.lang.Class classForName(java.lang.String className) throws java.lang.ClassNotFoundException
className
- Class name.
java.lang.ClassNotFoundException
public static java.lang.Class[] classesForNames(java.lang.String[] classNames) throws java.lang.ClassNotFoundException
classNames
- Class names.
null
if
classNames
is null
.
java.lang.ClassNotFoundException
public static java.lang.reflect.Method findMethod(java.lang.String className, java.lang.String methodSig) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException
className
- The class that defines the method.methodSig
- The method signature in standard Java source form.
java.lang.ClassNotFoundException
- If the class could be loaded.
java.lang.NoSuchMethodException
- If no matching method was found.public static java.lang.String[] getPropertyNames(java.beans.PropertyDescriptor[] propDescs)
public static java.beans.PropertyDescriptor[] introspect(java.lang.Class beanClass, java.lang.Class stopClass)
beanClass
- stopClass
-
PropertyDescriptor
.public static java.lang.String[] namesForClasses(java.lang.Class[] parmTypes)
parmTypes
- Array of classes.
public static java.lang.String signatureFromMethod(java.lang.reflect.Method method)
method
- Method object.
public static java.lang.String signatureFromMethod(java.lang.reflect.Method method, boolean includeModifiers, boolean includeReturn, boolean includeClass, boolean includeMethod, boolean includeParameterTypes, boolean includeExceptions)
method
- Method object.includeModifiers
- true
to include the modifiers.includeReturn
- true
to include the return type.includeClass
- true
to include the class name.includeMethod
- true
to include the method name.includeParameterTypes
- true
to include the parameters.includeExceptions
- true
to include the exceptions.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |