Java Reference
In-Depth Information
These other named interfaces are the
direct superinterfaces
of the interface being declared.
Any class that
implements
the declared interface is also considered to implement all the in-
terfaces that this interface
extends
.
ExtendsInterfaces:
extends
InterfaceTypeList
InterfaceTypeList:
InterfaceType
InterfaceTypeList
,
InterfaceType
InterfaceType:
TypeDeclSpecifier TypeArguments
opt
Given a (possibly generic) interface declaration for
I
<
F
1
,...,
F
n
>
(
n
≥ 0), the
direct super-
interfaces
of the interface type
I
<
F
1
,...,
F
n
>
are the types given in the
extends
clause of the
declaration of
I
if an
extends
clause is present.
Let
I
<
F
1
,...,
F
n
>
(
n
> 0), be a generic interface declaration. The direct superinterfaces of the
parameterized interface type
I
<
T
1
,...,
T
n
>
, where
T
i
(1 ≤
i
≤
n
) is a type, are all types
J
<
U
1
θ,...,
U
k
θ
>
, where
J
<
U
1
,...,
U
k
>
is a direct superinterface of
I
<
F
1
,...,
F
n
>
, and θ is the substi-
tution
[
F
1
:=
T
1
,...,
F
n
:=
T
n
]
.
Each
InterfaceType
in the
extends
clause of an interface declaration must name an accessible
The
superinterface
relationship is the transitive closure of the direct superinterface rela-
tionship. An interface
K
is a superinterface of interface
I
if either of the following is true:
•
K
is a direct superinterface of
I
.
• There exists an interface
J
such that
K
is a superinterface of
J
, and
J
is a superint-
erface of
I
, applying this definition recursively.
Interface
I
is said to be a
subinterface
of interface
K
whenever
K
is a superinterface of
I
.
While every class is an extension of class
Object
, there is no single interface of which all
interfaces are extensions.
An interface
I directly depends
on a type
T
if
T
is mentioned in the
extends
clause of
I
either
as a superinterface or as a qualifier within a superinterface name.