koala.dynamicjava.tree
Class TypeDeclaration

java.lang.Object
  extended by koala.dynamicjava.tree.Node
      extended by koala.dynamicjava.tree.Declaration
          extended by koala.dynamicjava.tree.TypeDeclaration
All Implemented Interfaces:
SourceInfo.Wrapper
Direct Known Subclasses:
ClassDeclaration, InterfaceDeclaration

public abstract class TypeDeclaration
extends Declaration

This class represents a type declaration

Version:
1.0 - 1999/05/10
Author:
Stephane Hillion

Constructor Summary
protected TypeDeclaration(ModifierSet mods, java.lang.String name, Option<java.util.List<TypeParameter>> tparams, java.util.List<? extends ReferenceTypeName> impl, java.util.List<Node> body, SourceInfo si)
          Creates a new class declaration
 
Method Summary
 java.util.List<? extends ReferenceTypeName> getInterfaces()
          Returns a list that contains the names (String) of the implemented interfaces.
 java.util.List<Node> getMembers()
          Returns the list of the declared members
 java.lang.String getName()
          Returns the name of this class
 Option<java.util.List<TypeParameter>> getTypeParams()
           
 void setInterfaces(java.util.List<? extends ReferenceTypeName> l)
          Sets the interfaces (a list of strings)
 void setMembers(java.util.List<Node> l)
          Sets the members
 void setName(java.lang.String s)
          Sets the type's name
 void setTypeArgs(java.util.List<TypeParameter> tparams)
           
 void setTypeArgs(Option<java.util.List<TypeParameter>> tparams)
           
 
Methods inherited from class koala.dynamicjava.tree.Declaration
getModifiers, setModifiers
 
Methods inherited from class koala.dynamicjava.tree.Node
acceptVisitor, archiveProperties, getProperties, getProperty, getSourceInfo, hasProperty, setProperty, setSourceInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeDeclaration

protected TypeDeclaration(ModifierSet mods,
                          java.lang.String name,
                          Option<java.util.List<TypeParameter>> tparams,
                          java.util.List<? extends ReferenceTypeName> impl,
                          java.util.List<Node> body,
                          SourceInfo si)
Creates a new class declaration

Parameters:
mods - the modifiers
name - the name of the class to declare
tparams - declared type parameters
impl - the list of implemented interfaces. Can be null.
body - the list of fields declarations
Throws:
java.lang.IllegalArgumentException - if name is null or body is null
Method Detail

getName

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


setName

public void setName(java.lang.String s)
Sets the type's name

Throws:
java.lang.IllegalArgumentException - if s is null

getTypeParams

public Option<java.util.List<TypeParameter>> getTypeParams()

setTypeArgs

public void setTypeArgs(java.util.List<TypeParameter> tparams)

setTypeArgs

public void setTypeArgs(Option<java.util.List<TypeParameter>> tparams)

getInterfaces

public java.util.List<? extends ReferenceTypeName> getInterfaces()
Returns a list that contains the names (String) of the implemented interfaces. Can be null.


setInterfaces

public void setInterfaces(java.util.List<? extends ReferenceTypeName> l)
Sets the interfaces (a list of strings)


getMembers

public java.util.List<Node> getMembers()
Returns the list of the declared members


setMembers

public void setMembers(java.util.List<Node> l)
Sets the members

Throws:
java.lang.IllegalArgumentException - if l is null