List of usage examples for java.lang.reflect TypeVariable getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:com.autentia.common.util.ClassWithList.java
private <T> void printInfo(List<T> list) throws SecurityException, NoSuchMethodException { final TypeVariable<?>[] types = list.getClass().getTypeParameters(); for (TypeVariable<?> clazz : types) { print(clazz);/* w ww .j av a 2 s .c o m*/ // ParameterizedType pt = (ParameterizedType)clazz; // log.debug(clazz.getName() + " | " + clazz.getGenericDeclaration().getClass().getName()); // for (TypeVariable<?> type : clazz.getGenericDeclaration().getTypeParameters()) { ParameterizedType pt = (ParameterizedType) type; log.debug(type.getClass().getName()); } // // for (Type type : clazz.getBounds()) { // ParameterizedType pt = (ParameterizedType)type; // print(pt); // log.debug(pt.getOwnerType()); // log.debug(pt.getRawType()); // log.debug(pt.getActualTypeArguments()); // } } }