Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.thermidor.util
Class ClassUtil  view ClassUtil download ClassUtil.java

java.lang.Object
  extended bycom.thermidor.util.ClassUtil

public class ClassUtil
extends java.lang.Object

The purpose of the ClassUtil class is to provide utility operations for the management of class types. The lookup operation allows the the classes of primitives and array types to be retrieved in the same manners as normal java classes. The semantics of the lookup operation are similar to those of Class.forName().

class namedescription
intmaps to Integer.TYPE
shortmaps to Short.TYPE
bytemaps to Byte.TYPE
charmaps to Character.TYPE
longmaps to Long.TYPE
floatmaps to Float.TYPE
doublemaps to double.TYPE
booleanmaps to Boolean.TYPE
ClassNameAny fully qualified class name
'['+(ClassName|int|short|byte|char|long|float|double|boolean) maps to the class of an array of any type, primitive or Class all array class names should begin with the '[' character and the number of consequetive '[' indicates the cardinality of the array


Field Summary
private static java.util.Hashtable map
          The map attribute maintains the mapping between primitive names and thier classes.
 
Constructor Summary
ClassUtil()
           
 
Method Summary
private static java.lang.Class internalLookup(java.lang.String name)
          Lookup the class of either a primitive of normal java class.
static boolean isSuperClass(java.lang.Class root, java.lang.Class sub)
          Is the 'root' class really a super class or super interface of 'sub'
static java.lang.Class lookup(java.lang.String name)
          Lookup the class for a standard java class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

private static java.util.Hashtable map
The map attribute maintains the mapping between primitive names and thier classes.

Constructor Detail

ClassUtil

public ClassUtil()
Method Detail

internalLookup

private static java.lang.Class internalLookup(java.lang.String name)
                                       throws java.lang.ClassNotFoundException
Lookup the class of either a primitive of normal java class.


lookup

public static java.lang.Class lookup(java.lang.String name)
                              throws java.lang.ClassNotFoundException
Lookup the class for a standard java class. primitive or array by name.


isSuperClass

public static boolean isSuperClass(java.lang.Class root,
                                   java.lang.Class sub)
Is the 'root' class really a super class or super interface of 'sub'