code: public static Type firstGenericTypeArg(final Type pt) {
  	return pt instanceof ParameterizedType ? ((ParameterizedType) pt).getActualTypeArguments()[0] : null;
      }
docs: Gets the first generic type argument for a parameterised type.
  
  @param pt
  Type to take from.
  @return The first generic type argument or null if not a parameterised type.