types.Class.getfuncinfos
Method on every
classDescribes the 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 class defines no _call metamethod. Otherwise the same introspection table debug.get_function_info_table would build for that metamethod closure: name, parameters, defparams, required_params, varargs, native, and the rest.
Notes
This is about _call, the operator that makes an instance of the class callable like a function - not about constructor, which is a plain method and never consulted here. A class with no _call gets null even though every class has a constructor.
Example
class Plain { x = 1 }
println("Plain.getfuncinfos() =", Plain.getfuncinfos())Output:
Plain.getfuncinfos() = nullSee also
getmetamethod | Looks up one of the class's metamethods by name, without triggering it. |
getfuncinfos | Describes this instance's 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. |
get_function_info_table | Returns meta information about a function as table |
| class | class index |