Qore reflection Module  0.9.1
Qore::Reflection::AbstractReflectionFunction Class Reference

The abstract base class for Qore functions and class methods. More...

Inheritance diagram for Qore::Reflection::AbstractReflectionFunction:
Qore::Reflection::AbstractMethod Qore::Reflection::Function Qore::Reflection::ConstructorMethod Qore::Reflection::CopyMethod Qore::Reflection::DestructorMethod Qore::Reflection::NormalMethod Qore::Reflection::PseudoMethod Qore::Reflection::StaticMethod

Public Member Methods

 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...
 

Detailed Description

The abstract base class for Qore functions and class methods.

Restrictions:
Qore::PO_NO_REFLECTION

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

Since
Qore 0.9.0

Member Function Documentation

◆ constructor()

Qore::Reflection::AbstractReflectionFunction::constructor ( )

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

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

◆ getName()

string Qore::Reflection::AbstractReflectionFunction::getName ( )

returns the function or method name

Code Flags:
RET_VALUE_ONLY
Example:
string name = f.getName();
Returns
the function or method name
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed

◆ isBuiltin()

bool Qore::Reflection::AbstractReflectionFunction::isBuiltin ( )

returns True if the function or method is a builtin function or method

Code Flags:
RET_VALUE_ONLY
Example:
bool b = f.isBuiltin();
Returns
True if the function or method is a builtin function or method
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed
Note
complementary to isUser()

◆ isEqual()

bool Qore::Reflection::AbstractReflectionFunction::isEqual ( AbstractReflectionFunction  func)

Returns True if the function or method object passed as an argument is equal to the current object; False if not.

Code Flags:
CONSTANT
Example:
bool b = f1.isEqual(f2);
Parameters
functhe function or method object to check with the current object for equality
Returns
True if the object passed as an argument is equal to the current object; False if not
Note
if this method is called on user functions or methods created from the same source code but in different Program containers, it will return False

◆ isInjected()

bool Qore::Reflection::AbstractReflectionFunction::isInjected ( )

returns True if the function or method has been injected as a dependency injection

Code Flags:
RET_VALUE_ONLY
Example:
bool b = f.isInjected();
Returns
True if the function or method has been injected as a dependency injection
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed

◆ isMethod()

bool Qore::Reflection::AbstractReflectionFunction::isMethod ( )

returns True if the object is a method but not a pseudo-method

Code Flags:
RET_VALUE_ONLY
Example:
bool b = f.isMethod();
Returns
True if the object is a method but not a pseudo-method
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed

◆ isPseudoMethod()

bool Qore::Reflection::AbstractReflectionFunction::isPseudoMethod ( )

returns True if the object is a pseudo-method

Code Flags:
RET_VALUE_ONLY
Example:
bool b = f.isPseudoMethod();
Returns
True if the object is a pseudo-method
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed

◆ isUser()

bool Qore::Reflection::AbstractReflectionFunction::isUser ( )

returns True if the function or method is a user function or method

Code Flags:
RET_VALUE_ONLY
Example:
bool b = f.isUser();
Returns
True if the function or method is a user function or method
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed
Note
complementary to isBuiltin()

◆ numVariants()

int Qore::Reflection::AbstractReflectionFunction::numVariants ( )

returns the number of variants implemented by the function or method

Code Flags:
RET_VALUE_ONLY
Example:
int n = f.numVariants();
Returns
the number of variants implemented by the function or method
Exceptions
PROGRAM-ERRORthrown if the Program object holding the function or method has been destroyed

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