public class DelegateInvocationHandler<T> extends Object implements InvocationHandler
cement(): acquire a proxy that will have its delegate assigned the next call to
setDelegate(Object). This is useful if one DelegateInvocationHandler depends on
another which will have its delegate set later than this one.| Constructor and Description |
|---|
DelegateInvocationHandler(Class<T> interfaceClass) |
| Modifier and Type | Method and Description |
|---|---|
T |
cement()
Cements this delegate, i.e.
|
void |
harden()
Updates
cemented delegates with the current delegate, making it concrete. |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
void |
setDelegate(T delegate)
Updates the delegate for this handler, also
hardens instances
cemented from the last call to setDelegate(Object). |
String |
toString() |
public void setDelegate(T delegate)
hardens instances
cemented from the last call to setDelegate(Object).
This call will also dereference the DelegateInvocationHandler.Concrete,
such that future calls to harden() cannot affect any reference received
from cement() prior to this call.delegate - the new delegate to set.public void harden()
cemented delegates with the current delegate, making it concrete.
Callers of cement() in between this call and the previous call to setDelegate(Object)
will see the current delegate.public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke in interface InvocationHandlerThrowablepublic T cement()
Copyright © 2002–2016 The Neo4j Graph Database Project. All rights reserved.