|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectEventRef
public class EventRef
The EventRef class represents a reference to a specific Control event. EventRefs can be used to fire external events into a Control, in contexts where the event source may not share the associated EventSet class instance with the event target, or even have access to the EventSet class itself.
It is roughly equivalent to the java.lang.reflect.Method object that refers to a method on an EventSet interface, but has several additional properties:
Constructor Summary | |
---|---|
EventRef(Method eventMethod)
Constructs a new EventRef based upon a Method reference. |
|
EventRef(String eventDescriptor)
Constructs a new EventRef using an event descriptor string. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Two EventRefs are equal if the method descriptor string associated with them is equal |
String |
getEventDescriptor(Class controlInterface)
Returns the event descriptor string associated with the EventRef. |
Method |
getEventMethod(Class controlInterface)
Returns the event Method associated with this EventRef. |
String |
toString()
|
Methods inherited from class Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EventRef(Method eventMethod)
eventMethod
- the Method associated with the eventpublic EventRef(String eventDescriptor)
where eventSet refers to the fully qualified name of the EventSet class, eventName refers to the name of the event Method, and eventDescriptor describes the event argument and return types using the method descriptor format defined in the Java Language Specification..
For example, given the following EventSet interface:
the eventDescriptor for myEvent would be:@ControlInterface public interface MyControl { @EventSet public interface MyEvents { public String myEvent(int arg0, Object arg2); } }
MyControl.MyEvents.myEvent(ILjava/lang/Object;)Ljava/lang/String;
eventDescriptor
- the event descriptor string associated with the eventMethod Detail |
---|
public String getEventDescriptor(Class controlInterface)
controlInterface
- the ControlInterfacepublic Method getEventMethod(Class controlInterface)
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |