blob: e2bea10f7fec0a16ff5c5f3b70aff2ffa10ae2ac (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/*
* System.Reflection-like API for access to .NET assemblies (DLL & EXE)
*/
// $Id$
package ch.epfl.lamp.compiler.msil;
/**
* Discovers the attributes of an event
* and provides access to event metadata.
*
* @author Nikolay Mihaylov
* @version 1.0
*/
public class EventInfo extends MemberInfo {
//##########################################################################
public final int MemberType() { return MemberTypes.Event; }
/** Attributes associated with the event. */
public final short Attributes;
/** The Type object for the underlying event-handler delegate
* associated with this event.
*/
public final Type EventHandlerType;
public MethodInfo GetAddMethod() { return addMethod; }
public MethodInfo GetRemoveMethod() { return removeMethod; }
public String toString() {
return "" + EventHandlerType + " " + Name;
}
//##########################################################################
protected static final EventInfo[] EMPTY_ARRAY = new EventInfo[0];
protected MethodInfo addMethod;
protected MethodInfo removeMethod;
protected EventInfo(String name, Type declType, short attr,
Type handlerType, MethodInfo add, MethodInfo remove)
{
super(name, declType);
Attributes = attr;
EventHandlerType = handlerType;
this.addMethod = add;
this.removeMethod = remove;
}
//##########################################################################
} // class EventInfo
|