| Qore reflection Module 1.14.0

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Qore::Reflection::AbstractMethodVariant Class Reference

The abstract base class for Qore class variants. More...

`#include <QC_AbstractMethodVariant.dox.h>`

Inheritance diagram for Qore::Reflection::AbstractMethodVariant:

## Public Member Functions
| constructor ()
| Throws an exception if called directly; this class can only be instantiated by builtin subclasses.
string | getAccessModifierString ()
| returns a string for the access modifier for the method variant
AbstractClass | getClass ()
| Returns the class for the variant.
AbstractMethod | getMethod ()
| Returns the method for the method variant.
bool | isAbstract ()
| returns True if the variant is abstract
bool | isFinal ()
| returns True if the variant is final
Public Member Functions inherited from Qore::Reflection::AbstractVariant
| constructor ()
| Throws an exception if called directly; this class can only be instantiated by builtin subclasses.
bool | empty ()
| returns True if the variant has no code implementation; False if it does
list< string > | getCodeFlagList ()
| returns a list of strings of code flags describing the variant
int | getCodeFlags ()
| returns a bitfield of code flags describing the variant
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
int | getDomain ()
| returns the functional domain of the variant (for builtin variants only) as a bitfield of Functional Domain Constants
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
AbstractReflectionFunction | getFunction ()
| Returns the abstract function object that contains the variant.
list< string > | getModifierList ()
| returns a list of strings of modifiers describing the variant
int | getModifiers ()
| returns a bitfield of modifiers describing the variant
list< string > | getParamNames ()
| returns a list of parameter variable name for the variant; if the variant has no parameters, an empty list is returned
string | getParamString ()
| returns a string giving a list of the parameters of the variant, including types, variable names, and default values
list< Type > | getParamTypes ()
| returns a list of parameter types for the variant; if the variant has no parameters, an empty list is returned
Type | getReturnType ()
| returns the return type of the variant
string | getReturnTypeString ()
| returns a string for the return type
hash< SourceLocationInfo > | getSourceLocation ()
| Returns the source location of the variant declaration.
bool | hasBody ()
| returns True if the variant has a code implementation; False if not (i.e. it is empty)
bool | isBuiltin ()
| returns True if the variant is a builtin variant
bool | isEqual (AbstractVariant variant)
| Returns True if the variant passed as an argument is equal to the current object; False if not.
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
bool | isMethodVariant ()
| returns True if the variant is a method variant but not a pseudo-method variant
bool | isPseudoMethodVariant ()
| returns True if the object is a pseudo-method variant
bool | isUser ()
| returns True if the variant is a user variant
int | numParams ()
| returns the number of parameters in the signature
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

## Detailed Description

The abstract base class for Qore class variants.

Restrictions:
  Qore::PO_NO_REFLECTION

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

See also
  AbstractMethod

Since
  Qore 0.9.0

## Member Function Documentation

## ◆ constructor()

Qore::Reflection::AbstractMethodVariant::constructor | ( |  | ) |

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

Exceptions

  ABSTRACTMETHODVARIANT-CONSTRUCTOR-ERROR | this exception is thrown if this class is constructed directly (also if directly inherited by user classes)

## ◆ getAccessModifierString()

string Qore::Reflection::AbstractMethodVariant::getAccessModifierString | ( |  | ) |

returns a string for the access modifier for the method variant

Code Flags:
  RET_VALUE_ONLY

Example:
  string str = v.getAccessModifierString();

Returns
  a string for the access modifier for the method variant; possible values are:
  - `"private"`: gives the accessibility of the variant
  - `"private:internal"`: gives the accessibility of the variant
  - `"public"`: gives the accessibility of the variant

Exceptions

  PROGRAM-ERROR | thrown if the Program object holding the class has been destroyed

## ◆ getClass()

AbstractClass Qore::Reflection::AbstractMethodVariant::getClass | ( |  | ) |

Returns the class for the variant.

Code Flags:
  CONSTANT

Example:
  AbstractClass cls = v.getClass();

Returns
  the class for the variant

## ◆ getMethod()

AbstractMethod Qore::Reflection::AbstractMethodVariant::getMethod | ( |  | ) |

Returns the method for the method variant.

Returns
  the method for the method variant

Code Flags:
  CONSTANT

Example:
  AbbstractMethod m = v.getMethod();

## ◆ isAbstract()

bool Qore::Reflection::AbstractMethodVariant::isAbstract | ( |  | ) |

returns True if the variant is abstract

Code Flags:
  RET_VALUE_ONLY

Example:
  bool b = v.isAbstract();

Returns
  True if the variant is abstract

Exceptions

  PROGRAM-ERROR | thrown if the Program object holding the class and method has been destroyed

## ◆ isFinal()

bool Qore::Reflection::AbstractMethodVariant::isFinal | ( |  | ) |

returns True if the variant is final

Code Flags:
  RET_VALUE_ONLY

Example:
  bool b = v.isFinal();

Returns
  True if the variant is final

Exceptions

  PROGRAM-ERROR | thrown if the Program object holding the class and method has been destroyed

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

- modules/reflection/src/QC_AbstractMethodVariant.dox.h