| Package | org.granite.reflect |
| Class | public class Annotation |
| Inheritance | Annotation DescribedElement |
See also
| Property | Defined by | ||
|---|---|---|---|
| annotatedElement : IAnnotatedElement
[read-only]
The
IAnnotatedElement (class, variable, method, etc.) to which
this annotation is attached. | Annotation | ||
| args : Array [read-only]
An array of
Arg instances that contains all arguments of this
annotation. | Annotation | ||
![]() | declaredBy : Type
The
Type instance this described element belongs to. | DescribedElement | |
| name : String [read-only]
The name of this annotation.
| Annotation | ||
| Method | Defined by | ||
|---|---|---|---|
|
Annotation(annotatedElement:IAnnotatedElement, desc:XML)
Constructs a new
Annotation instance. | Annotation | ||
![]() |
equals(o:*):Boolean
Tells if this
DescribedElement instance is equal to the supplied
o parameter. | DescribedElement | |
|
getArgValue(key:String = "", defaultValue:String = null):String
Returns the value of the first argument of this annotation whose key is equal
to the supplied parameter.
| Annotation | ||
|
getArgValues(key:String):Array
Returns an array that contains all values of the arguments of this annotation
whose key is equal to the supplied parameter.
| Annotation | ||
|
isArgPresent(key:String = ""):Boolean
Tests if this annotation has an argument whose key is equal to the supplied
parameter.
| Annotation | ||
![]() |
toString():String
Returns the a string (XML) representation of this described element.
| DescribedElement | |
| annotatedElement | property |
annotatedElement:IAnnotatedElement [read-only]
The IAnnotatedElement (class, variable, method, etc.) to which
this annotation is attached.
public function get annotatedElement():IAnnotatedElement
| args | property |
args:Array [read-only]
An array of Arg instances that contains all arguments of this
annotation.
public function get args():Array
See also
| name | property |
name:String [read-only]The name of this annotation.
Implementation public function get name():String
| Annotation | () | constructor |
public function Annotation(annotatedElement:IAnnotatedElement, desc:XML)
Constructs a new Annotation instance.
annotatedElement:IAnnotatedElement — the element (class, variable, method, etc.) to which
this annotation is attached.
|
|
desc:XML — the XML description of this annotation.
|
| getArgValue | () | method |
public function getArgValue(key:String = "", defaultValue:String = null):StringReturns the value of the first argument of this annotation whose key is equal to the supplied parameter.
Parameterskey:String (default = "") — the key (or name) of the argument to get value from ("" for the default
argument).
|
|
defaultValue:String (default = null) — the value to be returned if this annotation has no
such argument.
|
String — the argument value, or defaultValue if this annotation has no
such argument.
|
| getArgValues | () | method |
public function getArgValues(key:String):ArrayReturns an array that contains all values of the arguments of this annotation whose key is equal to the supplied parameter.
Parameterskey:String — key (or name) of the argument to get value from.
|
Array — the argument value, or null if this annotation has no
such argument.
|
| isArgPresent | () | method |
public function isArgPresent(key:String = ""):BooleanTests if this annotation has an argument whose key is equal to the supplied parameter.
Parameterskey:String (default = "") — key (or name) of the argument to check for ("" for the default
argument).
|
Boolean — true if this annotation holds an argurment with this name,
false otherwise.
|