code: public static Type getLastTypeGenericArgument(Type type)
      {
          if (type instanceof ParameterizedType) {
              ParameterizedType pType = (ParameterizedType) type;
              Type[] types = pType.getActualTypeArguments();
              if (types.length > 0) {
                  return types[types.length - 1];
              }
          }
  
          return null;
      }
docs: Extract the last generic type from the passed Type. For example <tt>private List&lt;A, B&gt; field</tt> would
  return the {@code B} class.
  
  @param type the type from which to extract the generic type
  @return the type of the last generic type or null if the field doesn't have a generic type
  @since 4.0M1