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
-
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
- isNameStaticInitSource
- 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()
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
- varsSource
-
MethodVar[] vars
- walkSource
-
override Void walk(Visitor v, VisitDepth depth)
Overrides compiler::SlotDef.walk