org.apache.ws.jaxme.util

Class ClassLoader

public class ClassLoader extends Object

Helper class for working with class loaders.

Version: $Id: ClassLoader.java 231893 2004-07-27 11:19:25Z jochen $

Author: Jochen Wiedmann

Method Summary
static ClassgetClass(String pName)

Loads a class with the given name.

static ClassgetClass(String pName, Class pAssignableTo)

Loads a class with the given name using getClass(String).

Method Detail

getClass

public static Class getClass(String pName)

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.

Throws: ClassNotFoundException Loading the class failed.

getClass

public static Class getClass(String pName, Class pAssignableTo)

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.

Throws: ClassNotFoundException The class with the name pName could not be loaded. IllegalArgumentException Instances of the class with the name pName are not assignable to the interface or class pAssignableTo.