This class provides some utility methods to work with types. It is best used through 'using haxe.macro.TypeTools' syntax and then provides additional methods on haxe.macro.Type instances.

Static methods

@:value({ isStatic : false })staticfindField(c:ClassType, name:String, isStatic:Bool = false):Null<ClassField>

Resolves the field named name on class c.

If isStatic is true, the classes' static fields are checked. Otherwise the classes' member fields are checked.

If the field is found, it is returned. Otherwise if c has a super class, findField recursively checks that super class. Otherwise null is returned.

If any argument is null, the result is unspecified.

statictoComplexType(type:Null<Type>):Null<ComplexType>

Returns a syntax-level type corresponding to Type t.

This function is mostly inverse to ComplexTypeTools.toType, but may lose some information on types that do not have a corresponding syntax version, such as monomorphs. In these cases, the result is null.

If t is null, an internal exception is thrown.