/** * Retrieves the object identifier for a registered interface from this * environment. * * @param object a registered interface * @see com.sun.star.uno.IEnvironment#getRegisteredObjectIdentifier */ public String getRegisteredObjectIdentifier(Object object) { return UnoRuntime.generateOid(object); }
/** * Retrieves the object identifier for a registered interface from this * environment. * * @param object a registered interface. * @see com.sun.star.uno.IEnvironment#getRegisteredObjectIdentifier */ public String getRegisteredObjectIdentifier(Object object) { return UnoRuntime.generateOid(object); }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.equals(METHOD_EQUALS) || method.equals(METHOD_IS_SAME)) { return Boolean.valueOf(args[0] != null && oid.equals(UnoRuntime.generateOid(args[0]))); } else if (method.equals(METHOD_HASH_CODE)) { return new Integer(oid.hashCode()); } else if (method.equals(METHOD_TO_STRING)) { return "[Proxy:" + System.identityHashCode(proxy) + "," + oid + "," + type + "]"; } else if (method.equals(METHOD_QUERY_INTERFACE)) { // See the comment in java_remote_bridge.mapInterfaceTo for one // reason why this implementation must not satisfy a request for // a super-interface with a proxy itself: return args[0].equals(type) ? proxy : request("queryInterface", args); } else if (method.equals(METHOD_GET_OID)) { return oid; } else { return request(method.getName(), args); } }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.equals(METHOD_EQUALS) || method.equals(METHOD_IS_SAME)) { return Boolean.valueOf(args[0] != null && oid.equals(UnoRuntime.generateOid(args[0]))); } else if (method.equals(METHOD_HASH_CODE)) { return Integer.valueOf(oid.hashCode()); } else if (method.equals(METHOD_TO_STRING)) { return "[Proxy:" + System.identityHashCode(proxy) + "," + oid + "," + type + "]"; } else if (method.equals(METHOD_QUERY_INTERFACE)) { // See the comment in java_remote_bridge.mapInterfaceTo for one // reason why this implementation must not satisfy a request for // a super-interface with a proxy itself: return args[0].equals(type) ? proxy : request("queryInterface", args); } else if (method.equals(METHOD_GET_OID)) { return oid; } else { return request(method.getName(), args); } }
public Object registerInterface(Object object, String[] oid, Type type) { if (oid[0] == null) { oid[0] = UnoRuntime.generateOid(object); } return (isProxy(object) ? proxies : localObjects).register( object, oid[0], type); }
/** * * @see com.sun.star.uno.IEnvironment#registerInterface */ public Object registerInterface(Object object, String[] oid, Type type) { if (oid[0] == null) { oid[0] = UnoRuntime.generateOid(object); } return (isProxy(object) ? proxies : localObjects).register( object, oid[0], type); }