1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.seasar.uruma.binding.method;
17
18 import java.lang.reflect.Method;
19
20 import org.seasar.uruma.annotation.AsyncMethod;
21 import org.seasar.uruma.annotation.EventListener;
22 import org.seasar.uruma.annotation.EventListenerType;
23 import org.seasar.uruma.util.AssertionUtil;
24
25
26
27
28
29
30 public class EventListenerDef {
31 private Method targetMethod;
32
33 private EventListener eventListener;
34
35 private AsyncMethod asyncMethod;
36
37
38
39
40
41
42
43
44
45
46
47 public EventListenerDef(final Method target,
48 final EventListener eventListener, final AsyncMethod asyncMethod) {
49 AssertionUtil.assertNotNull("target", target);
50 AssertionUtil.assertNotNull("eventListener", eventListener);
51 this.targetMethod = target;
52 this.eventListener = eventListener;
53 this.asyncMethod = asyncMethod;
54 }
55
56
57
58
59
60
61 public Method getTargetMethod() {
62 return this.targetMethod;
63 }
64
65
66
67
68
69
70 public String[] getId() {
71 return this.eventListener.id();
72 }
73
74
75
76
77
78
79 public EventListenerType getType() {
80 return this.eventListener.type();
81 }
82
83
84
85
86
87
88 public AsyncMethod getAsyncMethod() {
89 return this.asyncMethod;
90 }
91 }