|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectorg.codenarc.rule.AbstractAstVisitorRule
groovy.org.codenarc.rule.naming.ClassNameRule
class ClassNameRule extends AbstractAstVisitorRule
Rule that verifies that the name of a class matches a regular expression. By default it checks that the class name starts with an uppercase letter and is followed by zero or more word characters (letters, numbers or underscores). Implicit classes (i.e. Groovy scripts) are ignored. This rule applies to all classes, including abstract classes and interfaces.
Theregex
property specifies the regular expression to check the class name against. It is
required and cannot be null or empty. It defaults to '[A-Z]\w*'.
Property Summary | |
---|---|
Class |
astVisitorClass
|
String |
name
|
int |
priority
|
String |
regex
|
Method Summary | |
---|---|
void
|
validate()
|
Property Detail |
---|
Class astVisitorClass
String name
int priority
String regex
Method Detail |
---|
void validate()
Groovy Documentation