|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tuscany.sca.binding.ejb.corba.ClassLoadingUtil
public class ClassLoadingUtil
Utility class for loading classes by a variety of name variations.
Supported names types are: 1) Fully qualified class name (e.g., "java.lang.String", "org.apache.geronimo.kernel.ClassLoading" 2) Method signature encoding ("Ljava.lang.String;", "J", "I", etc.) 3) Primitive type names ("int", "boolean", etc.) 4) Method array signature strings ("[I", "[Ljava.lang.String") 5) Arrays using Java code format ("int[]", "java.lang.String[][]") The classes are loaded using the provided class loader. For the basic types, the primitive reflection types are returned.
Constructor Summary | |
---|---|
ClassLoadingUtil()
|
Method Summary | |
---|---|
static java.util.Set |
getAllTypes(java.lang.Class type)
|
static java.lang.String |
getClassName(java.lang.Class type)
Map a class object back to a class name. |
static java.lang.Class |
loadClass(java.lang.String className,
java.lang.ClassLoader classLoader)
Load a class that matches the requested name, using the provided class loader context. |
static java.lang.Class[] |
reduceInterfaces(java.lang.Class[] source)
If there are multiple interfaces, and some of them extend each other, eliminate the superclass in favor of the subclasses that extend them. |
static java.util.Set |
reduceInterfaces(java.util.Set source)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassLoadingUtil()
Method Detail |
---|
public static java.lang.Class loadClass(java.lang.String className, java.lang.ClassLoader classLoader) throws java.lang.ClassNotFoundException
className
- The name of the required class.classLoader
- The class loader used to resolve the class object.
java.lang.ClassNotFoundException
- When unable to resolve the class object.
java.lang.IllegalArgumentException
- If either argument is null.public static java.lang.String getClassName(java.lang.Class type)
type
- The class object we convert into name form.
public static java.util.Set getAllTypes(java.lang.Class type)
public static java.util.Set reduceInterfaces(java.util.Set source)
public static java.lang.Class[] reduceInterfaces(java.lang.Class[] source)
source
- the original list of interfaces
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |