haXe API Documentation
Back | Index
class Reflect
Available in flash, neko, js, flash9, php, cpp
The Reflect API is a way to manipulate values dynamicly through an abstract interface in an untyped manner. Use with care.
static inline function callMethod(o : Dynamic, func : Dynamic, args : Array<Dynamic>) : Dynamic
Available in flash, neko, js, flash9
Call a method with the given object and arguments.
static function callMethod(o : Dynamic, func : Dynamic, args : Array<Dynamic>) : Dynamic
Available in php, cpp
Call a method with the given object and arguments.
static function compare<T>(a : T, b : T) : Int
Available in flash, js, flash9, php, cpp
Generic comparison function, does not work for methods, see compareMethods
static inline function compare<T>(a : T, b : T) : Int
Available in neko
Generic comparison function, does not work for methods, see compareMethods
static function compareMethods(f1 : Dynamic, f2 : Dynamic) : Bool
Available in flash, js, flash9, php, cpp
Compare two methods closures. Returns true if it's the same method of the same instance. Does not work on Neko platform.
static inline function compareMethods(f1 : Dynamic, f2 : Dynamic) : Bool
Available in neko
Compare two methods closures. Returns true if it's the same method of the same instance. Does not work on Neko platform.
static function copy<T>(o : T) : T
Available in flash, js, flash9, php, cpp
Make a copy of the fields of an object.
static inline function copy<T>(o : T) : T
Available in neko
Make a copy of the fields of an object.
static function deleteField(o : Dynamic, f : String) : Bool
Available in flash, js, flash9, php, cpp
Delete an object field.
static inline function deleteField(o : Dynamic, f : String) : Bool
Available in neko
Delete an object field.
static inline function field(o : Dynamic, field : String) : Dynamic
Available in flash, neko, js, flash9
Returns the field of an object, or null if o is not an object or doesn't have this field.
static function field(o : Dynamic, field : String) : Dynamic
Available in php, cpp
Returns the field of an object, or null if o is not an object or doesn't have this field.
static function fields(o : Dynamic) : Array<String>
Returns the list of fields of an object, excluding its prototype (class methods).
static inline function hasField(o : Dynamic, field : String) : Bool
Available in flash, php
Tells if an object has a field set. This doesn't take into account the object prototype (class methods).
static function hasField(o : Dynamic, field : String) : Bool
Available in neko, js, flash9, cpp
Tells if an object has a field set. This doesn't take into account the object prototype (class methods).
static function isFunction(f : Dynamic) : Bool
Tells if a value is a function or not.
static function isObject(v : Dynamic) : Bool

Tells if a value is an object or not.

static function makeVarArgs(f : Array<Dynamic> -> Dynamic) : Dynamic
Transform a function taking an array of arguments into a function that can be called with any number of arguments.
static inline function setField(o : Dynamic, field : String, value : Dynamic) : Void
Set an object field value.
Back | Index