Class PackageAnnotationCheck

  • All Implemented Interfaces:
    Configurable, Contextualizable

    public class PackageAnnotationCheck
    extends AbstractCheck

    Checks that all package annotations are in the file.

    For Java SE8 and above, placement of package annotations in the file is enforced by the compiler and this check is not necessary.

    For Java SE7 and below, the Java Language Specification highly recommends but doesn't require that annotations are placed in the file, and this check can help to enforce that placement.

    See Java Language Specification, §7.4.1 for more info.

    Parent is

    Violation Message Keys:

    • annotation.package.location