Qore reflection Module  1.12.2
Qore::Reflection::PseudoMethodVariant Class Reference

The class for Qore class normal method variants. More...

Inheritance diagram for Qore::Reflection::PseudoMethodVariant:
Qore::Reflection::AbstractMethodVariant Qore::Reflection::AbstractVariant

Public Member Methods

auto call (auto val,...)
 calls the given pseudo-method variant with the given value; the value must be compatible with the pseudo-class's type More...
 
auto callArgs (auto val, *softlist< auto > argv)
 calls the given pseudo-method variant with the given value; the value must be compatible with the pseudo-class's type More...
 
 constructor ()
 Throws an exception if called directly; this class can only be instantiated by builtin subclasses. More...
 
- Public Member Methods inherited from Qore::Reflection::AbstractMethodVariant
 constructor ()
 Throws an exception if called directly; this class can only be instantiated by builtin subclasses. More...
 
string getAccessModifierString ()
 returns a string for the access modifier for the method variant More...
 
AbstractClass getClass ()
 Returns the class for the variant. More...
 
AbstractMethod getMethod ()
 Returns the method for the method variant. More...
 
bool isAbstract ()
 returns True if the variant is abstract More...
 
bool isFinal ()
 returns True if the variant is final More...
 
- Public Member Methods inherited from Qore::Reflection::AbstractVariant
 constructor ()
 Throws an exception if called directly; this class can only be instantiated by builtin subclasses. More...
 
bool empty ()
 returns True if the variant has no code implementation; False if it does More...
 
list< string > getCodeFlagList ()
 returns a list of strings of code flags describing the variant More...
 
int getCodeFlags ()
 returns a bitfield of code flags describing the variant More...
 
list< auto > getDefaultArgs ()
 returns a list of default arguments for parameters for the variant; if the variant has no parameters, an empty list is returned More...
 
int getDomain ()
 returns the functional domain of the variant (for builtin variants only) as a bitfield of functional_domain_constants More...
 
list< string > getDomainStringList ()
 returns a list of functional domain strings for the variant (for builtin variants only); an empty list is returned for user variants More...
 
AbstractReflectionFunction getFunction ()
 Returns the abstract function object that contains the variant. More...
 
list< string > getModifierList ()
 returns a list of strings of modifiers describing the variant More...
 
int getModifiers ()
 returns a bitfield of modifiers describing the variant More...
 
list< string > getParamNames ()
 returns a list of parameter variable name for the variant; if the variant has no parameters, an empty list is returned More...
 
string getParamString ()
 returns a string giving a list of the parameters of the variant, including types, variable names, and default values More...
 
list< TypegetParamTypes ()
 returns a list of parameter types for the variant; if the variant has no parameters, an empty list is returned More...
 
Type getReturnType ()
 returns the return type of the variant More...
 
string getReturnTypeString ()
 returns a string for the return type More...
 
hash< SourceLocationInfo > getSourceLocation ()
 Returns the source location of the variant declaration. More...
 
bool hasBody ()
 returns True if the variant has a code implementation; False if not (i.e. it is empty) More...
 
bool isBuiltin ()
 returns True if the variant is a builtin variant More...
 
bool isEqual (AbstractVariant variant)
 Returns True if the variant passed as an argument is equal to the current object; False if not. More...
 
bool isInjected ()
 returns True if the function or method that the variant belongs to (and therefore the variant itself) has been injected as a dependency injection More...
 
bool isMethodVariant ()
 returns True if the variant is a method variant but not a pseudo-method variant More...
 
bool isPseudoMethodVariant ()
 returns True if the object is a pseudo-method variant More...
 
bool isUser ()
 returns True if the variant is a user variant More...
 
int numParams ()
 returns the number of parameters in the signature More...
 
string toString ()
 returns a string for the variant's signature including any modifiers ("synchronized", "private", etc), the return type, the class name (if any, without a namespace prefix and followed by "::"), and the function or method name followed by parameter types in parentheses More...
 

Detailed Description

The class for Qore class normal method variants.

Restrictions:
Qore::PO_NO_REFLECTION

This class cannot be instantiated directly and also cannot be directly inherited by user-defined classes.

See also
PseudoMethod
Since
Qore 0.9.0

Member Function Documentation

◆ call()

auto Qore::Reflection::PseudoMethodVariant::call ( auto  val,
  ... 
)

calls the given pseudo-method variant with the given value; the value must be compatible with the pseudo-class's type

Example:
auto v = m.call(val, arg1, arg2);
Parameters
valthe value to make the call on; must be compatible with the pseudo-class's type or a METHOD-ERROR exception is thrown
...optional arguments to the method
Returns
the return value of the method call
Exceptions
METHOD-ERRORthe value is not compatible with the class implementing this method
RUNTIME-TYPE-ERRORinvalid argument types passed to the variant
See also
callArgs()

◆ callArgs()

auto Qore::Reflection::PseudoMethodVariant::callArgs ( auto  val,
*softlist< auto >  argv 
)

calls the given pseudo-method variant with the given value; the value must be compatible with the pseudo-class's type

Example:
auto v = m.callArgs(val, (arg1, arg2));
Parameters
valthe value to make the call on; must be compatible with the pseudo-class's type or a METHOD-ERROR exception is thrown
argvoptional arguments to the method
Returns
the return value of the method call
Exceptions
METHOD-ERRORthe value is not compatible with the class implementing this method
RUNTIME-TYPE-ERRORinvalid argument types passed to the variant
See also
call()

◆ constructor()

Qore::Reflection::PseudoMethodVariant::constructor ( )

Throws an exception if called directly; this class can only be instantiated by builtin subclasses.

Exceptions
PSEUDOMETHODVARIANT-CONSTRUCTOR-ERRORthis exception is thrown if this class is constructed directly (also if directly inherited by user classes)

The documentation for this class was generated from the following file: