Packageorg.spicefactory.lib.reflect.mapping
Classpublic class MemberTagMap
InheritanceMemberTagMap Inheritance Object

Represents the metadata tags placed upon a single member of a class.



Public Methods
 MethodDefined By
  
MemberTagMap(unresolved:Array = null, owner:MetadataAware = null)
Creates a new instance.
MemberTagMap
  
getAllMetadata(validate:Boolean):Array
Returns all metadata tags for this type in no particular order.
MemberTagMap
  
getMetadata(type:Object, validate:Boolean):Array
Returns all metadata tags for the specified type for this element.
MemberTagMap
  
hasMetadata(type:Object):Boolean
Indicates whether this element has at least one metadata tag of the specified type.
MemberTagMap
Public Constants
 ConstantDefined By
  EMPTY : MemberTagMap
[static]
MemberTagMap
Constructor Detail
MemberTagMap()Constructor
public function MemberTagMap(unresolved:Array = null, owner:MetadataAware = null)

Creates a new instance.

Parameters
unresolved:Array (default = null) — the unresolved metadata tags (formatted as returned by describeTypeJSON)
 
owner:MetadataAware (default = null) — the member the tags are placed upon
Method Detail
getAllMetadata()method
public function getAllMetadata(validate:Boolean):Array

Returns all metadata tags for this type in no particular order.

Parameters

validate:Boolean — whether the returned objects should be validated (applies only for metadata mapped to custom classes)

Returns
Array — all metadata tags for this type
getMetadata()method 
public function getMetadata(type:Object, validate:Boolean):Array

Returns all metadata tags for the specified type for this element. If no tag for the specified type exists an empty Array will be returned.

In case you registered a custom metadata class for the specified name, an Array of instances of that class is returned. You must use a parameter of type Class specifying the mapped metadata class for the type parameter then.

Otherwise an Array of instances of the generic Metadata class is returned. In this case you use the name of the metadata tag as a String for the type parameter.

Parameters

type:Object — for mapped metadata the mapped class otherwise the name of the metadata tag as a String.
 
validate:Boolean — whether the returned objects should be validated (applies only for metadata mapped to custom classes)

Returns
Array — all metadata tags for the specified type for this element
hasMetadata()method 
public function hasMetadata(type:Object):Boolean

Indicates whether this element has at least one metadata tag of the specified type.

In case you registered a custom metadata class for the specified name, you must use a parameter of type Class specifying the mapped metadata class. Otherwise you use the name of the metadata tag as a String for the type parameter.

Parameters

type:Object — for mapped metadata the mapped class otherwise the name of the metadata tag as a String.

Returns
Boolean — true if this element has at least one metadata tag of the specified type
Constant Detail
EMPTYConstant
public static const EMPTY:MemberTagMap