polyglot.ast
Interface ConstructorDecl

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

public interface ConstructorDecl
extends ProcedureDecl

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


Field Summary
 
Fields inherited from interface polyglot.ast.Term
ENTRY, EXIT
 
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.
 Id id()
          The constructor's name.
 ConstructorDecl id(Id name)
          Set the constructor's name.
 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.CodeBlock
body, body
 
Methods inherited from interface polyglot.ast.CodeNode
codeBody, codeInstance
 
Methods inherited from interface polyglot.ast.Term
acceptCFG, exceptions, exceptions, firstChild, reachable, reachable
 
Methods inherited from interface polyglot.ast.Node
childExpectedType, del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitChild, visitEdge, visitList
 
Methods inherited from interface polyglot.ast.JL
init, node
 
Methods inherited from interface polyglot.ast.NodeOps
addDecls, buildTypes, buildTypesEnter, checkConstants, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChildren
 
Methods inherited from interface polyglot.util.Copy
copy
 
Methods inherited from interface polyglot.ast.ClassMember
memberInstance
 

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.


id

Id id()
The constructor's name. This should be the short name of the containing class.


id

ConstructorDecl id(Id name)
Set the constructor's name.


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.