polyglot.ast
Interface ConstructorDecl

All Superinterfaces:
ClassMember, java.lang.Cloneable, CodeDecl, Copy, JL, Node, NodeOps, ProcedureDecl, Term
All Known Subinterfaces:
CofferConstructorDecl
All Known Implementing Classes:
CofferConstructorDecl_c, ConstructorDecl_c

public interface ConstructorDecl
extends ProcedureDecl

A ConstructorDecl is an immutable representation of a constructor declaration as part of a class body.


Method Summary
 ConstructorInstance constructorInstance()
          The constructor type object.
 ConstructorDecl constructorInstance(ConstructorInstance ci)
          Set the constructor's type object.
 Flags flags()
          The constructor's flags.
 ConstructorDecl flags(Flags flags)
          Set the constructor's flags.
 java.util.List formals()
          The constructor's formal parameters.
 ConstructorDecl formals(java.util.List formals)
          Set the constructor's formal parameters.
 java.lang.String name()
          The constructor's name.
 ConstructorDecl name(java.lang.String name)
          Set the constructor's name.
 java.util.List throwTypes()
          The constructor's exception throw types.
 ConstructorDecl throwTypes(java.util.List throwTypes)
          Set the constructor's exception throw types.
 
Methods inherited from interface polyglot.ast.ProcedureDecl
procedureInstance
 
Methods inherited from interface polyglot.ast.CodeDecl
body, body, codeInstance
 
Methods inherited from interface polyglot.ast.Term
acceptCFG, entry, exceptions, exceptions, reachable, reachable
 
Methods inherited from interface polyglot.ast.Node
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList
 
Methods inherited from interface polyglot.ast.JL
init, node
 
Methods inherited from interface polyglot.ast.NodeOps
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, visitChildren
 
Methods inherited from interface polyglot.util.Copy
copy
 

Method Detail

flags

Flags flags()
The constructor's flags.

Specified by:
flags in interface ProcedureDecl

flags

ConstructorDecl flags(Flags flags)
Set the constructor's flags.


name

java.lang.String name()
The constructor's name. This should be the short name of the containing class.

Specified by:
name in interface ProcedureDecl

name

ConstructorDecl name(java.lang.String name)
Set the constructor's name.


formals

java.util.List formals()
The constructor's formal parameters.

Specified by:
formals in interface ProcedureDecl
Returns:
A list of Formal.

formals

ConstructorDecl formals(java.util.List formals)
Set the constructor's formal parameters.

Parameters:
formals - A list of Formal.

throwTypes

java.util.List throwTypes()
The constructor's exception throw types.

Specified by:
throwTypes in interface ProcedureDecl
Returns:
A list of TypeNode.

throwTypes

ConstructorDecl throwTypes(java.util.List throwTypes)
Set the constructor's exception throw types.

Parameters:
throwTypes - A list of TypeNode.

constructorInstance

ConstructorInstance constructorInstance()
The constructor type object. This field may not be valid until after signature disambiguation.


constructorInstance

ConstructorDecl constructorInstance(ConstructorInstance ci)
Set the constructor's type object.