classOf()

The classOf system function returns an Oxygene Class Reference for the type passed as parameter.

var lTypeOfPersoon: class of Person;
lTypeOfPersoon := classOf(Manager);
var lPerson: Persion := new lTypeOfPerson;

Here, lTypeOfPerson is assigned the specific sub-class reference of the Manager type. The class reference can then used to instantiate a new Manager instance dynamically or to call virtual static methods.

See Also