Fennel: JniProxyVisitTable< Visitor >::VisitorMethodImpl< ProxyImpl (original) (raw)
Definition at line 322 of file JniProxy.h.
References JniProxy::jObject, and JniProxy::pEnv.
00323 { 00324 // This accomplishes an effective downcast by reinstantiating proxy 00325 // as the correct type. The abstract proxy and the specific proxy 00326 // alias the same underlying Java object, but it's important to 00327 // realize that the proxies themselves don't share the same 00328 // identity. 00329 ProxyImpl proxyImpl; 00330 proxyImpl.init(proxy.pEnv,proxy.jObject); 00331 // This binds to the correct visit overload. 00332 Visitor &visitorImpl = dynamic_cast<Visitor &>(visitor); 00333 visitorImpl.visit(proxyImpl); 00334 }