All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class openjava.ptree.InterfaceDeclaration

java.lang.Object
   |
   +----openjava.ptree.PtreeObject
           |
           +----openjava.ptree.NonLeaf
                   |
                   +----openjava.ptree.InterfaceDeclaration

public class InterfaceDeclaration
extends NonLeaf
implements TypeDeclaration
The InterfaceDeclaration class presents Interface declaration node of parse tree.

See Also:
Ptree, NonLeaf, TypeDeclaration

Constructor Index

 o InterfaceDeclaration()
 o InterfaceDeclaration(ModifierList, Leaf, ClassTypeList, MemberDeclarationList)
Constructs InterfaceDeclaration from its elements Allocates new object, and assigns the specified objects to its instance variables.

Method Index

 o getBody()
Gets interface body
 o getMetaclass()
 o getModifiers()
Gets modifier list
 o getName()
Gets interface name
 o getSupers()
Gets extends name list
 o getUserDecorators()
 o setBody(MemberDeclarationList)
Gets interface body
 o setMetaclass(Class)
 o setModifiers(ModifierList)
Sets modifier list
 o setName(Identifier)
Sets interface name
 o setSupers(ClassTypeList)
Sets extends name list
 o setUserDecorators(UserDecoratorList)
 o writeCode()
write object code ModifierList "interface" Identifier "extends" ClassTypeList MemberDeclarationList

Constructors

 o InterfaceDeclaration
 public InterfaceDeclaration(ModifierList modiflist,
                             Leaf name,
                             ClassTypeList extendlist,
                             MemberDeclarationList fieldlist)
Constructs InterfaceDeclaration from its elements Allocates new object, and assigns the specified objects to its instance variables.

Parameters:
modiflist - modifier words of the new interface
name - the name of the new interface
extendlist - extends interfaces of the new interface
fieldlist - field declarations, it is body of the new interface
 o InterfaceDeclaration
 public InterfaceDeclaration()

Methods

 o writeCode
 public void writeCode()
write object code ModifierList "interface" Identifier "extends" ClassTypeList MemberDeclarationList

Overrides:
writeCode in class NonLeaf
 o getModifiers
 public ModifierList getModifiers()
Gets modifier list

Returns:
if there is no modifiers, getModifiers() returns an empty list, otherwise returns modifier list.
 o setModifiers
 public void setModifiers(ModifierList modifs)
Sets modifier list

Parameters:
modifs - modifier list to set
 o getName
 public Identifier getName()
Gets interface name

Returns:
interface name
 o setName
 public void setName(Identifier name)
Sets interface name

Parameters:
name - interface name to set
 o getSupers
 public ClassTypeList getSupers()
Gets extends name list

Returns:
there is no extends, getExtendsList returns an empty list
 o setSupers
 public void setSupers(ClassTypeList zupers)
Sets extends name list

Parameters:
zupers - class type list to set
 o getBody
 public MemberDeclarationList getBody()
Gets interface body

Returns:
an field declaration list as the interface body.
 o setBody
 public void setBody(MemberDeclarationList body)
Gets interface body

Parameters:
body - member declaration list to set
 o setUserDecorators
 public void setUserDecorators(UserDecoratorList ud)
 o getUserDecorators
 public UserDecoratorList getUserDecorators()
 o setMetaclass
 public void setMetaclass(Class metaclazz)
 o getMetaclass
 public Class getMetaclass()

All Packages  Class Hierarchy  This Package  Previous  Next  Index