| Package | flex.lang.reflect |
| Class | public class Method |
| Inheritance | Method Object |
| Property | Defined By | ||
|---|---|---|---|
| declaringClass : Class [read-only]
Returns the the class where this Method is defined. | Method | ||
| elementType : Class [read-only]
If the return type is an array, returns the type of each element
| Method | ||
| isStatic : Boolean [read-only]
Returns true if the method is static and false if it is an instance method
| Method | ||
| metadata : Array [read-only]
Returns an array of MetaDataAnnotation instances associated with this
Method. | Method | ||
| methodXML : XML [read-only]
Returns the XML used to build this Method
| Method | ||
| name : String [read-only]
Returns the name of the Method
| Method | ||
| parameterTypes : Array [read-only]
Returns the Method parameter types as an array. | Method | ||
| returnType : Class [read-only]
Returns the return type of the Method
| Method | ||
| Method | Defined By | ||
|---|---|---|---|
Method(methodXML:XML, isStatic:Boolean = false)
Constructor
Parses <method/> nodes returned from a call to <code>describeType</code> to provide an
object wrapper for Methods
Expected format of the argument is
<method name="someMethod" declaredBy="tests::SomeClass" returnType="void">
<metadata name="Before">
<arg key="order" value="2"/>
</metadata>
</method>
| Method | ||
apply(obj:Object, argArray:*):*
Calls apply on the method
| Method | ||
Clones the existing method
| Method | ||
Compares two Method instances for equality
| Method | ||
getMetaData(name:String):MetaDataAnnotation
Returns the MetaDataAnnotation associated with a given annotation using the annotation's name
| Method | ||
hasMetaData(name:String):Boolean
Checks for the existance of a metadata annotation using the annotation's name
| Method | ||
invoke(obj:Object, ... args):Object
Calls apply on the method
| Method | ||
| declaringClass | property |
declaringClass:Class [read-only]
Returns the the class where this Method is defined.
public function get declaringClass():Class| elementType | property |
elementType:Class [read-only] If the return type is an array, returns the type of each element
public function get elementType():Class| isStatic | property |
isStatic:Boolean [read-only] Returns true if the method is static and false if it is an instance method
public function get isStatic():Boolean| metadata | property |
metadata:Array [read-only]
Returns an array of MetaDataAnnotation instances associated with this
Method.
public function get metadata():Array| methodXML | property |
methodXML:XML [read-only]
Returns the XML used to build this Method
public function get methodXML():XML| name | property |
name:String [read-only]
Returns the name of the Method
public function get name():String| parameterTypes | property |
parameterTypes:Array [read-only]
Returns the Method parameter types as an array.
public function get parameterTypes():Array| returnType | property |
returnType:Class [read-only]
Returns the return type of the Method
public function get returnType():Class| Method | () | Constructor |
public function Method(methodXML:XML, isStatic:Boolean = false)Constructor Parses <method/> nodes returned from a call to <code>describeType</code> to provide an object wrapper for Methods Expected format of the argument is <method name="someMethod" declaredBy="tests::SomeClass" returnType="void"> <metadata name="Before"> <arg key="order" value="2"/> </metadata> </method>
ParametersmethodXML:XML — <metadata/> XML node.
| |
isStatic:Boolean (default = false) |
| apply | () | method |
public function apply(obj:Object, argArray:*):*
Calls apply on the method
Parameters
obj:Object — the item to call
| |
argArray:* — the paramaters to call with apply, if any
|
* — return value of the method
|
See also
| clone | () | method |
| equals | () | method |
public function equals(item:Method):BooleanCompares two Method instances for equality
Parameters
item:Method |
Boolean — Returns boolean indicating equality
|
| getMetaData | () | method |
public function getMetaData(name:String):MetaDataAnnotationReturns the MetaDataAnnotation associated with a given annotation using the annotation's name
Parameters
name:String — the name of the annotation
|
MetaDataAnnotation — the MetaDataAnnotation instance for the annotation name, or null if it was not found.
|
| hasMetaData | () | method |
public function hasMetaData(name:String):BooleanChecks for the existance of a metadata annotation using the annotation's name
Parameters
name:String — the name of the annotation
|
Boolean — Returns true if the annotation exists, false if it does not.
|
See also
| invoke | () | method |
public function invoke(obj:Object, ... args):Object
Calls apply on the method
Parameters
obj:Object — the item to call
| |
... args — the paramaters to call with apply, if any
|
Object — return value of the method
|
See also