|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.util.ClassUtil
public final class ClassUtil
Utility methods for classes.
Method Summary | |
---|---|
static java.lang.Class |
classForName(java.lang.String className)
Deprecated. since 4.3 - use Classes.getClassFactory() . |
static boolean |
isSubClass(java.lang.Class<?> subClass,
java.lang.Class<?> parentClass)
Deprecated. since 4.3, use parentClass.isAssignableFrom(subClass) |
static java.lang.Object |
newInstance(java.lang.String className)
Deprecated. since 4.3 - use Classes.getClassFactory() .
Shortcut for ClassUtil.classForName(className).newInstance() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.Class classForName(java.lang.String className) throws java.lang.ClassNotFoundException
Classes.getClassFactory()
.
className
- class name
java.lang.ClassNotFoundException
- if the given class can't be loaded by both classloaders.public static java.lang.Object newInstance(java.lang.String className) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException
Classes.getClassFactory()
.
Shortcut for ClassUtil.classForName(className).newInstance()
className
- class name
java.lang.InstantiationException
- exception thrown by newInstance()
java.lang.IllegalAccessException
- exception thrown by newInstance()
java.lang.ClassNotFoundException
- if the given class can't be loaded by both classloaderspublic static boolean isSubClass(java.lang.Class<?> subClass, java.lang.Class<?> parentClass)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |