Qore reflection Module
1.7.0
|
The reflection
module allows for Qore code to search and list the definitions and declarations in a Qore Program object.
This module is released under the MIT license (see COPYING.MIT
in the source distribution for more information). The module is tagged as such in the module's header (meaning it can be loaded unconditionally regardless of how the Qore library was initialized).
To use the module in a Qore script, use the %requires
directive as follows:
To prohibit reflection in a Program object; use the PO_NO_REFLECTION sandbox restriction when creating the object or when setting sandboxing restrictions on the Program object.
Classes provided by this module:
Constants:
Typed hashes:
Objects created from reflection classes provided by this module are wrappers over the actual C++ objects; for this reason comparing different objects with the == or != operators will not return the expected results. To perform comparisons on reflection objects, use the isEqual()
methods such as AbstractClass::isEqual(), AbstractMember::isEqual(), or Namespace::isEqual(), among others.
This module is always delivered with Qore and therefore mirrors the Qore version.