groovy.lang.GroovyObject
, Rule
public class IndentationRule extends AbstractAstVisitorRule implements groovy.lang.GroovyObject
Modifier and Type | Field | Description |
---|---|---|
protected Map<SourceCode,Map<org.codehaus.groovy.ast.ClassNode,Integer>> |
classNodeIndentLevels |
CLOSURE_TEXT, DEFAULT_CONST_NAME, DEFAULT_FIELD_NAME, DEFAULT_TEST_CLASS_NAMES, DEFAULT_TEST_FILES, DEFAULT_VAR_NAME
Constructor | Description |
---|---|
IndentationRule() |
Modifier and Type | Method | Description |
---|---|---|
void |
applyTo(SourceCode sourceCode,
List<Violation> violations) |
Apply this rule to the specified source and return a list of violations (or an empty List)
|
Class |
getAstVisitorClass() |
Each concrete subclass must either set this property or define its own property with the same name
|
groovy.lang.MetaClass |
getMetaClass() |
|
String |
getName() |
|
int |
getPriority() |
|
Object |
getProperty(String property) |
|
int |
getSpacesPerIndentLevel() |
|
Object |
invokeMethod(String method,
Object arguments) |
|
void |
setAstVisitorClass(Class value) |
|
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) |
|
void |
setSpacesPerIndentLevel(int value) |
getApplyToClassNames, getAstVisitor, getDoNotApplyToClassNames, setApplyToClassNames, setDoNotApplyToClassNames, shouldApplyThisRuleTo
applyTo, createViolation, createViolation, createViolationForImport, createViolationForImport, getApplyToFileNames, getApplyToFilesMatching, getCompilerPhase, getDescription, getDoNotApplyToFileNames, getDoNotApplyToFilesMatching, getViolationMessage, isEnabled, isReady, setApplyToFileNames, setApplyToFilesMatching, setDescription, setDoNotApplyToFileNames, setDoNotApplyToFilesMatching, setEnabled, setViolationMessage, toString, validate
protected final Map<SourceCode,Map<org.codehaus.groovy.ast.ClassNode,Integer>> classNodeIndentLevels
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 int getSpacesPerIndentLevel()
public void setSpacesPerIndentLevel(int value)
public void applyTo(SourceCode sourceCode, List<Violation> violations)
AbstractRule
applyTo
in class AbstractAstVisitorRule
sourceCode
- - the source to apply this rule toviolations
- - the List of violations to which new violations from this rule are to be addedCopyright © 2019. All rights reserved.