mambo.util.Reflection

Members

Functions

callWithNamedArguments
void callWithNamedArguments()

Calls the given function with named arguments

factory
T factory(string name)

Creates a new instance of class with the given name

getClassNames
string[] getClassNames()

Gets all the class names in the given string of D code

getValueOfField
U getValueOfField(T t)

Gets the value of the field with the given name

newInstance
Object newInstance(ClassInfo classInfo)

Returns a new instnace of the class associated with the given class info.

newInstance
Object newInstance(string name)

Return a new instance of the class with the given name.

setValueOfField
void setValueOfField(T t, U value)

Sets the given value to the filed with the given name

Templates

TypeOfField
template TypeOfField(T, string field)

Evaluates to the type of the field with the given name

fieldsOf
template fieldsOf(T)

Evaluates to an array of strings containing the names of the fields in the given type

fieldsOfImpl
template fieldsOfImpl(T, size_t i)

Implementation for fieldsOf

functionNameOf
template functionNameOf(alias func)

Returns the name of the given function

hasClassMethod
template hasClassMethod(T, string method)

Evaluates to true if T has a class method with the given name

hasField
template hasField(T, string field)

Evaluates to true if T has a field with the given name

hasInstanceMethod
template hasInstanceMethod(T, string method)

Evaluates to true if T has a instance method with the given name

hasMethod
template hasMethod(T, string method)

Evaluates to true if T has a either a class method or a instance method with the given name

nameOfFieldAt
template nameOfFieldAt(T, size_t position)

Evaluates to a string containing the name of the field at given position in the given type.

parameterNamesOf
template parameterNamesOf(alias func)

Returns the parameter names of the given function

Meta

Authors

Jacob Carlborg

Version

Initial created: Oct 5, 2009