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.
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
must have an element whose value is
java.lang.annotation.ElementType.TYPE
, or a compile-time
error occurs.
The access modifiers
protected
and
private
pertain only to member interfaces within a directly
faces (§
7.6
).
It is a compile-time error if the same modifier appears more than once in an interface de-
claration.