ast
Class Class_

java.lang.Object
  extended by ast.ASTNode
      extended by ast.Class_

public class Class_
extends ASTNode

The Class_ class represents a class declaration, which consists of a filename (filename), a class name (name), the name of its parent class (parent), and a list of members (members) which can be either field declarations or method declarations.

See Also:
ASTNode

Field Summary
protected  java.lang.String filename
          The filename of the file containing this class
protected  MemberList memberList
          List of the class members
protected  java.lang.String name
          The name of this class
protected  java.lang.String parent
          The name of the parent of this class
 
Fields inherited from class ast.ASTNode
charNum, lineNum, lineStr
 
Constructor Summary
Class_(int lineNum, java.lang.String filename, java.lang.String name, java.lang.String parent, MemberList memberList)
          Class_ constructor
 
Method Summary
 java.lang.Object accept(visitor.Visitor v, java.lang.Object o)
          Visitor method
 java.lang.String getFilename()
          Get the filename of the file containing this class
 MemberList getMemberList()
          Get list of members that this class contains
 java.lang.String getName()
          Get the name of this class
 java.lang.String getParent()
          Get the name of the parent of this class
 
Methods inherited from class ast.ASTNode
getLineNum
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filename

protected java.lang.String filename
The filename of the file containing this class


name

protected java.lang.String name
The name of this class


parent

protected java.lang.String parent
The name of the parent of this class


memberList

protected MemberList memberList
List of the class members

Constructor Detail

Class_

public Class_(int lineNum,
              java.lang.String filename,
              java.lang.String name,
              java.lang.String parent,
              MemberList memberList)
Class_ constructor

Parameters:
lineNum - source line number corresponding to this AST node
filename - the filename of the file containing this class
name - the name of this class
parent - the name of the parent of this class
memberList - a list of the class members
Method Detail

getFilename

public java.lang.String getFilename()
Get the filename of the file containing this class

Returns:
file name

getName

public java.lang.String getName()
Get the name of this class

Returns:
class name

getParent

public java.lang.String getParent()
Get the name of the parent of this class

Returns:
name of parent class

getMemberList

public MemberList getMemberList()
Get list of members that this class contains

Returns:
list of fields

accept

public java.lang.Object accept(visitor.Visitor v,
                               java.lang.Object o)
Visitor method

Specified by:
accept in class ASTNode
Parameters:
v - visitor object
o - object to pass down
Returns:
result of visiting this node
See Also:
Visitor