org.apache.ws.jaxme.util

Class ClassLoader


public class ClassLoader
extends java.lang.Object

Helper class for working with class loaders.
Version:
$Id: ClassLoader.java 231893 2004-07-27 13:19:25 +0200 (Tue, 27 Jul 2004) jochen $
Author:
Jochen Wiedmann

Method Summary

static Class
getClass(String pName)
Loads a class with the given name.
static Class
getClass(String pName, Class pAssignableTo)
Loads a class with the given name using getClass(String).

Method Details

getClass

public static Class getClass(String pName)
            throws ClassNotFoundException
Loads a class with the given name. First attempts to use the context class loader, then its own class loader.
Parameters:
pName - The fully qualified name of the class being loaded.
Returns:
The class with the name pName.

getClass

public static Class getClass(String pName,
                             Class pAssignableTo)
            throws ClassNotFoundException
Loads a class with the given name using getClass(String). If an instance of the returned class cannot be assigned to the class or interface pAssignableTo, throws an IllegalArgumentException.