1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package net.sourceforge.servletspy.config;
24
25 /***
26 * @author arno schumacher
27 */
28 public class Handler {
29 protected String handlerClassName;
30
31 protected Param[] handlerParams;
32
33 Handler() {
34 }
35
36 public Handler(final Param[] configParams, final String className) {
37 this.handlerClassName = className;
38 this.handlerParams = configParams;
39 }
40
41 public final Param[] getConfigParam() {
42 return handlerParams == null ? new Param[0] : handlerParams;
43 }
44
45 public final String getClassName() {
46 return handlerClassName;
47 }
48
49 public final String toString() {
50 StringBuffer sb = new StringBuffer();
51 sb.append('[');
52 sb.append("className=");
53 sb.append(handlerClassName);
54 sb.append(", params[]={");
55 for (int i = 0; handlerParams != null && i < handlerParams.length; i++) {
56 sb.append('[');
57 sb.append(i);
58 sb.append("]=");
59 sb.append(handlerParams[i]);
60 if (i + 1 != handlerParams.length) {
61 sb.append(", ");
62 }
63 }
64 sb.append('}');
65 return sb.toString();
66 }
67 }