org.codehaus.nanning
Interface Invocation

All Known Implementing Classes:
Mixin.InvocationImpl

public interface Invocation

Description of the current invocation, given to an interceptor upon method-call.

Version:
$Revision: 1.1 $
Author:
$Author: lecando $

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 o)
          Change the target of the current mixin.
 

Method Detail

invokeNext

public java.lang.Object invokeNext()
                            throws java.lang.Throwable
Invoke the next interceptor in the stack (or the target if you're last).

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.

getTarget

public java.lang.Object getTarget()
Gets the target of the call.

Returns:
the actual target object.

setTarget

public void setTarget(java.lang.Object o)
Change the target of the current mixin.

Parameters:
o -

getProxy

public java.lang.Object getProxy()
Gets the aspected object the call is part of. (TODO might need to change name...)

Returns:
the aspected object.

getCurrentIndex

public int getCurrentIndex()
Gets the index of the current interceptor.

Returns:
the index of the current interceptor.

getfInterceptorCount

public int getfInterceptorCount()
Gets the total number of interceptors in the chain.

Returns:
the total number of interceptors in the chain.

getInterceptor

public Interceptor getInterceptor(int index)
Gets the interceptors at the specified index.

Parameters:
index - index to the interceptor to retrieve.
Returns:
the interceptors at the specified index.

getMethod

public java.lang.reflect.Method getMethod()
Gets the method being called.

Returns:
the method being called.

getArgs

public java.lang.Object[] getArgs()
Gets the arguments to the call.

Returns:
the arguments to the call.

getTargetInterface

public java.lang.Class getTargetInterface()

getAspectInstance

public AspectInstance getAspectInstance()

getArgumentCount

public int getArgumentCount()

getArgument

public java.lang.Object getArgument(int arg)


Copyright © Jon Tirsen. All Rights Reserved.