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

Represents a single method.



Public Properties
 PropertyDefined by
  isStatic : Boolean
[read-only] Determines if the method represented by this instance is static.
Method
 Inheritedname : String
The name of this member.
Member
 Inheritedowner : ClassInfo
The owner of this member.
Member
 Inheritedparameters : Array
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
Returns all metadata tags for this type in no particular order.
MetadataAware
 Inherited
getMetadata(type:Object):Array
Returns all metadata tags for the specified type for this element.
MetadataAware
  
invoke(instance:Object, params:Array):*
Invokes the method represented by this instance on the specified target instance.
Method
 Inherited
parametersFromXml(xml:XML, owner:ClassInfo):Array
[static]
FunctionBase
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
 
— any Error thrown by the target method will not be catched by this method