JTools

org.jtools.util
Class ClassUtils

java.lang.Object
  extended by org.jtools.util.ClassUtils

public class ClassUtils
extends Object

ClassLoading utilities.


Constructor Summary
ClassUtils()
           
 
Method Summary
static Object createOrGetObject(String classname, Object context)
           
static String encodeArrayName(String source)
           
static Method getGetterMethod(Class clazz, String nameOrProperty, boolean isBoolean)
           
static String getGetterMethodName(String property, boolean isBoolean)
           
static Method getGetterMethodNoEx(Class clazz, String nameOrProperty, boolean isBoolean)
           
static String getPackageName(Class clazz, String defaultPackage)
           
static String getSetterMethodName(String property)
           
static Class[] toClass(ArgumentDescriptor[] args)
           
static Class[] toClass(ArgumentDescriptor[] args, Object loaderContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassUtils

public ClassUtils()
Method Detail

getPackageName

public static String getPackageName(Class clazz,
                                    String defaultPackage)

createOrGetObject

public static Object createOrGetObject(String classname,
                                       Object context)
                                throws InvocationTargetException,
                                       ClassNotFoundException,
                                       NoSuchMethodException,
                                       IllegalAccessException,
                                       InstantiationException
Throws:
InvocationTargetException
ClassNotFoundException
NoSuchMethodException
IllegalAccessException
InstantiationException

encodeArrayName

public static String encodeArrayName(String source)
                              throws ClassNotFoundException
Throws:
ClassNotFoundException

getGetterMethod

public static Method getGetterMethod(Class clazz,
                                     String nameOrProperty,
                                     boolean isBoolean)
                              throws NoSuchMethodException
Throws:
NoSuchMethodException

getGetterMethodName

public static String getGetterMethodName(String property,
                                         boolean isBoolean)

getSetterMethodName

public static String getSetterMethodName(String property)

getGetterMethodNoEx

public static Method getGetterMethodNoEx(Class clazz,
                                         String nameOrProperty,
                                         boolean isBoolean)

toClass

public static Class[] toClass(ArgumentDescriptor[] args)

toClass

public static Class[] toClass(ArgumentDescriptor[] args,
                              Object loaderContext)
                       throws ClassNotFoundException
Throws:
ClassNotFoundException

JTools

© 2000-2006, JTools.org.