Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

openjava.ptree
Class ClassDeclaration  view ClassDeclaration download ClassDeclaration.java

java.lang.Object
  extended byopenjava.ptree.ParseTreeObject
      extended byopenjava.ptree.NonLeaf
          extended byopenjava.ptree.ClassDeclaration
All Implemented Interfaces:
java.lang.Cloneable, MemberDeclaration, ParseTree, Statement

public class ClassDeclaration
extends NonLeaf
implements Statement, MemberDeclaration, ParseTree

The ClassDeclaration class presents class declaraton node of parse tree.


Field Summary
private  boolean _isInterface
           
private  java.lang.String[] metaclazz
           
private  java.util.Hashtable suffixes
           
 
Fields inherited from class openjava.ptree.NonLeaf
 
Fields inherited from class openjava.ptree.ParseTreeObject
LN
 
Fields inherited from interface openjava.ptree.MemberDeclaration
CONSTRUCTOR, FIELD, METHOD, STATICINIT, STATICINITIALIZER, TYPE
 
Constructor Summary
ClassDeclaration(ModifierList modiflist, java.lang.String name, TypeName[] baseclasses, TypeName[] ifaces, MemberDeclarationList fieldlist)
          Constructs ClassDeclaration from its elements.
ClassDeclaration(ModifierList modiflist, java.lang.String name, TypeName[] baseclasses, TypeName[] ifaces, MemberDeclarationList fieldlist, boolean is_class)
           
 
Method Summary
 void accept(openjava.ptree.util.ParseTreeVisitor v)
          Accepts a ParseTreeVisitor object as the role of a Visitor in the Visitor pattern, as the role of an Element in the Visitor pattern.
 TypeName getBaseclass()
          Gets base classes in 'extends' clause.
 TypeName[] getBaseclasses()
          Gets the classes in 'extends' clause.
 MemberDeclarationList getBody()
          Gets class body
 TypeName[] getInterfaces()
          Gets interface name list
 java.lang.String getMetaclass()
           
 ModifierList getModifiers()
          Gets modifier list
 java.lang.String getName()
          Gets the class name.
 java.util.Hashtable getSuffixes()
           
 boolean isInterface()
           
 void setBaseclass(TypeName ctype)
          Sets super class name
 void setBaseclasses(TypeName[] ctypes)
          Sets super class name
 void setBody(MemberDeclarationList mdlist)
          Sets class body
 void setInterfaces(TypeName[] ctlist)
          Sets interface name list
 void setMetaclass(java.lang.String metaclazz)
           
 void setMetaclass(java.lang.String[] metaclazz)
           
 void setModifiers(ModifierList modifs)
          Sets modifier list
 void setName(java.lang.String name)
          Sets a class name in extends clause.
 void setSuffixes(java.util.Hashtable suffixes)
           
 
Methods inherited from class openjava.ptree.NonLeaf
childrenAccept, elementAt, equals, getComment, getContents, getLength, makeRecursiveCopy, replaceChildWith, set, set, set, set, set, set, set, set, set, setComment, setElementAt
 
Methods inherited from class openjava.ptree.ParseTreeObject
clone, equal, getObjectID, getParent, hashCode, lastObjectID, makeCopy, replace, setParent, toFlattenString, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface openjava.ptree.ParseTree
childrenAccept, equals, getObjectID, makeCopy, makeRecursiveCopy, replace, toFlattenString, toString
 
Methods inherited from interface openjava.ptree.MemberDeclaration
equals
 

Field Detail

metaclazz

private java.lang.String[] metaclazz

suffixes

private java.util.Hashtable suffixes

_isInterface

private boolean _isInterface
Constructor Detail

ClassDeclaration

public ClassDeclaration(ModifierList modiflist,
                        java.lang.String name,
                        TypeName[] baseclasses,
                        TypeName[] ifaces,
                        MemberDeclarationList fieldlist)
Constructs ClassDeclaration from its elements.


ClassDeclaration

public ClassDeclaration(ModifierList modiflist,
                        java.lang.String name,
                        TypeName[] baseclasses,
                        TypeName[] ifaces,
                        MemberDeclarationList fieldlist,
                        boolean is_class)
Method Detail

isInterface

public boolean isInterface()

getModifiers

public ModifierList getModifiers()
Gets modifier list


setModifiers

public void setModifiers(ModifierList modifs)
Sets modifier list


getName

public java.lang.String getName()
Gets the class name.


setName

public void setName(java.lang.String name)
Sets a class name in extends clause.


getBaseclasses

public TypeName[] getBaseclasses()
Gets the classes in 'extends' clause. This causes


getBaseclass

public TypeName getBaseclass()
Gets base classes in 'extends' clause.


setBaseclasses

public void setBaseclasses(TypeName[] ctypes)
Sets super class name


setBaseclass

public void setBaseclass(TypeName ctype)
Sets super class name


getInterfaces

public TypeName[] getInterfaces()
Gets interface name list


setInterfaces

public void setInterfaces(TypeName[] ctlist)
Sets interface name list


getBody

public MemberDeclarationList getBody()
Gets class body


setBody

public void setBody(MemberDeclarationList mdlist)
Sets class body


setSuffixes

public void setSuffixes(java.util.Hashtable suffixes)

getSuffixes

public java.util.Hashtable getSuffixes()

setMetaclass

public void setMetaclass(java.lang.String metaclazz)

setMetaclass

public void setMetaclass(java.lang.String[] metaclazz)

getMetaclass

public java.lang.String getMetaclass()

accept

public void accept(openjava.ptree.util.ParseTreeVisitor v)
            throws ParseTreeException
Description copied from interface: ParseTree
Accepts a ParseTreeVisitor object as the role of a Visitor in the Visitor pattern, as the role of an Element in the Visitor pattern.

This invoke an appropriate visit() method on the accepted visitor.

Specified by:
accept in interface ParseTree
Specified by:
accept in class ParseTreeObject