示例#1
0
 /**
  * ** Create a new instance of the specified class name ** @param className The class name to
  * instantiate ** @return The new instance of the specified class name
  */
 public static Object newInstance(String className)
     throws NoSuchMethodException, ClassNotFoundException, InstantiationException,
         IllegalAccessException {
   if (!StringTools.isBlank(className)) {
     // try {
     return Class.forName(className).newInstance();
     // } catch (InvocationTargetException ite) {
     //    Throwable th = ite.getCause();
     //    if (th == null) { th = ite; }
     //    throw th;
     // }
   } else {
     throw new ClassNotFoundException("Class name is null/blank");
   }
 }
示例#2
0
 /**
  * ** Returns true if this key name contains an empty String ** @return True if this key name
  * contains an empty String
  */
 public boolean isBlank() {
   return StringTools.isBlank(this.keyName);
 }