Fan

 

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

accessorForSource

FieldDef? accessorFor

addLocalVarSource

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

codeSource

Block? code

ctorChainSource

CallExpr? ctorChain

docMetaSource

override [Str:Str]? docMeta()

Overrides compiler::SlotDef.docMeta

inheritedRetSource

CType? inheritedRet

inheritedReturnTypeSource

override CType inheritedReturnType()

Overrides compiler::CMethod.inheritedReturnType

isFieldAccessorSource

Bool isFieldAccessor()

Return if getter/setter for FieldDef

isInstanceInitSource

Bool isInstanceInit()

Return if this a instance initializer block.

isNameInstanceInitSource

static Bool isNameInstanceInit(Str name)

isNameStaticInitSource

static Bool isNameStaticInit(Str name)

isOnceSource

Bool isOnce()

Return if this is a once method

isStaticInitSource

Bool isStaticInit()

Return if this a static initializer block.

makeSource

new make(Location location, TypeDef parent)

makeInstanceInitSource

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

makeStaticInitSource

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

needsCvarsSource

Bool needsCvars

paramDefsSource

ParamDef[] paramDefs

paramsSource

override CParam[] params()

Overrides compiler::CMethod.params

printSource

override Void print(AstWriter out)

Overrides compiler::Node.print

Doc inherited from compiler::Node.print

Pretty print this node and it's descendants.

retSource

CType ret

returnTypeSource

override CType returnType()

Overrides compiler::CMethod.returnType

signatureSource

override Str signature()

Overrides compiler::CSlot.signature

toStrSource

override Str toStr()

Overrides sys::Obj.toStr

Doc inherited from sys::Obj.toStr

Return a string representation of this object.

varsSource

MethodVar[] vars

walkSource

override Void walk(Visitor v, VisitDepth depth)

Overrides compiler::SlotDef.walk