Java Reference
In-Depth Information
InterfaceDeclaration:
NormalInterfaceDeclaration
AnnotationTypeDeclaration
NormalInterfaceDeclaration:
InterfaceModifiers opt interface Identifier
TypeParameters opt ExtendsInterfaces opt InterfaceBody
The Identifier in an interface declaration specifies the name of the interface.
It is a compile-time error if an interface has the same simple name as any of its enclosing
classes or interfaces.
The scope and shadowing of an interface declaration is specified in § 6.3 and § 6.4 .
9.1.1. Interface Modifiers
An interface declaration may include interface modifiers .
InterfaceModifiers:
InterfaceModifier
InterfaceModifiers InterfaceModifier
InterfaceModifier: one of
Annotation public protected private
abstract static strictfp
If an annotation a 9.7 ) on an interface declaration corresponds to an annotation type T
9.6 ) , and T has a (meta-)annotation m that corresponds to java.lang.annotation.Target , then m
must have an element whose value is java.lang.annotation.ElementType.TYPE , or a compile-time
error occurs.
The access modifier public 6.6 ) pertains to every kind of interface declaration.
The access modifiers protected and private pertain only to member interfaces within a directly
enclosing class or enum declaration (§ 8.5.1 ) .
The modifier static pertains only to member interfaces (§ 8.5.1 , § 9.5 ), not to top level inter-
faces (§ 7.6 ).
It is a compile-time error if the same modifier appears more than once in an interface de-
claration.
Search WWH ::




Custom Search