haXe API Documentation
Back |
Indexclass Type
Available in flash8, neko, js, flash, php, cpp, cs, java
The haXe Reflection API enables you to retreive informations about any value,
Classes and Enums at runtime.
- static function allEnums<T>(e : Enum<T>) : Array<T>
- Returns the list of all enum values that don't take any parameter.
- static function createEmptyInstance<T>(cl : Class<T>) : T
- Similar to
Reflect.createInstance
excepts that the constructor is not called.
This enables you to create an instance without any side-effect. - static function createEnum<T>(e : Enum<T>, constr : String, ?params : Array<Dynamic>) : T
- Create an instance of an enum by using a constructor name and parameters.
- static function createEnumIndex<T>(e : Enum<T>, index : Int, ?params : Array<Dynamic>) : T
- Create an instance of an enum by using a constructor index and parameters.
- static function createInstance<T>(cl : Class<T>, args : Array<Dynamic>) : T
- Creates an instance of the given class with the list of constructor arguments.
- static function enumConstructor(e : EnumValue) : String
- Returns the constructor of an enum
- static function enumEq<T>(a : T, b : T) : Bool
- Recursively compare two enums constructors and parameters.
- static function enumIndex(e : EnumValue) : Int
- Returns the index of the constructor of an enum
- static function enumParameters(e : EnumValue) : Array<Dynamic>
- Returns the parameters of an enum
- static function getClass<T>(o : T) : Class<T>
- Returns the class of a value or
null
if this value is not a Class instance. - static function getClassFields(c : Class<Dynamic>) : Array<String>
- Returns the list of a class static fields.
- static function getClassName(c : Class<Dynamic>) : String
- Returns the complete name of a class.
- static function getEnum(o : EnumValue) : Enum<Dynamic>
- Returns the enum of a value or
null
if this value is not an Enum instance. - static function getEnumConstructs(e : Enum<Dynamic>) : Array<String>
- Returns all the available constructor names for an enum.
- static function getEnumName(e : Enum<Dynamic>) : String
- Returns the complete name of an enum.
- static function getInstanceFields(c : Class<Dynamic>) : Array<String>
- Returns the list of instance fields.
- static function getSuperClass(c : Class<Dynamic>) : Class<Dynamic>
- Returns the super-class of a class, or null if no super class.
- static function resolveClass(name : String) : Class<Dynamic>
- Evaluates a class from a name. The class must have been compiled
to be accessible.
- static function resolveEnum(name : String) : Enum<Dynamic>
- Evaluates an enum from a name. The enum must have been compiled
to be accessible.
- static function typeof(v : Dynamic) : ValueType
- Returns the runtime type of a value.
Back |
Index