PureMVC Framework for Haxe: API Documentation
Back | Index
class Type

The haxe Reflection API allows retrieval of type information at runtime.

This class complements the more lightweight Reflect class, with a focus on class and enum instances.

static function createInstance<T>(cl : Class<T>, args : Array<Dynamic>) : T

  Creates an instance of class `cl`, using `args` as arguments to the class constructor.

  This function guarantees that the class constructor is called.

  Default values of constructors arguments are not guaranteed to be taken into account.

  If `cl` or `args` are null, or if the number of elements in `args` does not match the expected number of constructor arguments, or if any argument has an invalid type, or if `cl` has no own constructor, the result is unspecified.

  In particular, default values of constructor arguments are not guaranteed to be taken into account.

Back | Index