types.Instance.getfuncinfos
Method on every
instanceDescribes this instance's class's _call metamethod, the same way function.getfuncinfos describes a plain function.
class Blaster {
function _call(target) { return target != null }
}
let info = Blaster().getfuncinfos()
println("info.name =", info.name)Output:
info.name = _callReturn value
null if the instance's class defines no _call metamethod (so the instance cannot be called like a function). Otherwise the introspection table for that metamethod closure: name, parameters, defparams, required_params, varargs, native, and the rest.
Notes
Equivalent to getclass().getfuncinfos(). Not about constructor, which is a plain method and never consulted here.
Example
class Plain { x = 1 }
println("Plain().getfuncinfos() =", Plain().getfuncinfos())Output:
Plain().getfuncinfos() = nullSee also
getmetamethod | Looks up one of this instance's class's metamethods by name, without triggering it. |
getfuncinfos | Describes the class's _call metamethod, the same way function.getfuncinfos describes a plain function. |
getfuncinfos | Returns a table describing the closure: its name, parameters, and other introspection data the VM tracks for it. |
| instance | class index |