Groovy Documentation

org.codenarc.rule
[Groovy] Interface AstVisitor


interface AstVisitor
extends org.codehaus.groovy.ast.GroovyClassVisitor

Interface for Groovy AST Visitors used with Rules

Authors:
Chris Mair
Version:
\$Revision: 601 \$ - \$Date: 2011-02-08 15:33:54 -0500 (Tue, 08 Feb 2011) \$


Method Summary
List getViolations()

Retrieve the List of Violations resulting from applying this visitor

void setRule(Rule rule)

Set the Rule associated with this visitor

void setSourceCode(SourceCode sourceCode)

Set the SourceCode associated with this visitor

 
Methods inherited from interface org.codehaus.groovy.ast.GroovyClassVisitor
org.codehaus.groovy.ast.GroovyClassVisitor#visitProperty(org.codehaus.groovy.ast.PropertyNode), org.codehaus.groovy.ast.GroovyClassVisitor#visitField(org.codehaus.groovy.ast.FieldNode), org.codehaus.groovy.ast.GroovyClassVisitor#visitConstructor(org.codehaus.groovy.ast.ConstructorNode), org.codehaus.groovy.ast.GroovyClassVisitor#visitMethod(org.codehaus.groovy.ast.MethodNode), org.codehaus.groovy.ast.GroovyClassVisitor#visitClass(org.codehaus.groovy.ast.ClassNode)
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Method Detail

getViolations

List getViolations()
Retrieve the List of Violations resulting from applying this visitor
Returns:
the List of Violations; may be empty


setRule

void setRule(Rule rule)
Set the Rule associated with this visitor
Parameters:
rule - - the Rule


setSourceCode

void setSourceCode(SourceCode sourceCode)
Set the SourceCode associated with this visitor
Parameters:
sourceCode - - the SourceCode


 

Groovy Documentation