Class StaticVariableNameCheck

  • All Implemented Interfaces:
    Configurable, Contextualizable

    public class StaticVariableNameCheck
    extends AbstractAccessControlNameCheck

    Checks that static, non-final variable names conform to a specified pattern.

    • Property applyToPackage - Control if check should apply to package-private members. Type is boolean. Default value is true.
    • Property applyToPrivate - Control if check should apply to private members. Type is boolean. Default value is true.
    • Property applyToProtected - Control if check should apply to protected members. Type is boolean. Default value is true.
    • Property applyToPublic - Control if check should apply to public members. Type is boolean. Default value is true.
    • Property format - Sets the pattern to match valid identifiers. Type is java.util.regex.Pattern. Default value is "^[a-z][a-zA-Z0-9]*$".

    Parent is com.puppycrawl.tools.checkstyle.TreeWalker

    Violation Message Keys:

    • name.invalidPattern
    Since:
    3.0