use of org.qi4j.runtime.composite.ProxyReferenceInvocationHandler in project qi4j-sdk by Qi4j.
the class AbstractAssociationInstance method getEntityReference.
protected EntityReference getEntityReference(Object composite) {
if (composite == null) {
return null;
}
InvocationHandler handler = Proxy.getInvocationHandler(composite);
if (handler instanceof ProxyReferenceInvocationHandler) {
handler = Proxy.getInvocationHandler(((ProxyReferenceInvocationHandler) handler).proxy());
}
EntityInstance instance = (EntityInstance) handler;
return instance.identity();
}
Aggregations