Packageorg.spicefactory.lib.reflect
Classpublic class Metadata
InheritanceMetadata Inheritance Object

Represents a single metadata tag associated with a class, property or method declaration.



Public Properties
 PropertyDefined By
  name : String
[read-only] The name of the metadata tag.
Metadata
Public Methods
 MethodDefined By
  
getArgument(key:String):String
Returns the argument for the specified key as a String or null if no such argument exists.
Metadata
  
Returns the default argument as a String or null if no such argument exists.
Metadata
  
registerMetadataClass(metadataClass:Class, appDomain:ApplicationDomain = null):void
[static] Registers a custom Class for representing metadata tags.
Metadata
Property Detail
nameproperty
name:String  [read-only]

The name of the metadata tag.


Implementation
    public function get name():String
Method Detail
getArgument()method
public function getArgument(key:String):String

Returns the argument for the specified key as a String or null if no such argument exists.

Parameters

key:String

Returns
String — the argument for the specified key as a String or null if no such argument exists
getDefaultArgument()method 
public function getDefaultArgument():String

Returns the default argument as a String or null if no such argument exists. The default argument is the value that was specified without an excplicit key (e.g. [Meta("someValue")] compared to [Meta(key="someValue")]).

Returns
String — the default argument as a String or null if no such argument exists
registerMetadataClass()method 
public static function registerMetadataClass(metadataClass:Class, appDomain:ApplicationDomain = null):void

Registers a custom Class for representing metadata tags. If no custom Class is registered for a particular tag an instance of this generic Metadata class will be used to represent the tag and its arguments. For type-safe access to such tags a custom Class can be registered. In this case the arguments of the metadata tag will be mapped to the corresponding properties with the same name. Type conversion occurs automatically if necessary. If the builtin basic Converters are not sufficient for a particular type you can register custom Converter instances with the Converters class. Arguments on the metadata tag without a matching property will be silently ignored.

The specified metadata class should be annotated itself with a [Metadata] tag. See the documentation for the MappedMetadata class for details.

Parameters

metadataClass:Class — the custom Class to use for representing that tag
 
appDomain:ApplicationDomain (default = null) — the ApplicationDomain to use for loading classes when reflecting on the specified Metadata class