public static WildcardType subtypeOf(Type bound) {
    final TypeVariable<?> var = TypeVariableGenerator.freshTypeVariable("B");
    return (WildcardType) new TypeResolver().where(var, bound).resolveType(new WildcardType() {
      @Override public Type[] getUpperBounds() { return new Type[] {var}; }
      @Override public Type[] getLowerBounds() { return new Type[0]; }
    });
  }
public static WildcardType subtypeOf ( Type bound ) { final TypeVariable < ? > var = TypeVariableGenerator . freshTypeVariable ( "B" ) ; return ( WildcardType ) new TypeResolver ( ) . where ( var , bound ) . resolveType ( new WildcardType ( ) { @ Override public Type [ ] getUpperBounds ( ) { return new Type [ ] { var } ; } @ Override public Type [ ] getLowerBounds ( ) { return new Type [ 0 ] ; } } ) ; }
Returns a wildcard type that's subtype of {@code bound}.