01: /*
02: * Copyright 2006 Ethan Nicholas. All rights reserved.
03: * Use is subject to license terms.
04: */
05: package jaxx.compiler;
06:
07: import java.lang.reflect.*;
08:
09: import jaxx.reflect.*;
10:
11: public class EventHandler {
12: private String eventId;
13: private String objectCode;
14: private ClassDescriptor listenerClass;
15: private MethodDescriptor addMethod;
16: private MethodDescriptor listenerMethod;
17: private String javaCode;
18:
19: public EventHandler(String eventId, String objectCode,
20: MethodDescriptor addMethod, ClassDescriptor listenerClass,
21: MethodDescriptor listenerMethod, String javaCode) {
22: this .eventId = eventId;
23: this .objectCode = objectCode;
24: this .addMethod = addMethod;
25: this .listenerClass = listenerClass;
26: this .listenerMethod = listenerMethod;
27: this .javaCode = javaCode;
28: }
29:
30: public String getEventId() {
31: return eventId;
32: }
33:
34: public String getObjectCode() {
35: return objectCode;
36: }
37:
38: public MethodDescriptor getAddMethod() {
39: return addMethod;
40: }
41:
42: public ClassDescriptor getListenerClass() {
43: return listenerClass;
44: }
45:
46: public MethodDescriptor getListenerMethod() {
47: return listenerMethod;
48: }
49:
50: public String getJavaCode() {
51: return javaCode;
52: }
53:
54: public String toString() {
55: return "EventHandler[" + eventId + ", "
56: + listenerClass.getName() + ", " + objectCode + ", "
57: + javaCode + "]";
58: }
59: }
|