|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.gradle.util.ListenerBroadcast
class ListenerBroadcast extends java.lang.Object
Manages a set of listeners of type T. Provides an implementation of T which can be used to broadcast to all registered listeners.
| Nested Class Summary | |
|---|---|
class |
ListenerBroadcast.BroadcastInvocationHandler
|
class |
ListenerBroadcast.ClosureInvocationHandler
|
class |
ListenerBroadcast.ListenerInvocationHandler
|
| Constructor Summary | |
ListenerBroadcast(java.lang.Class type)
|
|
| Method Summary | |
|---|---|
void
|
add(T listener)
Adds a listener. |
void
|
add(java.lang.String methodName, Closure closure)
Adds a closure to be notified when the given method is called. |
T
|
getSource()
Returns the broadcaster. |
void
|
remove(T listener)
|
| Methods inherited from class java.lang.Object | |
|---|---|
| hashCode, getClass, equals, toString, wait, wait, wait, notify, notifyAll |
| Constructor Detail |
|---|
public ListenerBroadcast(java.lang.Class type)
| Method Detail |
|---|
public void add(T listener)
public void add(java.lang.String methodName, Closure closure)
public T getSource()
public void remove(T listener)
Groovy Documentation