code: public static Class<?> getGenericClass(Field collectionField)
      {
          Class<?> genericClass = null;
          if (collectionField == null)
          {
              return genericClass;
          }
          if (isCollection(collectionField.getType()))
          {
              Type[] parameters = ReflectUtils.getTypeArguments(collectionField);
              if (parameters != null)
              {
                  if (parameters.length == 1)
                  {
                      genericClass = toClass(parameters[0]);
                  }
                  else
                  {
                      throw new PropertyAccessException(
                              "Can't determine generic class from a field that has more than one parameters.");
                  }
              }
          }
          if (collectionField.getType().isAssignableFrom(Map.class))
          {
              java.lang.reflect.Type[] arguments = ((ParameterizedType) collectionField.getGenericType())
                      .getActualTypeArguments();
              if (arguments != null && arguments.length > 1)
              {
                  genericClass = getTypedClass(arguments[1]);
              }
          }
          return genericClass != null ? genericClass : collectionField.getType();
      }
docs: Retrieves Generic class from a collection field that has only one
  argument.
  
  @param collectionField
  the collection field
  @return the generic class