1 /*
2 * Nanning Aspects
3 *
4 * Distributable under LGPL license.
5 * See terms of license at gnu.org.
6 */
7 package org.codehaus.nanning;
8
9 import java.lang.reflect.Method;
10
11
12 /***
13 * Description of the current invocation, given to an interceptor upon method-call.
14 *
15 * <!-- $Id: Invocation.java,v 1.1 2003/07/04 10:53:59 lecando Exp $ -->
16 *
17 * @author $Author: lecando $
18 * @version $Revision: 1.1 $
19 */
20 public interface Invocation {
21 /***
22 * Invoke the next interceptor in the stack (or the target if you're last).
23 *
24 * @return the result of the call on the target (might be intercepted and changed by an interceptor).
25 * @throws Throwable if the call throws an exception.
26 */
27 Object invokeNext() throws Throwable;
28
29 /***
30 * Gets the target of the call.
31 *
32 * @return the actual target object.
33 */
34 Object getTarget();
35
36 /***
37 * Change the target of the current mixin.
38 *
39 * @param o
40 */
41 void setTarget(Object o);
42
43 /***
44 * Gets the aspected object the call is part of. (TODO might need to change name...)
45 *
46 * @return the aspected object.
47 */
48 Object getProxy();
49
50 /***
51 * Gets the index of the current interceptor.
52 *
53 * @return the index of the current interceptor.
54 */
55 int getCurrentIndex();
56
57 /***
58 * Gets the total number of interceptors in the chain.
59 *
60 * @return the total number of interceptors in the chain.
61 */
62 int getfInterceptorCount();
63
64 /***
65 * Gets the interceptors at the specified index.
66 *
67 * @param index index to the interceptor to retrieve.
68 * @return the interceptors at the specified index.
69 */
70 Interceptor getInterceptor(int index);
71
72 /***
73 * Gets the method being called.
74 *
75 * @return the method being called.
76 */
77 Method getMethod();
78
79 /***
80 * Gets the arguments to the call.
81 *
82 * @return the arguments to the call.
83 */
84 Object[] getArgs();
85
86 Class getTargetInterface();
87
88 AspectInstance getAspectInstance();
89
90 int getArgumentCount();
91
92 Object getArgument(int arg);
93 }
This page was automatically generated by Maven