(Response Object) - Use to explicitly invoke Fantom methods.
MethodCall(MyHandler#process, ["arg1", "arg2"]).toImmutableFunc
- if the method belongs to an
IoCservice, the class instance is obtained from afIoc.
- if the method belongs to a
constclass, a new instance is created and cached.
- non-const classes are cached for the duration of the request only.
- methods are called using
afIoc::Registry.callMethod(...)so may have services as parameters.
The arguments the method is to be called with
const Method method
The method to be called
virtual Func toImmutableFunc()
Returns an immutable func that represents this method call. May be used as a response object itself.
MethodCallwraps an instance method (not static) then the func's first (and only) argument must be the target object. Otherwise the func takes no arguments.
Suggest design ideas for implementing Obj.toImmutable()