polyglot.ast
Interface MethodDecl

All Superinterfaces:
ClassMember, java.lang.Cloneable, CodeDecl, Copy, JL, Node, NodeOps, ProcedureDecl, Term
All Known Subinterfaces:
CofferMethodDecl
All Known Implementing Classes:
CofferMethodDecl_c, MethodDecl_c

public interface MethodDecl
extends ProcedureDecl

A method declaration.


Method Summary
 Flags flags()
          The method's flags.
 MethodDecl flags(Flags flags)
          Set the method's flags.
 java.util.List formals()
          The method's formal parameters.
 MethodDecl formals(java.util.List formals)
          Set the method's formal parameters.
 MethodInstance methodInstance()
          The method type object.
 MethodDecl methodInstance(MethodInstance mi)
          Set the method's type object.
 java.lang.String name()
          The method's name.
 MethodDecl name(java.lang.String name)
          Set the method's name.
 TypeNode returnType()
          The method's return type.
 MethodDecl returnType(TypeNode returnType)
          Set the method's return type.
 java.util.List throwTypes()
          The method's exception throw types.
 MethodDecl throwTypes(java.util.List throwTypes)
          Set the method'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 method's flags.

Specified by:
flags in interface ProcedureDecl

flags

MethodDecl flags(Flags flags)
Set the method's flags.


returnType

TypeNode returnType()
The method's return type.


returnType

MethodDecl returnType(TypeNode returnType)
Set the method's return type.


name

java.lang.String name()
The method's name.

Specified by:
name in interface ProcedureDecl

name

MethodDecl name(java.lang.String name)
Set the method's name.


formals

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

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

formals

MethodDecl formals(java.util.List formals)
Set the method's formal parameters.

Parameters:
formals - A list of Formal.

throwTypes

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

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

throwTypes

MethodDecl throwTypes(java.util.List throwTypes)
Set the method's exception throw types.

Parameters:
throwTypes - A list of TypeNode.

methodInstance

MethodInstance methodInstance()
The method type object. This field may not be valid until after signature disambiguation.


methodInstance

MethodDecl methodInstance(MethodInstance mi)
Set the method's type object.