Java Reference
In-Depth Information
An interface I depends on a reference type T if any of the following conditions hold:
I directly depends on T .
I directly depends on a class C that depends (§ 8.1.5 ) on T .
I directly depends on an interface J that depends on T (using this definition recurs-
ively).
It is a compile-time error if an interface depends on itself.
If circularly declared interfaces are detected at run time, as interfaces are loaded (§ 12.2 ) ,
then a ClassCircularityError is thrown.
9.1.4. Interface Body and Member Declarations
The body of an interface may declare members of the interface, that is, fields (§ 9.3 ) , meth-
ods (§ 9.4 ), classes (§ 9.5 ) , and interfaces (§ 9.5 ) .
InterfaceBody:
{ InterfaceMemberDeclarations opt }
InterfaceMemberDeclarations:
InterfaceMemberDeclaration
InterfaceMemberDeclarations InterfaceMemberDeclaration
InterfaceMemberDeclaration:
ConstantDeclaration
AbstractMethodDeclaration
ClassDeclaration
InterfaceDeclaration
;
The scope of a declaration of a member m declared in or inherited by an interface type I is
specified in § 6.3 .
9.2. Interface Members
The members of an interface are:
• Those members declared in the interface.
• Those members inherited from direct superinterfaces.
• If an interface has no direct superinterfaces, then the interface implicitly declares a
public abstract member method m with signature s , return type r , and throws clause t
corresponding to each public instance method m with signature s , return type r , and
Search WWH ::




Custom Search