polyglot.ast
Interface MethodDecl

All Superinterfaces:
ClassMember, java.lang.Cloneable, CodeDecl, Copy, JL, Node, NodeOps, ProcedureDecl, Term
All Known Subinterfaces:
CofferMethodDecl, PolyJMethodDecl
All Known Implementing Classes:
CofferMethodDecl_c, MethodDecl_c, PolyJMethodDecl_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, reachable, reachable
 
Methods inherited from interface polyglot.ast.Node
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge
 
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

public Flags flags()
The method's flags.

Specified by:
flags in interface ProcedureDecl

flags

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


returnType

public TypeNode returnType()
The method's return type.


returnType

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


name

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

Specified by:
name in interface ProcedureDecl

name

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


formals

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

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

formals

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

Parameters:
formals - A list of Formal.

throwTypes

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

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

throwTypes

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

Parameters:
throwTypes - A list of TypeNode.

methodInstance

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


methodInstance

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