ewe.reflect
Class Method

java.lang.Object
  extended byewe.reflect.MethodConstructor
      extended byewe.reflect.Method
All Implemented Interfaces:
IMethod, Member

public class Method
extends MethodConstructor

This is used to invoke methods on objects. It works on static and instance methods.


Field Summary
 Throwable invocationError
           
 
Fields inherited from class ewe.reflect.MethodConstructor
_method_, _vclass_, declaringClass, methodName, methodSpecs, modifiers, reflect, wrapperType
 
Fields inherited from interface ewe.reflect.Member
DECLARED, PUBLIC
 
Method Summary
 Wrapper invoke(Object target, Wrapper[] parameters, Wrapper result)
          Invoke the method on the specified target object.
 boolean returnsValue()
          Returns true if the method is not of type void.
 Method toJavaMethod()
           
 String toString()
          Return a String representation of this object.
 
Methods inherited from class ewe.reflect.MethodConstructor
getDeclaringClass, getExceptionTypes, getModifiers, getName, getParameters, getParameterTypes, getReturnType, getSpecs, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode
 

Field Detail

invocationError

public Throwable invocationError
Method Detail

invoke

public Wrapper invoke(Object target,
                      Wrapper[] parameters,
                      Wrapper result)
Invoke the method on the specified target object.

Parameters:
target - The object to invoke the method on, or null in the case of static methods.
parameters - an array of parameters which must be of the correct length.
Returns:
A wrapper containing the returned value. If the method type is void then the value stored in the wrapper should be ignored. If the returned value is null then an error occured and the invocationError variable will hold the exception that caused it.

returnsValue

public boolean returnsValue()
Returns true if the method is not of type void.


toString

public String toString()
Description copied from class: Object
Return a String representation of this object.

Overrides:
toString in class MethodConstructor

toJavaMethod

public Method toJavaMethod()