org.apache.tapestry.listener
Class ListenerMap

java.lang.Object
  extended by org.apache.tapestry.listener.ListenerMap

public class ListenerMap
extends Object

Maps a class to a set of listeners based on the public methods of the class. ListenerMapPropertyAccessor is setup to provide these methods as named properties of the ListenerMap.

Since:
1.0.2
Version:
$Id: ListenerMap.java 243880 2004-04-06 18:51:31Z ehatcher $
Author:
Howard Ship

Constructor Summary
ListenerMap(Object target)
           
 
Method Summary
 boolean canProvideListener(String name)
          Returns true if this ListenerMap can provide a listener with the given name.
 Object getListener(String name)
          Gets a listener for the given name (which is both a property name and a method name).
 Collection getListenerNames()
          Returns an unmodifiable collection of the names of the listeners implemented by the target class.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ListenerMap

public ListenerMap(Object target)
Method Detail

getListener

public Object getListener(String name)
Gets a listener for the given name (which is both a property name and a method name). The listener is created as needed, but is also cached for later use.

Throws:
ApplicationRuntimeException - if the listener can not be created.

getListenerNames

public Collection getListenerNames()
Returns an unmodifiable collection of the names of the listeners implemented by the target class.

Since:
1.0.6

canProvideListener

public boolean canProvideListener(String name)
Returns true if this ListenerMap can provide a listener with the given name.

Since:
2.2

toString

public String toString()
Overrides:
toString in class Object