org.sonar.squid.sensors
Class ASTSensor

java.lang.Object
  extended by org.sonar.squid.sensors.ASTSensor
Direct Known Subclasses:
AccessorSensor, BaseCommentsSensor, BlankLineSensor, BranchSensor, ClassSensor, ComplexitySensor, FileSensor, LocSensor, MethodSensor, PackageSensor, StatementSensor

public abstract class ASTSensor
extends java.lang.Object


Constructor Summary
ASTSensor()
           
 
Method Summary
 void addResource(Resource child)
           
protected  void ensureResourceType(Resource resource, Resource.Type type)
           
 boolean equals(java.lang.Object obj)
           
protected  com.puppycrawl.tools.checkstyle.api.DetailAST findParent(com.puppycrawl.tools.checkstyle.api.DetailAST ast, int tokenType)
           
protected  antlr.collections.AST findType(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
           
 com.puppycrawl.tools.checkstyle.api.FileContents getFileContents()
           
protected  com.puppycrawl.tools.checkstyle.api.Scope getScope(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
           
 java.util.List<java.lang.Integer> getWantedTokens()
           
 int hashCode()
           
protected  boolean isClass(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
           
protected  boolean isClassVariable(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
           
protected  boolean isFinal(com.puppycrawl.tools.checkstyle.api.DetailAST detailAst)
           
protected  boolean isInterface(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
           
protected  boolean isInterfaceVariable(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
           
protected  boolean isScope(com.puppycrawl.tools.checkstyle.api.Scope toCompare, com.puppycrawl.tools.checkstyle.api.Scope scope)
           
protected  boolean isStatic(com.puppycrawl.tools.checkstyle.api.DetailAST detailAst)
           
protected  boolean isType(com.puppycrawl.tools.checkstyle.api.DetailAST ast, int type)
           
 void leaveFile(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
           
 void leaveToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
           
 Resource peekResource()
           
 void popResource()
           
 void setFileContents(com.puppycrawl.tools.checkstyle.api.FileContents fileContents)
           
 void setResourcesStack(java.util.Stack<Resource> resourcesStack)
           
 void visitFile(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
           
 void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASTSensor

public ASTSensor()
Method Detail

setFileContents

public final void setFileContents(com.puppycrawl.tools.checkstyle.api.FileContents fileContents)

getFileContents

public final com.puppycrawl.tools.checkstyle.api.FileContents getFileContents()

getWantedTokens

public java.util.List<java.lang.Integer> getWantedTokens()

setResourcesStack

public final void setResourcesStack(java.util.Stack<Resource> resourcesStack)

addResource

public final void addResource(Resource child)

popResource

public final void popResource()

peekResource

public final Resource peekResource()

visitFile

public void visitFile(com.puppycrawl.tools.checkstyle.api.DetailAST ast)

visitToken

public void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)

leaveToken

public void leaveToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)

leaveFile

public void leaveFile(com.puppycrawl.tools.checkstyle.api.DetailAST ast)

findType

protected antlr.collections.AST findType(com.puppycrawl.tools.checkstyle.api.DetailAST ast)

isClassVariable

protected boolean isClassVariable(com.puppycrawl.tools.checkstyle.api.DetailAST ast)

isClass

protected boolean isClass(com.puppycrawl.tools.checkstyle.api.DetailAST ast)

isInterfaceVariable

protected boolean isInterfaceVariable(com.puppycrawl.tools.checkstyle.api.DetailAST ast)

isInterface

protected boolean isInterface(com.puppycrawl.tools.checkstyle.api.DetailAST ast)

isFinal

protected boolean isFinal(com.puppycrawl.tools.checkstyle.api.DetailAST detailAst)

isStatic

protected boolean isStatic(com.puppycrawl.tools.checkstyle.api.DetailAST detailAst)

getScope

protected com.puppycrawl.tools.checkstyle.api.Scope getScope(com.puppycrawl.tools.checkstyle.api.DetailAST ast)

isScope

protected boolean isScope(com.puppycrawl.tools.checkstyle.api.Scope toCompare,
                          com.puppycrawl.tools.checkstyle.api.Scope scope)

isType

protected boolean isType(com.puppycrawl.tools.checkstyle.api.DetailAST ast,
                         int type)

findParent

protected com.puppycrawl.tools.checkstyle.api.DetailAST findParent(com.puppycrawl.tools.checkstyle.api.DetailAST ast,
                                                                   int tokenType)

ensureResourceType

protected void ensureResourceType(Resource resource,
                                  Resource.Type type)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2009 SonarSource SA. All Rights Reserved.