All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class openjava.ptree.ConstructorDeclaration

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

public class ConstructorDeclaration
extends NonLeaf
implements MemberDeclaration
The ConstructorDeclaration class represents constructor declaration node of the parse tree.

See Also:
NonLeaf, MemberDeclaration, ModifierList, Identifier, ParameterList, ClassTypeList, SpecialCallStatement, StatementList

Constructor Index

 o ConstructorDeclaration(ModifierList, Identifier, ParameterList, ClassTypeList, SpecialCallStatement, StatementList)
Constructs new ConstructorDeclaration from its elements.
 o ConstructorDeclaration(ModifierList, Identifier, ParameterList, ClassTypeList, StatementList)
Constructs new ConstructorDeclaration from its elements.

Method Index

 o getBody()
Gets the statement list of this constructor body.
 o getModifiers()
Gets modifier list.
 o getName()
Gets the name of this constructor node.
 o getParameters()
Gets the parameter list.
 o getSpecialCallStatement()
Gets the special call statement.
 o getThrows()
Gets the class type list thrown by this constructor.
 o make(String)
 o setBody(StatementList)
Sets the statement list of this constructor body.
 o setModifiers(ModifierList)
Sets modifier list.
 o setName(Identifier)
Sets the name of this constructor node.
 o setParameters(ParameterList)
Sets the parameter list.
 o setSpecialCallStatement(SpecialCallStatement)
Sets the special call statement.
 o setThrows(ClassTypeList)
Sets the class type list thrown by this constructor.
 o writeCode()
Writes the code this parse-tree presents for.

Constructors

 o ConstructorDeclaration
 public ConstructorDeclaration(ModifierList modiflist,
                               Identifier name,
                               ParameterList params,
                               ClassTypeList throwlist,
                               SpecialCallStatement scstmt,
                               StatementList stmtlist)
Constructs new ConstructorDeclaration from its elements.

Parameters:
modiflist - modifier list, if it has no modifier list then thes arg is set empty list.
name - name of this constructor.
params - parameter list
throwlist - throw type list, if there is no throws then this arg is set empty list
scstmt - statement which calls another constructor if this is null, it means no another constructor call exists.
stmtlist - statement list of this constructor body. if this is null, it means method body is with only semi colon.
 o ConstructorDeclaration
 public ConstructorDeclaration(ModifierList modiflist,
                               Identifier name,
                               ParameterList params,
                               ClassTypeList throwlist,
                               StatementList stmtlist)
Constructs new ConstructorDeclaration from its elements.

Parameters:
modiflist - modifier list, if it has no modifier list then thes arg is set empty list.
name - name of this constructor.
params - parameter list
throwlist - throw type list, if there is no throws then this arg is set empty list
stmtlist - statement list of this constructor body. if this is null, it means method body is with only semi colon.

Methods

 o writeCode
 public void writeCode()
Writes the code this parse-tree presents for.

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

Returns:
modifier list.
 o setModifiers
 public void setModifiers(ModifierList modifs)
Sets modifier list.

Parameters:
modifs - modifier list.
 o getName
 public Identifier getName()
Gets the name of this constructor node.

Returns:
constructor declarator node.
 o setName
 public void setName(Identifier name)
Sets the name of this constructor node.

Parameters:
name - the name to be set.
 o getParameters
 public ParameterList getParameters()
Gets the parameter list.

Returns:
parameter list for constructor.
 o setParameters
 public void setParameters(ParameterList params)
Sets the parameter list.

Parameters:
params - parameterlist for constructor declarator node.
 o getThrows
 public ClassTypeList getThrows()
Gets the class type list thrown by this constructor.

Returns:
class type list thrown by this constructor.
 o setThrows
 public void setThrows(ClassTypeList ctlist)
Sets the class type list thrown by this constructor.

Parameters:
ctlist - class type list thrown by this constructor.
 o getSpecialCallStatement
 public SpecialCallStatement getSpecialCallStatement()
Gets the special call statement. Special call statement is like:
     super();
 

Returns:
special call statement
 o setSpecialCallStatement
 public void setSpecialCallStatement(SpecialCallStatement scstmt)
Sets the special call statement.

Parameters:
scstmt - the special call statement to set
See Also:
getSpecialCallStatement
 o getBody
 public StatementList getBody()
Gets the statement list of this constructor body.

Returns:
the statement list of this constructor body.
 o setBody
 public void setBody(StatementList stmts)
Sets the statement list of this constructor body.

Returns:
the statement list of this constructor body.
 o make
 public static ConstructorDeclaration make(String str)

All Packages  Class Hierarchy  This Package  Previous  Next  Index