code: public static List<Class<?>> getParameterizedType(final Field field) {
          Type type = field.getGenericType();
  
          if (!ParameterizedType.class.isAssignableFrom(type.getClass())) {
  
              // the field is it a raw type and does not have generic type
              // argument. Return empty list.
              return new ArrayList<Class<?>>();
          }
  
          ParameterizedType ptype = (ParameterizedType) type;
          Type[] targs = ptype.getActualTypeArguments();
          List<Class<?>> classes = new ArrayList<Class<?>>();
          for (Type aType : targs) {
  
              if (Class.class.isAssignableFrom(aType.getClass())) {
                  classes.add((Class<?>) aType);
              } else if (WildcardType.class.isAssignableFrom(aType.getClass())) {
                  // wild cards are not handled by this method
              } else if (TypeVariable.class.isAssignableFrom(aType.getClass())) {
                  // type variables are not handled by this method
              }
          }
          return classes;
      }
docs: Returns the parameterized type of a field, if exists. Wild cards, type
  variables and raw types will be returned as an empty list.
  <p>
  If a field is of type Set<String> then java.lang.String is returned.
  </p>
  <p>
  If a field is of type Map<String, Integer> then [java.lang.String,
  java.lang.Integer] is returned.
  </p>
  
  @param field
  @return A list of classes of the parameterized type.