core/src/com/google/inject/TypeLiteral.java
public TypeLiteral<?> getSupertype(Class<?> supertype) {
    checkArgument(
        supertype.isAssignableFrom(rawType), "%s is not a supertype of %s", supertype, this.type);
    return resolve(MoreTypes.getGenericSupertype(type, rawType, supertype));
  }
public TypeLiteral<?> getSupertype(Class<?> supertype) {
    checkArgument(
        supertype.isAssignableFrom(rawType), "%s is not a supertype of %s", supertype, this.type);
    return resolve(MoreTypes.getGenericSupertype(type, rawType, supertype));
  }
Returns the generic form of {@code supertype}. For example, if this is {@code
ArrayList<String>}, this returns {@code Iterable<String>} given the input {@code
Iterable.class}.

@param supertype a superclass of, or interface implemented by, this.
@since 2.0