In the Java Language Specification, version 11, section 4.10.2, it reads, in part, while discussing direct supertypes of parameterized types:
Given a generic type declaration C<F₁,…,Fₙ> (n > 0), the direct supertypes of the parameterized type C<T₁,…,Tₙ>, where Tᵢ (1 ≤ i ≤ n) is a type, are all of the following:
(Then it lists a bunch of rules that apply to such parameterized types. These rules are mostly irrelevant for this question. They are relevant only in that they define direct supertypes for some cases of parameterized types.)
What "is a type" means can be found at the top of section 4.1:
There are two kinds of types in the Java programming language: primitive types (§4.2) and reference types (§4.3).
A reference type (we're not talking about primitives here, that's for sure) is simply a ClassOrInterfaceType
, a TypeVariable
or an ArrayType
.
Therefore a wildcard is not a kind of type.
(It is, in fact, a kind of TypeArgument
. You might think hazily and naïvely as I once did that a wildcard is a wonky kind of TypeVariable
, and hence a type, but you would be incorrect.)
So putting all this together, my reading of the relevant part of section 4.10.2 is:
Is this a correct reading? In other words, is my deductive reasoning correct?
(It is perhaps worth noting in passing that there are types that can "contain" a parameterized type containing wildcards (as defined in section 4.5.1).)
The part you quoted indeed doesn't say anything about parameterised types with at least one wildcard type argument. What their direct super types are is specified just after the part you quoted:
Given a generic type declaration C<F1,...,Fn> (n > 0), the direct supertypes of the parameterized type C<R1,...,Rn> where at least one of the Ri (1 ≤ i ≤ n) is a wildcard type argument, are the direct supertypes of the parameterized type C<X1,...,Xn> which is the result of applying capture conversion to C<R1,...,Rn> (§5.1.10).
Basically, to find the direct super types of a type with at least one wildcard type argument, you first apply capture conversion, and then you will get a parameterised type that only "types" as the type parameters, as capture conversion converts the wildcards to type variables. After that, you can use the rule that you quoted to find its super types.