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

Source

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

Source

code

Block code

Source

ctorChain

CallExpr ctorChain

Source

docMeta

override Str:Str docMeta()

Source

inheritedRet

CType inheritedRet

Source

inheritedReturnType

override CType inheritedReturnType()

Source

isFieldAccessor

Bool isFieldAccessor()

Return if getter/setter for FieldDef

Source

isInstanceInit

Bool isInstanceInit()

Return if this a instance initializer block.

Source

isNameInstanceInit

static Bool isNameInstanceInit(Str name)

Source

isNameStaticInit

static Bool isNameStaticInit(Str name)

Source

isOnce

Bool isOnce()

Return if this is a once method

Source

isStaticInit

Bool isStaticInit()

Return if this a static initializer block.

Source

make

new make(Location location, TypeDef parent)

Source

makeInstanceInit

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

Source

makeStaticInit

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

Source

needsCvars

Bool needsCvars

Source

paramDefs

ParamDef[] paramDefs

Source

params

override CParam[] params()

Source

print

override Void print(AstWriter out)

Pretty print this node and it's descendants.

Source

ret

CType ret

Source

returnType

override CType returnType()

Source

signature

override Str signature()

Source

toStr

override Str toStr()

Return a string representation of this object.

Source

vars

MethodVar[] vars

Source

walk

override Void walk(Visitor v, VisitDepth depth)

Source