This class provides information about Qore normal (non-static, non-special) class methods.
More...
|
auto | call (object obj,...) |
| calls the given method with the given object; the object must be a member of a compatible class More...
|
|
auto | callArgs (object obj, *softlist< auto > argv) |
| calls the given method with the given object; the object must be a member of a compatible class More...
|
|
| constructor (Class cls, string method) |
| Creates the object from the class and normal (non-static, non-special) method name. More...
|
|
| constructor (string class_name, string method) |
| Creates the object from the class name or namespace path and normal (non-static, non-special) method name. More...
|
|
| constructor () |
| Throws an exception if called directly; this class can only be instantiated by builtin subclasses. More...
|
|
AbstractClass | getClass () |
| Returns the class for the method. More...
|
|
string | getMethodTypeName () |
| returns the type of method as a string; one of "normal" , "static" , "constructor" , "destructor" , "copy" More...
|
|
AbstractMethodVariant | getVariant (...) |
| Returns the given direct child method variant declared in this method or throws an exception if the method variant is not defined. More...
|
|
AbstractMethodVariant | getVariantArgs (softlist< Type > argv) |
| Returns the given direct child method variant declared in this method or throws an exception if the method variant is not defined. More...
|
|
list< AbstractMethodVariant > | getVariants () |
| returns the variants implemented by the method More...
|
|
bool | isStatic () |
| returns True if the method is a static method More...
|
|
| constructor () |
| Throws an exception if called directly; this class can only be instantiated by builtin subclasses. More...
|
|
string | getName () |
| returns the function or method name More...
|
|
bool | isBuiltin () |
| returns True if the function or method is a builtin function or method More...
|
|
bool | isEqual (AbstractReflectionFunction func) |
| Returns True if the function or method object passed as an argument is equal to the current object; False if not. More...
|
|
bool | isInjected () |
| returns True if the function or method has been injected as a dependency injection More...
|
|
bool | isMethod () |
| returns True if the object is a method but not a pseudo-method More...
|
|
bool | isPseudoMethod () |
| returns True if the object is a pseudo-method More...
|
|
bool | isUser () |
| returns True if the function or method is a user function or method More...
|
|
int | numVariants () |
| returns the number of variants implemented by the function or method More...
|
|
This class provides information about Qore normal (non-static, non-special) class methods.
- Restrictions:
- Qore::PO_NO_REFLECTION
- See also
- NormalMethodVariant
- Since
- Qore 0.9.0
◆ call()
auto Qore::Reflection::NormalMethod::call |
( |
object |
obj, |
|
|
|
... |
|
) |
| |
calls the given method with the given object; the object must be a member of a compatible class
- Example:
auto v = m.call(obj, arg1, arg2);
- Parameters
-
obj | the object to make the call on; must be an object of the class implementing the method or a METHOD-ERROR exception is thrown |
... | optional arguments to the method |
- Returns
- the return value of the method call
- Exceptions
-
PROGRAM-ERROR | thrown if the Program object holding the class and method has been destroyed |
METHOD-ERROR | the object was not instantiated from the class implementing this method |
- See also
- callArgs()
◆ callArgs()
auto Qore::Reflection::NormalMethod::callArgs |
( |
object |
obj, |
|
|
*softlist< auto > |
argv |
|
) |
| |
calls the given method with the given object; the object must be a member of a compatible class
- Example:
auto v = m.callArgs(obj, (arg1, arg2));
- Parameters
-
obj | the object to make the call on; must be an object of the class implementing the method or a METHOD-ERROR exception is thrown |
argv | optional arguments to the method |
- Returns
- the return value of the method call
- Exceptions
-
PROGRAM-ERROR | thrown if the Program object holding the class and method has been destroyed |
METHOD-ERROR | the object was not instantiated from the class implementing this method |
- See also
- call()
◆ constructor() [1/2]
Qore::Reflection::NormalMethod::constructor |
( |
Class |
cls, |
|
|
string |
method |
|
) |
| |
Creates the object from the class and normal (non-static, non-special) method name.
- Example:
NormalMethod m(cls, "lock");
- Parameters
-
cls | the class for the method |
method | the (non-static, non-special) method name |
- Exceptions
-
UNKOWN-METHOD | cannot find a normal (non-static) method with the given name |
◆ constructor() [2/2]
Qore::Reflection::NormalMethod::constructor |
( |
string |
class_name, |
|
|
string |
method |
|
) |
| |
Creates the object from the class name or namespace path and normal (non-static, non-special) method name.
- Example:
NormalMethod m("Thread::Mutex", "lock");
- Parameters
-
class_name | the class name or namespace path for the class implementing the method |
method | the normal (non-static, non-special) method name |
- Exceptions
-
UNKNOWN-CLASS | cannot find a class with the given name or path |
UNKOWN-METHOD | cannot find a normal (non-static, non-special) method with the given name |
The documentation for this class was generated from the following file: