class Namespace

This class wraps a ferite namespace and provides mechanisms to query it's contents.

class contents [NB. Highlighted attributes are static members]
Functions
function constructor(void) - This function taks a namespace and constructs a wrapper
function fullyQualifiedName() - Find the fully qualified name of the wrapped namespace.
function getClasses() - Fetch an array containing names of all the classes within the namespace
function getFunction(string) - Creates a new Function object from a function in this class
function getFunctions() - Fetch an array containing names of all the functions within the namespace
function getNamespace() - Fetch a variable containing the namespace that this object wraps.
function getNamespaces() - Fetch an array containing names of all the namespaces within the namespace
function getScriptNamespace() - Fetch a namespace object wrapping the main script namespace.
function getVariables() - Fetch an array containing names to types mapping of all the variables within the namespace

Functions

function constructor Click to go up to the list
This function taks a namespace and constructs a wrapper
Declaration:
    function constructor( void ns )
Description:
This function takes a namespace in the form of new Namespace(Sys)
Parameters:
    Parameter #1: void ns - The namespace to wrap

function fullyQualifiedName Click to go up to the list
Find the fully qualified name of the wrapped namespace.
Declaration:
    function fullyQualifiedName()
Returns:
    A string with the fully qualified name, such as "Stream.StdioStream".

function getClasses Click to go up to the list
Fetch an array containing names of all the classes within the namespace
Declaration:
    function getClasses()
Returns:
    An array

function getFunction Click to go up to the list
Creates a new Function object from a function in this class
Declaration:
    function getFunction( string name )
Description:
This function creates a new Function object which is associated with the specified method of the class associated with this "Class" object.
Parameters:
    Parameter #1: string name - The name of the method
Returns:
    A new Function object, or null on failure
Example:

namespace Test {
    number id;
    static function test( number n )
        .id = n;
}
object o = new Namespace(Test);
object f = o.getFunction('test');


function getFunctions Click to go up to the list
Fetch an array containing names of all the functions within the namespace
Declaration:
    function getFunctions()
Returns:
    An array

function getNamespace Click to go up to the list
Fetch a variable containing the namespace that this object wraps.
Declaration:
    function getNamespace()
Returns:
    A void variable that has been morphed into a namespace.

function getNamespaces Click to go up to the list
Fetch an array containing names of all the namespaces within the namespace
Declaration:
    function getNamespaces()
Returns:
    An array

static function getScriptNamespace Click to go up to the list
Fetch a namespace object wrapping the main script namespace.
Declaration:
    function getScriptNamespace()
Returns:
    A namespace object on success, null otherwise.

function getVariables Click to go up to the list
Fetch an array containing names to types mapping of all the variables within the namespace
Declaration:
    function getVariables()
Description:
This function allows you to inspect the contents of the namespace. The returned array has the types as the elements with the names of the variables mapped ot the index. e.g. [ 'f' => 'string' ]
Returns:
    An associative array

Automatically generated at 12:07PM, Wednesday 25 May 2005 by feritedoc.