class Type
Available on all platforms
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.
Class Fields
static function enumEq<T>(a:T, b:T):Bool
Recursively compares two enum instances a
and b
by value.
Unlike a == b
, this function performs a deep equality check on the
arguments of the constructors, if exists.
If a
or b
are null, the result is unspecified.
static function getClass<T>(o:T):Class<T>
Returns the class of o
, if o
is a class instance.
If o
is null or of a different type, null is returned.
In general, type parameter information cannot be obtained at runtime.
static function getClassName(c:Class<Dynamic>):String
Returns the name of class c
, including its path.
If c
is inside a package, the package structure is returned dot-
separated, with another dot separating the class name:
pack1.pack2.(...).packN.ClassName
If c
is a sub-type of a haxe module, that module is not part of the
package structure.
If c
has no package, the class name is returned.
If c
is null, the result is unspecified.
The class name does not include any type parameters.
static function getInstanceFields(c:Class<Dynamic>):Array<String>
Returns a list of the instance fields of class c
.
This only includes fields which are known at compile-time. In particular, using getInstanceFields(getClass(obj)) will not include any fields which were added to obj at runtime.
The order of the fields in the returned Array is unspecified.
If c
is null, the result is unspecified.
(As3) This method only returns instance fields that are public.