Java Reference
In-Depth Information
long > 1 int
int > 1 char
int > 1 short
short > 1 byte
4.10.2. Subtyping among Class and Interface Types
Given a generic type declaration C < F 1 ,..., F n > , the direct supertypes of the parameterized
type C < T 1 ,..., T n > are all of the following:
• The direct superclasses of C .
• The direct superinterfaces of C .
• The type Object , if C is an interface type with no direct superinterfaces.
• The raw type C .
The direct supertypes of the parameterized type C < T 1 ,..., T n > , where T i (1 ≤ i n ) is a type,
are all of the following:
D < U 1 θ,..., U k θ > , where D < U 1 ,..., U k > is a direct supertype of C < T 1 ,..., T n > and θ is
the substitution [ F 1 := T 1 ,..., F n := T n ] .
C < S 1 ,..., S n > , where S i contains T i (1 ≤ i n ) (§ 4.5.1 ).
The direct supertypes of the parameterized type C < R 1 ,..., R n > , where at least one of the R i (1
i n ) is a wildcard type argument, are the direct supertypes of C < X 1 ,..., X n > which is the
result of applying capture conversion (§ 5.1.10 ) to C < R 1 ,..., R n > .
The direct supertypes of an intersection type T 1 & ... & T n are T i (1 ≤ i n ).
The direct supertypes of a type variable are the types listed in its bound.
A type variable is a direct supertype of its lower bound.
The direct supertypes of the null type are all reference types other than the null type itself.
4.10.3. Subtyping among Array Types
The following rules define the direct supertype relation among array types:
• If S and T are both reference types, then S [] > 1 T [] iff S > 1 T .
Object > 1 Object[]
Cloneable > 1 Object[]
Search WWH ::




Custom Search