| java.lang.Object org.apache.geronimo.corba.util.ClassLoading
ClassLoading | public class ClassLoading (Code) | | 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.corba.util.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.
version: $Rev: 450758 $ |
Method Summary | |
public static String | getClassName(Class type) Map a class object back to a class name. | public static Class | loadClass(String className, ClassLoader classLoader) Load a class that matches the requested name, using the provided class loader context.
The class name may be a standard class name, the name of a primitive type Java
reflection class (e.g., "boolean" or "int"), or a type in method type signature
encoding. |
getClassName | public static String getClassName(Class type)(Code) | | Map a class object back to a class name. The returned class object
must be "round trippable", which means
type == ClassLoading.loadClass(ClassLoading.getClassName(type), classLoader)
must be true. To ensure this, the class name is always returned in
method signature format.
Parameters: type - The class object we convert into name form. A string representation of the class name, in method signatureformat. |
loadClass | public static Class loadClass(String className, ClassLoader classLoader) throws ClassNotFoundException(Code) | | Load a class that matches the requested name, using the provided class loader context.
The class name may be a standard class name, the name of a primitive type Java
reflection class (e.g., "boolean" or "int"), or a type in method type signature
encoding. Array classes in either encoding form are also processed.
Parameters: className - The name of the required class. Parameters: classLoader - The class loader used to resolve the class object. The Class object resolved from "className". throws: ClassNotFoundException - When unable to resolve the class object. throws: IllegalArgumentException - If either argument is null. |
|
|