|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.composite.util.ClassUtils
public abstract class ClassUtils
| Constructor Summary | |
|---|---|
ClassUtils()
|
|
| Method Summary | |
|---|---|
static java.lang.Object |
createArray(java.lang.Class componentType,
int length)
Creates a new array with the specified component type and length. |
static java.lang.Class |
getContainedClass(java.lang.Class arrayClass)
Returns the type of object that makes up the given array class (for example, converts Long[] to Long) |
static java.lang.Class[] |
getInterfaces(java.lang.Class clazz)
Return all interfaces implemented by the specified class. |
static java.lang.String |
getUnqualifiedClassName(java.lang.Class clazz)
Returns a class' name without a package prefix. |
static boolean |
isClassPresent(java.lang.String className)
Tests whether the given className can be found by the classloader that loaded this class. |
static boolean |
isJdk14OrHigherPresent()
Indicates whether we are running under JDK 1.4 or higher. |
| 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 java.lang.Class getContainedClass(java.lang.Class arrayClass)
public static boolean isClassPresent(java.lang.String className)
className - the class for which we are searching
true if the class indicated by
className is present or false, otherwisepublic static boolean isJdk14OrHigherPresent()
true if we are running in JDK 1.4 or higher or false otherwise
public static java.lang.Object createArray(java.lang.Class componentType,
int length)
Array.newInstance(java.lang.Class, int).
componentType - the Class object representing the most general
type of object which may be contained in the new arraylength - the length of the new array
java.lang.NullPointerException - if componentType is null
java.lang.IllegalArgumentException - if componentType is Void.TYPE
java.lang.NegativeArraySizeException - if length is negativepublic static java.lang.String getUnqualifiedClassName(java.lang.Class clazz)
ClassUtils.getUnqualifiedClassName(ClassUtils.class) would
return ClassUtils.
clazz - the class whose name we are to return
java.lang.NullPointerException - if clazz is null.public static java.lang.Class[] getInterfaces(java.lang.Class clazz)
clazz - a Class.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||