|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tc.util.ClassUtils
public class ClassUtils
Class utility methods
Nested Class Summary | |
---|---|
static interface |
ClassUtils.ClassSpec
Holder for a class name and field name which together fully identify a field |
Constructor Summary | |
---|---|
ClassUtils()
|
Method Summary | |
---|---|
static int |
arrayDimensions(java.lang.Class arrayClass)
Get the dimension of an array |
static java.lang.Class |
baseComponentType(java.lang.Class c)
If c is an array, return the reifiable type of the array element |
static boolean |
isDsoEnum(java.lang.Class c)
Determine whether the class is an enum as far as DSO is concerned |
static boolean |
isPortableReflectionClass(java.lang.Class c)
Check whether c is a portable java reflection class like Method, Constructor, or Field |
static boolean |
isPrimitiveArray(java.lang.Object test)
Determine whether test is a primitive array |
static ClassUtils.ClassSpec |
parseFullyQualifiedFieldName(java.lang.String fieldName)
Convert fully-qualified field name like "mypackage.MyClass.myField" into a specification which contains the fully-qualified class name and the field name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassUtils()
Method Detail |
---|
public static ClassUtils.ClassSpec parseFullyQualifiedFieldName(java.lang.String fieldName) throws java.text.ParseException
fieldName
- Fully-qualified field name
java.text.ParseException
- If the fieldName is not properly formattedpublic static int arrayDimensions(java.lang.Class arrayClass)
arrayClass
- The array class
java.lang.NullPointerException
- If arrayClass is null
java.lang.IllegalArgumentException
- If arrayClass is not an array classpublic static java.lang.Class baseComponentType(java.lang.Class c)
c
- Array class
java.lang.NullPointerException
- If arrayClass is null
java.lang.IllegalArgumentException
- If arrayClass is not an array classpublic static boolean isPrimitiveArray(java.lang.Object test)
test
- The object
public static boolean isDsoEnum(java.lang.Class c)
c
- Class
public static boolean isPortableReflectionClass(java.lang.Class c)
c
- Class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |