Package | flex.lang.reflect.metadata |
Class | public class MetaDataAnnotation |
Inheritance | MetaDataAnnotation ![]() |
Property | Defined By | ||
---|---|---|---|
arguments : Array [read-only]
Getter for retrieving an array of arguments specified for the metadata annotation. | MetaDataAnnotation | ||
defaultArgument : MetaDataArgument [read-only]
Returns the first unpaired argument of an annotation. | MetaDataAnnotation | ||
name : String [read-only]
Getter for retrieving the metadata annotation name. | MetaDataAnnotation |
Method | Defined By | ||
---|---|---|---|
MetaDataAnnotation(metaDataXML:XML)
Constructor
Parses nodes returned from a call to describeType to provide an
object wrapper for annotations
Expected format of the argument is
| MetaDataAnnotation | ||
equals(item:MetaDataAnnotation):Boolean
Compares two MetaDataAnnotations for name and argument equality
| MetaDataAnnotation | ||
getArgument(key:String, caseInsensitive:Boolean = false):MetaDataArgument
Returns the MetaDataArgument associated with a given argument using the argument's key
| MetaDataAnnotation | ||
hasArgument(key:String, caseInsensitive:Boolean = false):Boolean
Checks for the existance of a given argument within this annotation using the argument's key
| MetaDataAnnotation |
Method | Defined By | ||
---|---|---|---|
buildArguments():Array
Builds an array of MetaDataArguments from metadata nodes
| MetaDataAnnotation |
arguments | property |
arguments:Array
[read-only] Getter for retrieving an array of arguments specified for the metadata annotation. Given the following example [Test(async="true",expects="TypeError")] async="true" and expects="TypeError" are the arguments
public function get arguments():Array
defaultArgument | property |
defaultArgument:MetaDataArgument
[read-only] Returns the first unpaired argument of an annotation. Given the following example [RunWith("org.flexunit.runners.Suite",order="1")] The default argument would be "org.flexunit.runners.Suite". This is often used with MetaData such as RunWith which expects to have a default value.
public function get defaultArgument():MetaDataArgument
name | property |
name:String
[read-only] Getter for retrieving the metadata annotation name. Given the following example [Test(async='true',expects="TypeError")] Test is the annotation name.
public function get name():String
MetaDataAnnotation | () | Constructor |
public function MetaDataAnnotation(metaDataXML:XML)
Constructor
Parses nodes returned from a call to describeType
to provide an
object wrapper for annotations
Expected format of the argument is
metaDataXML:XML — XML node.
|
buildArguments | () | method |
protected function buildArguments():Array
Builds an array of MetaDataArguments from metadata nodes
ReturnsArray — Returns an array containing MetaDataArgument instances.
|
equals | () | method |
public function equals(item:MetaDataAnnotation):Boolean
Compares two MetaDataAnnotations for name and argument equality
Parameters
item:MetaDataAnnotation |
Boolean — Returns boolean indicating equality
|
getArgument | () | method |
public function getArgument(key:String, caseInsensitive:Boolean = false):MetaDataArgument
Returns the MetaDataArgument associated with a given argument using the argument's key
Parameters
key:String — An argument key
| |
caseInsensitive:Boolean (default = false ) — default false, if set to true, then the key is matched in a case insensitive manner.
|
MetaDataArgument — the MetaDataArgument instance for the argument key, or null if it was not found.
|
hasArgument | () | method |
public function hasArgument(key:String, caseInsensitive:Boolean = false):Boolean
Checks for the existance of a given argument within this annotation using the argument's key
Parameters
key:String — An argument key
| |
caseInsensitive:Boolean (default = false ) — default false, if set to true, then the key is matched in a case insensitive manner.
|
Boolean — Returns true if the key exists, false if it does not.
|
See also