org.codehaus.nanning
Class Mixin.InvocationImpl

java.lang.Object
  extended byorg.codehaus.nanning.Mixin.InvocationImpl
All Implemented Interfaces:
Invocation
Enclosing class:
Mixin

protected class Mixin.InvocationImpl
extends java.lang.Object
implements Invocation


Field Summary
protected  java.lang.Object[] args
           
protected  java.util.ListIterator interceptors
           
protected  java.lang.reflect.Method method
           
protected  java.lang.Object proxy
           
 
Constructor Summary
Mixin.InvocationImpl(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
 
Method Summary
 java.lang.Object[] getArgs()
          Gets the arguments to the call.
 java.lang.Object getArgument(int arg)
           
 int getArgumentCount()
           
 AspectInstance getAspectInstance()
           
 int getCurrentIndex()
          Gets the index of the current interceptor.
 int getfInterceptorCount()
          Gets the total number of interceptors in the chain.
 Interceptor getInterceptor(int index)
          Gets the interceptors at the specified index.
 java.lang.reflect.Method getMethod()
          Gets the method being called.
 java.lang.Object getProxy()
          Gets the aspected object the call is part of.
 java.lang.Object getTarget()
          Gets the target of the call.
 java.lang.Class getTargetInterface()
           
 java.lang.Object invokeNext()
          Invoke the next interceptor in the stack (or the target if you're last).
 void setTarget(java.lang.Object target)
          Change the target of the current mixin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

proxy

protected java.lang.Object proxy

method

protected final java.lang.reflect.Method method

args

protected final java.lang.Object[] args

interceptors

protected java.util.ListIterator interceptors
Constructor Detail

Mixin.InvocationImpl

public Mixin.InvocationImpl(java.lang.Object proxy,
                            java.lang.reflect.Method method,
                            java.lang.Object[] args)
Method Detail

invokeNext

public java.lang.Object invokeNext()
                            throws java.lang.Throwable
Description copied from interface: Invocation
Invoke the next interceptor in the stack (or the target if you're last).

Specified by:
invokeNext in interface Invocation
Returns:
the result of the call on the target (might be intercepted and changed by an interceptor).
Throws:
java.lang.Throwable - if the call throws an exception.

getInterceptor

public Interceptor getInterceptor(int index)
Description copied from interface: Invocation
Gets the interceptors at the specified index.

Specified by:
getInterceptor in interface Invocation
Parameters:
index - index to the interceptor to retrieve.
Returns:
the interceptors at the specified index.

getTargetInterface

public java.lang.Class getTargetInterface()
Specified by:
getTargetInterface in interface Invocation

getAspectInstance

public AspectInstance getAspectInstance()
Specified by:
getAspectInstance in interface Invocation

getArgumentCount

public int getArgumentCount()
Specified by:
getArgumentCount in interface Invocation

getArgument

public java.lang.Object getArgument(int arg)
Specified by:
getArgument in interface Invocation

getTarget

public java.lang.Object getTarget()
Description copied from interface: Invocation
Gets the target of the call.

Specified by:
getTarget in interface Invocation
Returns:
the actual target object.

setTarget

public void setTarget(java.lang.Object target)
Description copied from interface: Invocation
Change the target of the current mixin.

Specified by:
setTarget in interface Invocation
Parameters:
target -

getProxy

public java.lang.Object getProxy()
Description copied from interface: Invocation
Gets the aspected object the call is part of. (TODO might need to change name...)

Specified by:
getProxy in interface Invocation
Returns:
the aspected object.

getCurrentIndex

public int getCurrentIndex()
Description copied from interface: Invocation
Gets the index of the current interceptor.

Specified by:
getCurrentIndex in interface Invocation
Returns:
the index of the current interceptor.

getfInterceptorCount

public int getfInterceptorCount()
Description copied from interface: Invocation
Gets the total number of interceptors in the chain.

Specified by:
getfInterceptorCount in interface Invocation
Returns:
the total number of interceptors in the chain.

getMethod

public java.lang.reflect.Method getMethod()
Description copied from interface: Invocation
Gets the method being called.

Specified by:
getMethod in interface Invocation
Returns:
the method being called.

getArgs

public java.lang.Object[] getArgs()
Description copied from interface: Invocation
Gets the arguments to the call.

Specified by:
getArgs in interface Invocation
Returns:
the arguments to the call.


Copyright © Jon Tirsen. All Rights Reserved.