typedef haxe.macro.MetaAccess
import haxe.macro.Type;
Available on all platforms
MetaAccess is a wrapper for the Metadata
array. It can be used to add
metadata to and remove metadata from its origin.
function remove(name:String):Void
Removes all name
metadata entries from the origin of this
MetaAccess.
This method might clear several metadata entries of the same name.
If a Metadata
array is obtained through a call to get
, a subsequent
call to remove
has no effect on that array.
If name
is null, compilation fails with an error.
function has(name:String):Bool
Tells if the origin of this
MetaAccess has a name
metadata entry.
If name
is null, compilation fails with an error.
Return the wrapped Metadata
array.
Modifying this array has no effect on the origin of this
MetaAccess.
The add
and remove
methods can be used for that.
function add(name:String, params:Array<Expr>, pos:Position):Void
Adds the metadata specified by name
, params
and pos
to the origin
of this
MetaAccess.
Metadata names are not unique during compilation, so this method never overwrites a previous metadata.
If a Metadata
array is obtained through a call to get
, a subsequent
call to add
has no effect on that array.
If any argument is null, compilation fails with an error.