org.apache.tapestry.listener
Class ListenerMap

java.lang.Object
  |
  +--org.apache.tapestry.listener.ListenerMap

public class ListenerMap
extends java.lang.Object

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

Since:
1.0.2
Author:
Howard Ship

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

Constructor Detail

ListenerMap

public ListenerMap(java.lang.Object target)
Method Detail

getListener

public java.lang.Object getListener(java.lang.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:
org.apache.hivemind.ApplicationRuntimeException - if the listener can not be created.

getListenerNames

public java.util.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(java.lang.String name)
Returns true if this ListenerMap can provide a listener with the given name.

Since:
2.2

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object