class Reflect
no package
The Reflect API is a way to manipulate values dynamically through an abstract interface in an untyped manner. Use with care.
See:
Static methods
staticcallMethod (o:Dynamic, func:Function, args:Array<Dynamic>):Dynamic
Call a method with the given object and arguments.
staticfields (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.
statichasField (o:Dynamic, field:String):Bool
Tells if structure o
has a field named field
.
This is only guaranteed to work for anonymous structures. Refer to
Type.getInstanceFields
for a function supporting class instances.
If o
or field
are null, the result is unspecified.
staticisFunction (f:Dynamic):Bool
Returns true if f
is a function, false otherwise.
If f
is null, the result is false.
staticmakeVarArgs (f:Array<Dynamic> ‑> Dynamic):Dynamic
staticmakeVarArgs (f:Array<Dynamic> ‑> Void):Dynamic
Transform a function taking an array of arguments into a function that can be called with any number of arguments.