com.geekologue.md4j.util
Class ClassUtils

java.lang.Object
  extended by com.geekologue.md4j.util.ClassUtils

public class ClassUtils
extends java.lang.Object

Class Utilities

Author:
manos

Constructor Summary
ClassUtils()
           
 
Method Summary
static java.lang.ClassLoader getClassLoader()
          get the context classloader from the current thread
static java.lang.Class loadClass(java.lang.String className)
          Load a class given a class name its name
static java.lang.Object newInstance(java.lang.String name)
          Create a new object instance given a class name
 
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

newInstance

public static java.lang.Object newInstance(java.lang.String name)
                                    throws java.lang.Exception
Create a new object instance given a class name

Parameters:
name - The class name
Returns:
A new instance
Throws:
java.lang.Exception - In case an instantiation error occurs

loadClass

public static java.lang.Class loadClass(java.lang.String className)
                                 throws java.lang.ClassNotFoundException
Load a class given a class name its name

Parameters:
name - The class name
Returns:
The class with the given name
Throws:
java.lang.ClassNotFoundException - If the class cannot be loaded

getClassLoader

public static java.lang.ClassLoader getClassLoader()
get the context classloader from the current thread

Returns:
The context classloader for the current thread


Copyright © 2003-2007 Manos Batsis. All Rights Reserved.