Package | org.spicefactory.lib.reflect |
Class | public class Metadata |
Inheritance | Metadata Object |
Property | Defined By | ||
---|---|---|---|
name : String [read-only]
The name of the metadata tag. | Metadata |
Method | Defined By | ||
---|---|---|---|
getArgument(key:String):String
Returns the argument for the specified key as a String or null if no such argument exists. | Metadata | ||
getDefaultArgument():String
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 |
name | property |
name:String
[read-only] The name of the metadata tag.
public function get name():String
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 |
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")]
).
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
|