| java.lang.Object org.obe.util.ClassUtils
ClassUtils | final public class ClassUtils (Code) | | Provides helpers for performing reflection-based introspections.
author: Adrian Price |
Method Summary | |
public static Class | classForName(String className) Returns the class that matches the supplied names.
N.B. | public static Class[] | classesForNames(String[] classNames) Returns an array of classes to match the supplied names.
N.B. | public static Method | findMethod(String className, String methodSig) Returns the method that matches a specified signature.
Parameters: className - The class that defines the method. Parameters: methodSig - The method signature in standard Java source form. | public static String[] | getPropertyNames(PropertyDescriptor[] propDescs) | public static PropertyDescriptor[] | introspect(Class beanClass, Class stopClass) Introspects properties of the specified class(es) into a map. | public static String[] | namesForClasses(Class[] parmTypes) Converts an array of classes to an array of class names.
Parameters: parmTypes - Array of classes. | public static String | signatureFromMethod(Method method) Generates a string method description from a Method object.
Parameters: method - Method object. | public static String | signatureFromMethod(Method method, boolean includeModifiers, boolean includeReturn, boolean includeClass, boolean includeMethod, boolean includeParameterTypes, boolean includeExceptions) Generates a string method description from a Method object.
Parameters: method - Method object. Parameters: includeModifiers - true to include the modifiers. Parameters: includeReturn - true to include the return type. Parameters: includeClass - true to include the class name. Parameters: includeMethod - true to include the method name. Parameters: includeParameterTypes - true to include the parameters. Parameters: includeExceptions - true to include the exceptions. |
featureDescriptorComparator | final public static Comparator featureDescriptorComparator(Code) | | |
classForName | public static Class classForName(String className) throws ClassNotFoundException(Code) | | Returns the class that matches the supplied names.
N.B. The class name must be specified in Java source form, not the
JVM runtime form (which uses non-reversible names for primitive types and
somewhat obfuscated names for array types).
Parameters: className - Class name. Class for supplied name. throws: ClassNotFoundException - |
classesForNames | public static Class[] classesForNames(String[] classNames) throws ClassNotFoundException(Code) | | Returns an array of classes to match the supplied names.
N.B. Class names must be specified in Java source form, not the JVM
runtime form (which uses non-reversible names for primitive types and
somewhat obfuscated names for array types).
Parameters: classNames - Class names. Classes for supplied names or null ifclassNames is null . throws: ClassNotFoundException - |
introspect | public static PropertyDescriptor[] introspect(Class beanClass, Class stopClass)(Code) | | Introspects properties of the specified class(es) into a map.
Parameters: beanClass - Parameters: stopClass - Array of PropertyDescriptor . |
namesForClasses | public static String[] namesForClasses(Class[] parmTypes)(Code) | | Converts an array of classes to an array of class names.
Parameters: parmTypes - Array of classes. A corresponding array of class names in Java source format. |
signatureFromMethod | public static String signatureFromMethod(Method method)(Code) | | Generates a string method description from a Method object.
Parameters: method - Method object. String representation of the method in JVM runtime format. |
signatureFromMethod | public static String signatureFromMethod(Method method, boolean includeModifiers, boolean includeReturn, boolean includeClass, boolean includeMethod, boolean includeParameterTypes, boolean includeExceptions)(Code) | | Generates a string method description from a Method object.
Parameters: method - Method object. Parameters: includeModifiers - true to include the modifiers. Parameters: includeReturn - true to include the return type. Parameters: includeClass - true to include the class name. Parameters: includeMethod - true to include the method name. Parameters: includeParameterTypes - true to include the parameters. Parameters: includeExceptions - true to include the exceptions. String representation of the method in JVM runtime format. |
|
|