logo
class

compiler::MethodDef

sys::Obj
  compiler::Node
    compiler::DefNode
      compiler::SlotDef
        compiler::MethodDef

Mixin: compiler::CMethod

MethodDef models a method definition - it's signature and body.

Slots

accessorFor

FieldDef accessorFor

addLocalVar

MethodVar addLocalVar(CType ctype, Str name, Block scope)

Make and add a MethodVar for a local variable. If name is null then we auto-generate a temporary variable name

code

Block code

ctorChain

CallExpr ctorChain

inheritedRet

CType inheritedRet

inheritedReturnType

virtual CType inheritedReturnType()

isFieldAccessor

Bool isFieldAccessor()

Return if getter/setter for FieldDef

isInstanceInit

Bool isInstanceInit()

Return if this a instance initializer block.

isNameInstanceInit

static const Bool isNameInstanceInit(Str name)

isNameStaticInit

static const Bool isNameStaticInit(Str name)

isStaticInit

Bool isStaticInit()

Return if this a static initializer block.

make

new make(Location location, TypeDef parent)

makeInstanceInit

static const MethodDef makeInstanceInit(Location location, TypeDef parent, Block block)

makeStaticInit

static const MethodDef makeStaticInit(Location location, TypeDef parent, Block block)

needsCvars

Bool needsCvars

paramDefs

ParamDef[] paramDefs

params

virtual CParam[] params()

print

virtual Void print(AstWriter out)

ret

CType ret

returnType

virtual CType returnType()

signature

virtual Str signature()

toStr

virtual Str toStr()

vars

MethodVar[] vars

walk

virtual Void walk(Visitor v, VisitDepth depth)