Packageorg.spicefactory.lib.reflect
Classpublic class Method
InheritanceMethod Inheritance FunctionBase Inheritance Member Inheritance MetadataAware Inheritance Object

Represents a single method.



Public Properties
 PropertyDefined By
 InheriteddeclaredBy : ClassInfo
[read-only] The type declaring this member.
Member
  isStatic : Boolean
[read-only] Determines if the method represented by this instance is static.
Method
 Inheritedname : String
[read-only] The name of this member.
Member
 InheritednamespaceURI : String
[read-only] The namespace URI for this member or null if this is a public member.
Member
 Inheritedowner : ClassInfo
[read-only] The owner of this member.
Member
 Inheritedparameters : Array
[read-only] The parameter types of the function represented by this instance.
FunctionBase
  returnType : ClassInfo
[read-only] Returns the return type of the method represented by this instance.
Method
Public Methods
 MethodDefined By
 Inherited
getAllMetadata(validate:Boolean = true):Array
Returns all metadata tags for this type in no particular order.
MetadataAware
 Inherited
getMetadata(type:Object, validate:Boolean = true):Array
Returns all metadata tags for the specified type for this element.
MetadataAware
 Inherited
hasMetadata(type:Object):Boolean
Indicates whether this element has at least one metadata tag of the specified type.
MetadataAware
  
invoke(instance:Object, params:Array):*
Invokes the method represented by this instance on the specified target instance.
Method
Protected Methods
 MethodDefined By
 Inherited
convertParameters(params:Array):void
Converts the specified parameters to the types expected for this function if necessary.
FunctionBase
Property Detail
isStaticproperty
isStatic:Boolean  [read-only]

Determines if the method represented by this instance is static.


Implementation
    public function get isStatic():Boolean
returnTypeproperty 
returnType:ClassInfo  [read-only]

Returns the return type of the method represented by this instance. The return type * is represented by the Any class and the return type void is represented by the Void class, both members of the org.spicefactory.lib.reflect.types package. All other return types are represented by their corresponding Class instance.


Implementation
    public function get returnType():ClassInfo
Method Detail
invoke()method
public function invoke(instance:Object, params:Array):*

Invokes the method represented by this instance on the specified target instance. If necessary, parameters will be automatically converted to the required type if a matching Converter is registered for the parameter type.

Parameters

instance:Object — the instance to invoke the method on.
 
params:Array — the parameters to pass to the method

Returns
* — the return value of the method that gets invoked

Throws
ConversionError — if one of the specified parameters is not of the required type and can not be converted
 
MethodInvocationError — if the specified target instance is not of the required type
 
Error — any Error thrown by the target method will not be catched by this method