org.javasimon.proxy
Class DelegatingMethodInvocation<T>

java.lang.Object
  extended by org.javasimon.proxy.DelegatingMethodInvocation<T>
All Implemented Interfaces:
Runnable, Callable<Object>, Delegating<T>

public class DelegatingMethodInvocation<T>
extends Object
implements Delegating<T>, Runnable, Callable<Object>

Proxy method invocation

Author:
gquintana

Field Summary
private  Object[] args
          Invocation arguments
private  T delegate
          Target (real) object
private  Method method
          Method
private  Object proxy
          Proxy
 
Constructor Summary
DelegatingMethodInvocation(T target, Object proxy, Method method, Object... args)
           
 
Method Summary
 Object call()
           
 Object[] getArgs()
           
 T getDelegate()
          Get wrapped object.
 Method getMethod()
           
 Object getProxy()
           
 Method getTargetMethod()
           
 Object proceed()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

private final T delegate
Target (real) object


proxy

private final Object proxy
Proxy


method

private final Method method
Method


args

private final Object[] args
Invocation arguments

Constructor Detail

DelegatingMethodInvocation

public DelegatingMethodInvocation(T target,
                                  Object proxy,
                                  Method method,
                                  Object... args)
Method Detail

getArgs

public Object[] getArgs()

getMethod

public Method getMethod()

getProxy

public Object getProxy()

getDelegate

public T getDelegate()
Description copied from interface: Delegating
Get wrapped object.

Specified by:
getDelegate in interface Delegating<T>
Returns:
Wrapped object

getTargetMethod

public Method getTargetMethod()
                       throws NoSuchMethodException
Throws:
NoSuchMethodException

proceed

public Object proceed()
               throws Throwable
Throws:
Throwable

run

public void run()
Specified by:
run in interface Runnable

call

public Object call()
            throws Exception
Specified by:
call in interface Callable<Object>
Throws:
Exception


Copyright © 2013. All Rights Reserved.