|
1 |
| package net.sf.crispy; |
|
2 |
| |
|
3 |
| import java.lang.reflect.Method; |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| public class InterceptorFilterContext { |
|
12 |
| |
|
13 |
| private Class invocationClass = null; |
|
14 |
| private Method method = null; |
|
15 |
| private Object[] args = null; |
|
16 |
| private Throwable throwable = null; |
|
17 |
| |
|
18 |
1776
| public InterceptorFilterContext() {
|
|
19 |
1776
| super();
|
|
20 |
| } |
|
21 |
997
| public InterceptorFilterContext(Class pvClass) {
|
|
22 |
997
| this.setInvocationClass(pvClass);
|
|
23 |
| } |
|
24 |
45
| public InterceptorFilterContext(Throwable pvThrowable) {
|
|
25 |
45
| this.setThrowable(pvThrowable);
|
|
26 |
| } |
|
27 |
| |
|
28 |
1
| public Object[] getArgs() { return args; }
|
|
29 |
1775
| public void setArgs(final Object[] pvArgs) { args = pvArgs; }
|
|
30 |
| |
|
31 |
73
| public Method getMethod() { return method; }
|
|
32 |
1788
| public void setMethod(final Method pvMethod) { method = pvMethod; }
|
|
33 |
| |
|
34 |
28
| public Throwable getThrowable() { return throwable; }
|
|
35 |
59
| public final void setThrowable(final Throwable pvThrowable) { throwable = pvThrowable; }
|
|
36 |
| |
|
37 |
76
| public Class getInvocationClass() {
|
|
38 |
76
| Class lvClass = null;
|
|
39 |
76
| if ((invocationClass == null) && (method != null)) {
|
|
40 |
37
| lvClass = method.getDeclaringClass();
|
|
41 |
| } else { |
|
42 |
39
| lvClass = invocationClass;
|
|
43 |
| } |
|
44 |
76
| return lvClass;
|
|
45 |
| } |
|
46 |
998
| public final void setInvocationClass(final Class pvClass) { invocationClass = pvClass; }
|
|
47 |
| |
|
48 |
| } |