Annotation Type GlobalStatefulCheck

  • @Retention(RUNTIME)
    public @interface GlobalStatefulCheck
    This annotation means that the check contains global context, which will be updated while Checkstyle processes files. This also means, that all files will be processed by the same check instance. This annotation should be used, if a check accumulates some information during the audit, and processed only once at the end of the audit (however, the check still can produce some messages, while collecting information). The check methods and fields should be thread safe, because they may be accessed from others threads at the same time. Checker guarantees that there will be exactly one check instance This is similar to multi-file validation, which checkstyle does not support fully yet. Please refer to for details.