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

See also:

Static methods

staticcopy<T>(o:Null<T>):Null<T>

Copies the fields of structure o.

This is only guaranteed to work on anonymous structures.

If o is null, the result is null.

staticfield(o:Dynamic, field:String):Dynamic

Returns the value of the field named field on object o.

If o is not an object or has no field named field, the result is null.

If the field is defined as a property, its accessors are ignored. Refer to Reflect.getProperty for a function supporting property accessors.

If field is null, the result is unspecified.

@:has_untypedstaticfields(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.