checkers.types
Class VisitorState

java.lang.Object
  extended by checkers.types.VisitorState

public class VisitorState
extends Object

Represents the state of a visitor. Stores the relevant information to find the type of 'this' in the visitor.


Constructor Summary
Constructor and Description
VisitorState()
           
 
Method Summary
Modifier and Type Method and Description
 ClassTree getClassTree()
           
 AnnotatedTypeMirror.AnnotatedDeclaredType getClassType()
           
 AnnotatedTypeMirror.AnnotatedDeclaredType getMethodReceiver()
           
 MethodTree getMethodTree()
           
 TreePath getPath()
           
 void setClassTree(ClassTree ct)
          Updates the tree of the current class currently visited
 void setClassType(AnnotatedTypeMirror.AnnotatedDeclaredType act)
          Updates the type of the current class currently visited
 void setMethodReceiver(AnnotatedTypeMirror.AnnotatedDeclaredType mrt)
          Updates the method receiver type currently visited
 void setMethodTree(MethodTree mt)
          Updates the mehtod currently visited
 void setPath(TreePath path)
          Sets the current path for the visitor.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VisitorState

public VisitorState()
Method Detail

setClassType

public void setClassType(AnnotatedTypeMirror.AnnotatedDeclaredType act)
Updates the type of the current class currently visited


setClassTree

public void setClassTree(ClassTree ct)
Updates the tree of the current class currently visited


setMethodReceiver

public void setMethodReceiver(AnnotatedTypeMirror.AnnotatedDeclaredType mrt)
Updates the method receiver type currently visited


setMethodTree

public void setMethodTree(MethodTree mt)
Updates the mehtod currently visited


setPath

public void setPath(TreePath path)
Sets the current path for the visitor.

Parameters:
path -

getClassType

public AnnotatedTypeMirror.AnnotatedDeclaredType getClassType()
Returns:
the type of the enclosing class

getClassTree

public ClassTree getClassTree()
Returns:
the class tree currently visiting

getMethodReceiver

public AnnotatedTypeMirror.AnnotatedDeclaredType getMethodReceiver()
Returns:
the method receiver type of the enclosing method

getMethodTree

public MethodTree getMethodTree()
Returns:
the method tree currently visiting

getPath

public TreePath getPath()
Returns:
the current path for the visitor

toString

public String toString()
Overrides:
toString in class Object