T- the event class this handler can handle
public final class WeakEventHandler<T extends Event> extends Object implements EventHandler<T>
WeakEventHandlerproxy, the proxy itself references the original handler only weakly and so doesn't prevent it from being garbage collected. Until this weak reference is broken, any event notification received by the proxy is forwarded to the original handler.
|Constructor and Description|
Creates a new instance of
|Modifier and Type||Method and Description|
Forwards event notification to the associated event handler.
Indicates whether the associated event handler has been garbage collected.
public boolean wasGarbageCollected()
WeakEventHandleris no longer necessary.
trueif the associated handler has been garbage collected,
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.