Qore reflection Module
1.12.0
|
The abstract base class for Qore class variants. More...
Public Member Methods | |
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< Type > | getParamTypes () |
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... | |
The abstract base class for Qore class variants.
This class cannot be instantiated directly and also cannot be directly inherited by user-defined classes.
Qore::Reflection::AbstractVariant::constructor | ( | ) |
Throws an exception if called directly; this class can only be instantiated by builtin subclasses.
ABSTRACTVARIANT-CONSTRUCTOR-ERROR | this exception is thrown if this class is constructed directly (also if directly inherited by user classes) |
bool Qore::Reflection::AbstractVariant::empty | ( | ) |
returns True if the variant has no code implementation; False if it does
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
list<string> Qore::Reflection::AbstractVariant::getCodeFlagList | ( | ) |
returns a list of strings of code flags describing the variant
"NOOP"
: the variant has the CF_NOOP flag set"USES_EXTRA_ARGS"
: the variant has the CF_USES_EXTRA_ARGS flag set"CONSTANT"
: the variant has the CF_CONSTANT flag set"DEPRECATED"
: the variant has the CF_DEPRECATED flag set"RET_VALUE_ONLY"
: the variant has the CF_RET_VALUE_ONLY flag set"RUNTIME_NOOP"
: the variant has the CF_RUNTIME_NOOP flag setPROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
int Qore::Reflection::AbstractVariant::getCodeFlags | ( | ) |
returns a bitfield of code flags describing the variant
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
list<auto> Qore::Reflection::AbstractVariant::getDefaultArgs | ( | ) |
returns a list of default arguments for parameters for the variant; if the variant has no parameters, an empty list is returned
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
int Qore::Reflection::AbstractVariant::getDomain | ( | ) |
returns the functional domain of the variant (for builtin variants only) as a bitfield of functional_domain_constants
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
list<string> Qore::Reflection::AbstractVariant::getDomainStringList | ( | ) |
returns a list of functional domain strings for the variant (for builtin variants only); an empty list is returned for user variants
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
AbstractReflectionFunction Qore::Reflection::AbstractVariant::getFunction | ( | ) |
Returns the abstract function object that contains the variant.
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
list<string> Qore::Reflection::AbstractVariant::getModifierList | ( | ) |
returns a list of strings of modifiers describing the variant
"abstract"
: the variant is abstract"final"
: (only returned for method variants) the variant has the final flag set"private"
: (only returned for method variants) gives the accessibility of the variant"private:internal"
: (only returned for method variants) gives the accessibility of the variant"public"
: for function variants, the variant has the module public flag set on the function, for method variants, this gives the accessibility of the variant"static"
: (only returned for method variants) the variant is a static method variant"synchronized"
: the variant is synchronizedPROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
int Qore::Reflection::AbstractVariant::getModifiers | ( | ) |
returns a bitfield of modifiers describing the variant
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
list<string> Qore::Reflection::AbstractVariant::getParamNames | ( | ) |
returns a list of parameter variable name for the variant; if the variant has no parameters, an empty list is returned
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
string Qore::Reflection::AbstractVariant::getParamString | ( | ) |
returns a string giving a list of the parameters of the variant, including types, variable names, and default values
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
list<Type> Qore::Reflection::AbstractVariant::getParamTypes | ( | ) |
returns a list of parameter types for the variant; if the variant has no parameters, an empty list is returned
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
Type Qore::Reflection::AbstractVariant::getReturnType | ( | ) |
returns the return type of the variant
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
string Qore::Reflection::AbstractVariant::getReturnTypeString | ( | ) |
returns a string for the return type
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
hash<SourceLocationInfo> Qore::Reflection::AbstractVariant::getSourceLocation | ( | ) |
Returns the source location of the variant declaration.
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
bool Qore::Reflection::AbstractVariant::hasBody | ( | ) |
returns True if the variant has a code implementation; False if not (i.e. it is empty)
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
bool Qore::Reflection::AbstractVariant::isBuiltin | ( | ) |
returns True if the variant is a builtin variant
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
bool Qore::Reflection::AbstractVariant::isEqual | ( | AbstractVariant | variant | ) |
Returns True if the variant passed as an argument is equal to the current object; False if not.
variant | the variant to check with the current object for equality |
bool Qore::Reflection::AbstractVariant::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
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
bool Qore::Reflection::AbstractVariant::isMethodVariant | ( | ) |
returns True if the variant is a method variant but not a pseudo-method variant
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
bool Qore::Reflection::AbstractVariant::isPseudoMethodVariant | ( | ) |
returns True if the object is a pseudo-method variant
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
bool Qore::Reflection::AbstractVariant::isUser | ( | ) |
returns True if the variant is a user variant
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
int Qore::Reflection::AbstractVariant::numParams | ( | ) |
returns the number of parameters in the signature
PROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |
string Qore::Reflection::AbstractVariant::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
"::"
), and the function or method name followed by parameter types in parenthesesPROGRAM-ERROR | thrown if the Program object holding the function or method has been destroyed |