|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.knowledgeplaza.util.ClassUtil
public class ClassUtil
| Field Summary | |
|---|---|
static String |
SOURCECODE_VERSION
Standard variable for determining version of a class file. |
| Constructor Summary | |
|---|---|
ClassUtil()
|
|
| Method Summary | |
|---|---|
static Class |
convertPrimitiveToObject(Class c)
Converts the primitive type to its corresponding Object type. |
static URL |
determineWhereClassIsLoadedFrom(Class cls)
|
static Class |
forName(String name)
Identical to Class.forName but wraps the ClassNotFoundException in a runtime exception |
static String |
getSimpleName(Class c)
|
static boolean |
objectIsKindOfClass(Object pObject,
Class pClass)
Return true if class of object, or any superclass thereof, is the same as the class argument. |
static boolean |
objectIsMemberOfClass(Object pObject,
Class pClass)
Returns true if the object passed in is an instance of the class passed in. |
static boolean |
objectIsSubclassOfClass(Object pObject,
Class pClass)
Returns true if the object passed in is a subclass of the class passed in. |
static Class |
primitiveNameToClass(String s)
Converts the primitive class name to its corresponding class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SOURCECODE_VERSION
| Constructor Detail |
|---|
public ClassUtil()
| Method Detail |
|---|
public static boolean objectIsSubclassOfClass(Object pObject,
Class pClass)
public static boolean objectIsMemberOfClass(Object pObject,
Class pClass)
public static boolean objectIsKindOfClass(Object pObject,
Class pClass)
public static Class convertPrimitiveToObject(Class c)
Example: passing a int will return Integer.
c - the primitive type
public static Class primitiveNameToClass(String s)
Example: passing a "int" will return int.class.
c - the primitive class name
public static String getSimpleName(Class c)
public static Class forName(String name)
name -
public static URL determineWhereClassIsLoadedFrom(Class cls)
cls -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||