org.apache.beehive.controls.runtime.generator
Class EventAdaptor

Object
  extended by EventAdaptor

public class EventAdaptor
extends Object

The EventAdaptor class represents the generated class that is necessary to route events for a EventSet onto implemented EventHandlers on an implementation class.


Constructor Summary
EventAdaptor(AptEventField eventField, AptEventSet eventSet)
          Constructs a new EventAdaptor for events declared on an EventSet
 
Method Summary
 void addHandler(AptEvent event, AptMethod eventHandler)
          Adds a new EventHandler for a Event to the EventAdaptor
 String getClassName()
          Returns the name of the generated class for this adaptor.
 AptEventField getEventField()
          Returns the event field associated with this event adaptor
 AptEventSet getEventSet()
          Returns the EventSet associated with this Adaptor
 String getEventSetBinding()
          Returns any formal type parameter declaration for EventSet interface associated with the adaptor class.
 String getFormalClassName()
          Returns the name of the generated class for this adaptor, including any formal type declarations from the associate event set.
 AptMethod getHandler(AptEvent event)
          Returns the EventHandler for a ControlEvent on this EventAdaptor
 boolean hasHandler(AptEvent event)
          Returns true if there is an EventHandler for ControlEvent on this EventAdaptor
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventAdaptor

public EventAdaptor(AptEventField eventField,
                    AptEventSet eventSet)
Constructs a new EventAdaptor for events declared on an EventSet

Method Detail

getClassName

public String getClassName()
Returns the name of the generated class for this adaptor.


getFormalClassName

public String getFormalClassName()
Returns the name of the generated class for this adaptor, including any formal type declarations from the associate event set.


getEventField

public AptEventField getEventField()
Returns the event field associated with this event adaptor


getEventSet

public AptEventSet getEventSet()
Returns the EventSet associated with this Adaptor


addHandler

public void addHandler(AptEvent event,
                       AptMethod eventHandler)
Adds a new EventHandler for a Event to the EventAdaptor


hasHandler

public boolean hasHandler(AptEvent event)
Returns true if there is an EventHandler for ControlEvent on this EventAdaptor


getHandler

public AptMethod getHandler(AptEvent event)
Returns the EventHandler for a ControlEvent on this EventAdaptor


getEventSetBinding

public String getEventSetBinding()
Returns any formal type parameter declaration for EventSet interface associated with the adaptor class. This will bind the formal types of the interface based on any type binding from the event field declaration