コード例 #1
0
 @SuppressWarnings("unchecked")
 private App getApplication() {
   try {
     return ((Class<App>) GenericsUtils.getSuperClassGenericType(this.getClass(), 1))
         .newInstance();
   } catch (InstantiationException e) {
     throw new RuntimeException(e);
   } catch (IllegalAccessException e) {
     throw new RuntimeException(e);
   }
 }
コード例 #2
0
 @SuppressWarnings("unchecked")
 private Class<T> getNodeClass() {
   return (Class<T>) GenericsUtils.getSuperClassGenericType(this.getClass(), 0);
 }