1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.rribbit;
17
18 import java.lang.reflect.Method;
19 import java.util.List;
20
21
22
23
24
25
26
27
28 public class ListenerObject {
29
30 private Object target;
31 private Method method;
32
33 private Class<?> returnType;
34 private List<String> hints;
35
36
37 private String description;
38
39 public Object getTarget() {
40 return target;
41 }
42
43 public void setTarget(Object target) {
44 this.target = target;
45 }
46
47 public Method getMethod() {
48 return method;
49 }
50
51 public void setMethod(Method method) {
52 this.method = method;
53 }
54
55 public Class<?> getReturnType() {
56 return returnType;
57 }
58
59 public void setReturnType(Class<?> returnType) {
60 this.returnType = returnType;
61 }
62
63 public List<String> getHints() {
64 return hints;
65 }
66
67 public void setHints(List<String> hints) {
68 this.hints = hints;
69 }
70
71 @Override
72 public String toString() {
73
74 if(description == null) {
75 StringBuilder s = new StringBuilder("ListenerObject of method: '" + method + "', with hints: '" + hints.get(0) + "'");
76 for(int i=1; i<hints.size(); i++) {
77 s.append(", '" + hints.get(i) + "'");
78 }
79 description = s.toString();
80 }
81 return description;
82 }
83 }