code: private static <T> TypeReference<T> typeReferenceFrom(final Type type) {
          return new TypeReference<T>() {
              @Override
              public Type getType() {
                  return type;
              }
          };
      }
docs: Internal method for creating a TypeReference from a Java Type.