org.ow2.easybeans.util.loader
Class ClassUtils

java.lang.Object
  extended by org.ow2.easybeans.util.loader.ClassUtils

public final class ClassUtils
extends Object

The ClassUtils class is the central point used to load classes.

Author:
Guillaume Sauthier

Method Summary
static Class forName(String className)
          Look up the class in the Tread Context ClassLoader and in the "current" ClassLoader.
static Class forName(String className, Class clazz)
          Look up the class in the Tread Context ClassLoader and in the "current" ClassLoader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

forName

public static Class forName(String className)
                     throws ClassNotFoundException
Look up the class in the Tread Context ClassLoader and in the "current" ClassLoader.

Parameters:
className - The class name to load
Returns:
the corresponding Class instance
Throws:
ClassNotFoundException - if the Class was not found.

forName

public static Class forName(String className,
                            Class clazz)
                     throws ClassNotFoundException
Look up the class in the Tread Context ClassLoader and in the "current" ClassLoader.

Parameters:
className - The class name to load
clazz - a class used to get classloader
Returns:
the corresponding Class instance
Throws:
ClassNotFoundException - if the Class was not found.


Copyright © 2006-2011 OW2 Consortium. All Rights Reserved.