public static <T> T newInstance(Class<T> theClass) {
    try {
      return theClass.newInstance();
    } catch (InstantiationException|IllegalAccessException e) {
      throw new RuntimeException("Unable to instantiate " + theClass.getName(), e);
    }
  }
Create an object of the given class using a no-args constructor
@param theClass class to return new object of
@param <T> the type of the class to be returned
@return an object of the requested type
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/JavaUtils.java