List of utility methods to do Class forName
Class | forNameNoException(String className) for Name No Exception return forNameNoException(className, Thread.currentThread().getContextClassLoader());
|
Class> | forNameOrNull(String className) for Name Or Null try { return Class.forName(className); } catch (ClassNotFoundException e) { return null; |
Class[] | forNames(String[] classNames) Returns the Class object array associated with the class or interface with the given string name array. int size = (classNames == null ? 0 : classNames.length); Class[] classes = new Class[size]; for (int i = 0; i < classes.length; i++) { classes[i] = Class.forName(classNames[i]); return classes; |