public class IllegalClassMemberRule extends AbstractAstVisitorRule implements groovy.lang.GroovyObject
Modifier and Type | Field and Description |
---|---|
protected Collection<Integer> |
allowedFieldModifiersList |
protected String |
allowedFieldModifiersString |
protected Collection<Integer> |
allowedMethodModifiersList |
protected String |
allowedMethodModifiersString |
protected Collection<Integer> |
allowedPropertyModifiersList |
protected String |
allowedPropertyModifiersString |
protected Collection<Integer> |
illegalFieldModifiersList |
protected String |
illegalFieldModifiersString |
protected Collection<Integer> |
illegalMethodModifiersList |
protected String |
illegalMethodModifiersString |
protected Collection<Integer> |
illegalPropertyModifiersList |
protected String |
illegalPropertyModifiersString |
CLOSURE_TEXT, DEFAULT_CONST_NAME, DEFAULT_FIELD_NAME, DEFAULT_TEST_CLASS_NAMES, DEFAULT_TEST_FILES, DEFAULT_VAR_NAME
Constructor and Description |
---|
IllegalClassMemberRule() |
Modifier and Type | Method and Description |
---|---|
Class |
getAstVisitorClass()
Each concrete subclass must either set this property or define its own property with the same name
|
String |
getIgnoreMethodNames() |
String |
getIgnoreMethodsWithAnnotationNames() |
groovy.lang.MetaClass |
getMetaClass() |
String |
getName() |
int |
getPriority() |
Object |
getProperty(String property) |
Object |
invokeMethod(String method,
Object arguments) |
boolean |
isReady()
Allows rules to check whether preconditions are satisfied and short-circuit execution
(i.e., do nothing) if those preconditions are not satisfied.
|
void |
setAllowedFieldModifiers(String allowedFieldModifiers) |
void |
setAllowedMethodModifiers(String allowedMethodModifiers) |
void |
setAllowedPropertyModifiers(String allowedPropertyModifiers) |
void |
setAstVisitorClass(Class value) |
void |
setIgnoreMethodNames(String value) |
void |
setIgnoreMethodsWithAnnotationNames(String value) |
void |
setIllegalFieldModifiers(String illegalFieldModifiers) |
void |
setIllegalMethodModifiers(String illegalMethodModifiers) |
void |
setIllegalPropertyModifiers(String illegalPropertyModifiers) |
void |
setMetaClass(groovy.lang.MetaClass mc) |
void |
setName(String value)
Set the unique name for this rule
|
void |
setPriority(int value)
Set the priority for this rule
|
void |
setProperty(String property,
Object value) |
applyTo, getApplyToClassNames, getAstVisitor, getDoNotApplyToClassNames, setApplyToClassNames, setDoNotApplyToClassNames, shouldApplyThisRuleTo
applyTo, createViolation, createViolation, createViolation, createViolation, createViolation, createViolationForImport, createViolationForImport, createViolationForImport, getApplyToFileNames, getApplyToFilesMatching, getCompilerPhase, getDescription, getDoNotApplyToFileNames, getDoNotApplyToFilesMatching, getViolationMessage, isEnabled, setApplyToFileNames, setApplyToFilesMatching, setDescription, setDoNotApplyToFileNames, setDoNotApplyToFilesMatching, setEnabled, setViolationMessage, toString, validate
protected Collection<Integer> illegalFieldModifiersList
protected String illegalFieldModifiersString
protected Collection<Integer> allowedFieldModifiersList
protected String allowedFieldModifiersString
protected Collection<Integer> illegalPropertyModifiersList
protected String illegalPropertyModifiersString
protected Collection<Integer> allowedPropertyModifiersList
protected String allowedPropertyModifiersString
protected Collection<Integer> illegalMethodModifiersList
protected String illegalMethodModifiersString
protected Collection<Integer> allowedMethodModifiersList
protected String allowedMethodModifiersString
public groovy.lang.MetaClass getMetaClass()
getMetaClass
in interface groovy.lang.GroovyObject
public void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass
in interface groovy.lang.GroovyObject
public Object invokeMethod(String method, Object arguments)
invokeMethod
in interface groovy.lang.GroovyObject
public Object getProperty(String property)
getProperty
in interface groovy.lang.GroovyObject
public void setProperty(String property, Object value)
setProperty
in interface groovy.lang.GroovyObject
public String getName()
getName
in interface Rule
getName
in class AbstractRule
public void setName(String value)
AbstractRule
setName
in class AbstractRule
value
- - the name for this rule; this should be uniquepublic int getPriority()
getPriority
in interface Rule
getPriority
in class AbstractRule
public void setPriority(int value)
AbstractRule
setPriority
in class AbstractRule
value
- - the priority of this rule, between 1 (highest priority) and 3 (lowest priority), inclusive.public Class getAstVisitorClass()
AbstractAstVisitorRule
getAstVisitorClass
in class AbstractAstVisitorRule
public void setAstVisitorClass(Class value)
public String getIgnoreMethodNames()
public void setIgnoreMethodNames(String value)
public String getIgnoreMethodsWithAnnotationNames()
public void setIgnoreMethodsWithAnnotationNames(String value)
public void setIllegalFieldModifiers(String illegalFieldModifiers)
public void setAllowedFieldModifiers(String allowedFieldModifiers)
public void setIllegalPropertyModifiers(String illegalPropertyModifiers)
public void setAllowedPropertyModifiers(String allowedPropertyModifiers)
public void setIllegalMethodModifiers(String illegalMethodModifiers)
public void setAllowedMethodModifiers(String allowedMethodModifiers)
public boolean isReady()
AbstractRule
isReady
in class AbstractRule
Copyright © 2022. All rights reserved.