org.jboss.soa.esb.util
Class ClassUtil

java.lang.Object
  extended by org.jboss.soa.esb.util.ClassUtil

public class ClassUtil
extends java.lang.Object

Utility methods to aid in class/resource loading.

Author:
kevin

Constructor Summary
ClassUtil()
           
 
Method Summary
static java.lang.Class forName(java.lang.String className, java.lang.Class caller)
          Load the specified class.
static java.io.InputStream getResourceAsStream(java.lang.String resourceName, java.lang.Class caller)
          Get the specified resource as a stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassUtil

public ClassUtil()
Method Detail

forName

public static java.lang.Class forName(java.lang.String className,
                                      java.lang.Class caller)
                               throws java.lang.ClassNotFoundException
Load the specified class.

Parameters:
className - The name of the class to load.
caller - The class of the caller.
Returns:
The specified class.
Throws:
java.lang.ClassNotFoundException - If the class cannot be found.

getResourceAsStream

public static java.io.InputStream getResourceAsStream(java.lang.String resourceName,
                                                      java.lang.Class caller)
Get the specified resource as a stream.

Parameters:
resourceName - The name of the class to load.
caller - The class of the caller.
Returns:
The input stream for the resource or null if not found.