org.jboss.cache.pojo.util
Class MethodCall

java.lang.Object
  extended by org.jboss.cache.pojo.util.MethodCall

public class MethodCall
extends java.lang.Object

A special MethodCall object to wrap around the rollback method call. No Serializable is required.

Version:
$Revision: 1.1 $
Author:
Ben Wang

Field Summary
protected  java.lang.Object[] args
          The arguments of the method.
protected static org.apache.commons.logging.Log log
           
protected  java.lang.reflect.Method method
          The Method of the call.
protected  java.lang.String method_name
          The name of the method, case sensitive.
protected  java.lang.String[] signature
          The signature, e.g., new String[]{String.class.getLastElementAsString(), int.class.getLastElementAsString()}.
protected  java.lang.Object target
           
protected  java.lang.Class[] types
          The class types, e.g., new Class[]{String.class, int.class}.
 
Constructor Summary
MethodCall(java.lang.reflect.Method method, java.lang.Object[] arguments, java.lang.Object target)
           
 
Method Summary
 java.lang.Object[] getArgs()
           
 java.lang.reflect.Method getMethod()
           
 java.lang.String getName()
           
 java.lang.Object invoke()
           
protected  java.lang.Object invoke(java.lang.Object target)
          Invokes the method with the supplied arguments against the target object.
 java.lang.Object invoke(java.lang.Object target, java.lang.Object[] args)
           
 void setArgs(java.lang.Object[] args)
           
 void setMethod(java.lang.reflect.Method m)
           
 void setName(java.lang.String n)
           
 java.lang.String toString()
           
 java.lang.String toStringDetails()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

method_name

protected java.lang.String method_name
The name of the method, case sensitive.


args

protected java.lang.Object[] args
The arguments of the method.


types

protected java.lang.Class[] types
The class types, e.g., new Class[]{String.class, int.class}.


signature

protected java.lang.String[] signature
The signature, e.g., new String[]{String.class.getLastElementAsString(), int.class.getLastElementAsString()}.


method

protected java.lang.reflect.Method method
The Method of the call.


target

protected java.lang.Object target

log

protected static final org.apache.commons.logging.Log log
Constructor Detail

MethodCall

public MethodCall(java.lang.reflect.Method method,
                  java.lang.Object[] arguments,
                  java.lang.Object target)
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String n)

getArgs

public java.lang.Object[] getArgs()

setArgs

public void setArgs(java.lang.Object[] args)

getMethod

public java.lang.reflect.Method getMethod()

setMethod

public void setMethod(java.lang.reflect.Method m)

invoke

public java.lang.Object invoke()
                        throws java.lang.Throwable
Throws:
java.lang.Throwable

invoke

protected java.lang.Object invoke(java.lang.Object target)
                           throws java.lang.Throwable
Invokes the method with the supplied arguments against the target object. If a method lookup is provided, it will be used. Otherwise, the default method lookup will be used.

Parameters:
target - - the object that you want to invoke the method on
Returns:
an object
Throws:
java.lang.Throwable

invoke

public java.lang.Object invoke(java.lang.Object target,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Throws:
java.lang.Throwable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toStringDetails

public java.lang.String toStringDetails()