java.lang.Object
com.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 name | description |
| int | maps to Integer.TYPE |
| short | maps to Short.TYPE |
| byte | maps to Byte.TYPE |
| char | maps to Character.TYPE |
| long | maps to Long.TYPE |
| float | maps to Float.TYPE |
| double | maps to double.TYPE |
| boolean | maps to Boolean.TYPE |
| ClassName | Any 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
map
private static java.util.Hashtable map
- The map attribute maintains the mapping between primitive names and
thier classes.
ClassUtil
public ClassUtil()
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'