@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); } }
@SuppressWarnings("unchecked") private Class<T> getNodeClass() { return (Class<T>) GenericsUtils.getSuperClassGenericType(this.getClass(), 0); }