orange.util.Reflection

Members

Functions

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

hasField
template hasField(T, string field)

Evaluates to true if T has a field 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.

Meta

Authors

Jacob Carlborg

Version

Initial created: Oct 5, 2009