P
- the type of the presenterpublic static interface Fn.Ref<P extends Fn.Presenter>
Fn.Presenter
.Each implementation of a Fn.Presenter
may choose a way to reference itself (usually in a weak way)
effectively. Various code that needs to hold a reference to a presenter
is then encouraged to obtain such reference via Fn.ref(org.netbeans.html.boot.spi.Fn.Presenter)
call and hold on to it. Holding a reference to an instance of Fn.Presenter
is discouraged as it may lead to memory leaks.
Presenters willing to to represent a reference to itself effectively shall
also implement the Fn.Ref
interface and return reasonable reference
from the Fn.Ref.reference()
method.
Fn.ref(org.netbeans.html.boot.spi.Fn.Presenter)
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Reference must properly implement
Fn.Ref.hashCode() and Fn.Ref.equals(java.lang.Object) . |
int |
hashCode()
Reference must properly implement
Fn.Ref.hashCode() and Fn.Ref.equals(java.lang.Object) . |
P |
presenter()
The associated presenter.
|
Fn.Ref<P> |
reference()
Creates a reference to a presenter.
|
Fn.Ref<P> reference()
Fn.ref(org.netbeans.html.boot.spi.Fn.Presenter)
.P presenter()
null
, if it has been GCed meanwhileint hashCode()
Fn.Ref.hashCode()
and Fn.Ref.equals(java.lang.Object)
.hashCode
in class java.lang.Object
boolean equals(java.lang.Object obj)
Fn.Ref.hashCode()
and Fn.Ref.equals(java.lang.Object)
.equals
in class java.lang.Object
Copyright © 2021 The Apache Software Foundation. All rights reserved.