rtconst virtual class std::Method

sys::Obj
  std::Slot
    std::Method

Method models a function with a formal parameter list and return value (or Void if no return).

call

Obj? call(Obj? a := null, Obj? b := null, Obj? c := null, Obj? d := null, Obj? e := null, Obj? f := null, Obj? g := null, Obj? h := null)

Convenience for func.call

callList

Obj? callList(List<Obj?>? args)

Convenience for func.callList

callOn

Obj? callOn(Obj? target, List<Obj?>? args)

Convenience for func.callOn

func

Func func(Int arity := -1)

Get the function body of this method.

isImmutable

virtual override Bool isImmutable()

params

List<Param> params()

Get the parameters of the method. Convenience for func.params.

returns

Type returns()

Type returned by the method or sys::Void if no return value. Convenience for func.returns.

signature

virtual override Str signature()

Evaluate the parameter default using reflection. If this method is static or a constructor, then instance should be null. Raise an exception if the parameter default cannot be evaluated independently (such as using an expression with previous parameters).