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

addLocalVarForDefSource

MethodVar addLocalVarForDef(LocalDefStmt def, Block? scope)

Make and add a MethodVar for a local variable.

codeSource

Block? code

ctorChainSource

CallExpr? ctorChain

cvarsVarSource

MethodVar cvarsVar()

Get the cvars local variable or throw and exception if not defined

docMetaSource

override [Str:Str]? docMeta()

inheritedRetSource

CType? inheritedRet

inheritedReturnTypeSource

override CType 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, Str name := "?", Int flags := 0)

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()

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()

signatureSource

override Str signature()

varsSource

MethodVar[] vars

walkSource

override Void walk(Visitor v, VisitDepth depth)