logo

class

compiler::MethodDef

sys::Obj
  compiler::Node
    compiler::DefNode
      compiler::SlotDef
        compiler::MethodDef : 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

docMeta

override Str:Str docMeta()

inheritedRet

CType inheritedRet

inheritedReturnType

override CType inheritedReturnType()

isFieldAccessor

Bool isFieldAccessor()

Return if getter/setter for FieldDef

isInstanceInit

Bool isInstanceInit()

Return if this a instance initializer block.

isNameInstanceInit

static Bool isNameInstanceInit(Str name)

isNameStaticInit

static Bool isNameStaticInit(Str name)

isOnce

Bool isOnce()

Return if this is a once method

isStaticInit

Bool isStaticInit()

Return if this a static initializer block.

make

new make(Location location, TypeDef parent)

makeInstanceInit

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

makeStaticInit

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

needsCvars

Bool needsCvars

paramDefs

ParamDef[] paramDefs

params

override CParam[] params()

print

override Void print(AstWriter out)

ret

CType ret

returnType

override CType returnType()

signature

override Str signature()

toStr

override Str toStr()

vars

MethodVar[] vars

walk

override Void walk(Visitor v, VisitDepth depth)