JVM Specification 4
4.1 The Classfile Structure
http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.1
Table 4.1. Class access and property modifiers (abbreviated)
ACC_PUBLICACC_FINALACC_SUPERACC_INTERFACEACC_ABSTRACTACC_SYNTHETICACC_ANNOTATIONACC_ENUM
…
If the ACC_INTERFACE flag of this class file is set, its ACC_ABSTRACT flag
must also be set (JLS §9.1.1.1). Such a class file must not have its
ACC_FINAL, ACC_SUPER or ACC_ENUM flags set.
An annotation type must have its ACC_ANNOTATION flag set. If the
ACC_ANNOTATION flag is set, the ACC_INTERFACE flag must be set as well. If
the ACC_INTERFACE flag of this class file is not set, it may have any of the
other flags in Table 4.1 set, except the ACC_ANNOTATION flag. However, such a
class file cannot have both its ACC_FINAL and ACC_ABSTRACT flags set
(JLS §8.1.1.2).
…
-
ACC_ANNOTATION->ACC_INTERFACE -
"If the
ACC_INTERFACEflag of this class file is not set…" Which class?-
The one with
ACC_ANNOTATION-> See rule 1. -
Some arbitrary class -> "may have any … other flags … set, except the
ACC_ANNOTATION… However, … cannot have both itsACC_FINALandACC_ABSTRACTflags set"
-
Contradiction?