class Reflect

Available on all platforms

The Reflect API is a way to manipulate values dynamicly through an abstract interface in an untyped manner. Use with care.

Class Fields

static function callMethod(o:Dynamic, func:Dynamic, args:Array<Dynamic>):Dynamic

Call a method with the given object and arguments.

static function fields(o:Dynamic):Array<String>

Returns the fields of structure o.

This method is only guaranteed to work on anonymous structures. Refer to Type.getInstanceFields for a function supporting class instances.

If o is null, the result is unspecified.

static function isEnumValue(v:Dynamic):Bool

Tells if v is an enum value.

The result is true if v is of type EnumValue, i.e. an enum constructor.

Otherwise, including if v is null, the result is false.

static function isFunction(f:Dynamic):Bool

Returns true if f is a function, false otherwise.

If f is null, the result is false.