List of utility methods to do Reflection Generic Type from Field
List | getGenericTypes(Field field) Get the generic types for the given field ArrayList<Class<?>> generic_classes = new ArrayList<Class<?>>(); Type gtype = field.getGenericType(); if (gtype instanceof ParameterizedType) { ParameterizedType ptype = (ParameterizedType) gtype; getGenericTypesImpl(ptype, generic_classes); return (generic_classes); |