Package | org.spicefactory.lib.reflect |
Class | public class Method |
Inheritance | Method FunctionBase Member MetadataAware Object |
Property | Defined By | ||
---|---|---|---|
declaredBy : ClassInfo [read-only]
The type declaring this member. | Member | ||
isStatic : Boolean [read-only]
Determines if the method represented by this instance is static. | Method | ||
name : String [read-only]
The name of this member. | Member | ||
namespaceURI : String [read-only]
The namespace URI for this member or null if this is a public member. | Member | ||
owner : ClassInfo [read-only]
The owner of this member. | Member | ||
parameters : 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 |
Method | Defined By | ||
---|---|---|---|
getAllMetadata(validate:Boolean = true):Array
Returns all metadata tags for this type in no particular order. | MetadataAware | ||
getMetadata(type:Object, validate:Boolean = true):Array
Returns all metadata tags for the specified type for this element. | MetadataAware | ||
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 |
isStatic | property |
isStatic:Boolean
[read-only] Determines if the method represented by this instance is static.
public function get isStatic():Boolean
returnType | property |
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.
public function get returnType():ClassInfo
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
|
* — the return value of the method that gets invoked
|
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
|