| Package | org.granite.reflect |
| Interface | public interface IAnnotatedElement |
| Implementors | Member, Type |
Possible annotated elements in ActionScript 3 are classes/interfaces, constansts, variables accessors (get/set) and methods. Annotations on constructors are not supported.
| Property | Defined by | ||
|---|---|---|---|
| annotations : Array [read-only]
An array that contains all annotations directly attached to this
IAnnotatedElement. | IAnnotatedElement | ||
| Method | Defined by | ||
|---|---|---|---|
|
getAnnotation(type:String, recursive:Boolean = false):Annotation
Returns the first
Annotation whose name is equal to the supplied type parameter,
attached to this IAnnotatedElement. | IAnnotatedElement | ||
|
getAnnotations(recursive:Boolean = false, pattern:String = "^_?[^_]"):Array
Returns an array (possibly empty) that contains all annotations attached to this
IAnnotatedElement. | IAnnotatedElement | ||
|
isAnnotationPresent(type:String, recursive:Boolean = false):Boolean
Tests if an
Annotation, whose name is equal to the supplied type parameter, is attached
to this IAnnotatedElement. | IAnnotatedElement | ||
| annotations | property |
annotations:Array [read-only]
An array that contains all annotations directly attached to this IAnnotatedElement.
public function get annotations():Array
See also
| getAnnotation | () | method |
public function getAnnotation(type:String, recursive:Boolean = false):Annotation
Returns the first Annotation whose name is equal to the supplied type parameter,
attached to this IAnnotatedElement.
type:String — the name of the annotation to look for.
|
|
recursive:Boolean (default = false) — should we look for annotations attached to overridden elements (non-static
accessors or methods) or superclasses/superinterfaces ?
|
Annotation —
an Annotation instance or null if it cannot be found.
|
See also
| getAnnotations | () | method |
public function getAnnotations(recursive:Boolean = false, pattern:String = "^_?[^_]"):Array
Returns an array (possibly empty) that contains all annotations attached to this
IAnnotatedElement.
recursive:Boolean (default = false) — should we look for annotations attached to overridden elements (non-static
accessors or methods) or superclasses/superinterfaces ?
|
|
pattern:String (default = "^_?[^_]") — a regexp expression used as a filter. Default is to eliminate all annotations
prefixed with a double '_' character. You may use this parameter to find all
annotations with a specific name.
|
Array — an array that contains all annotations attached to this IAnnotatedElement.
|
See also
| isAnnotationPresent | () | method |
public function isAnnotationPresent(type:String, recursive:Boolean = false):Boolean
Tests if an Annotation, whose name is equal to the supplied type parameter, is attached
to this IAnnotatedElement.
type:String — the name of the annotation to look for.
|
|
recursive:Boolean (default = false) — should we look for annotations attached to overridden elements (non-static
accessors or methods) or superclasses/superinterfaces ?
|
Boolean — true if the annotation can be found, false otherwise.
|
See also