1*a046d00fSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*a046d00fSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*a046d00fSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*a046d00fSAndrew Rist * distributed with this work for additional information 6*a046d00fSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*a046d00fSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*a046d00fSAndrew Rist * "License"); you may not use this file except in compliance 9*a046d00fSAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*a046d00fSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*a046d00fSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*a046d00fSAndrew Rist * software distributed under the License is distributed on an 15*a046d00fSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*a046d00fSAndrew Rist * KIND, either express or implied. See the License for the 17*a046d00fSAndrew Rist * specific language governing permissions and limitations 18*a046d00fSAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*a046d00fSAndrew Rist *************************************************************/ 21*a046d00fSAndrew Rist 22*a046d00fSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir package com.sun.star.uno; 25cdf0e10cSrcweir 26cdf0e10cSrcweir /** 27cdf0e10cSrcweir * This is the delegator interface for Java objects implementing interfaces of 28cdf0e10cSrcweir * an underlying UNO object. 29cdf0e10cSrcweir * 30cdf0e10cSrcweir * <p>Calls are delegated through the <code>UnoRuntime</code> to this 31cdf0e10cSrcweir * interface. Implement this interface in case you want to customize the 32cdf0e10cSrcweir * behaviour of <code>UnoRuntime.queryInterface</code>.</p> 33cdf0e10cSrcweir * 34cdf0e10cSrcweir * @see com.sun.star.uno.UnoRuntime 35cdf0e10cSrcweir */ 36cdf0e10cSrcweir public interface IQueryInterface { 37cdf0e10cSrcweir /** 38cdf0e10cSrcweir * Returns the unique object identifier (OID) of the underlying UNO object. 39cdf0e10cSrcweir * 40cdf0e10cSrcweir * @return the OID of the underlying object 41cdf0e10cSrcweir */ getOid()42cdf0e10cSrcweir String getOid(); 43cdf0e10cSrcweir 44cdf0e10cSrcweir /** 45cdf0e10cSrcweir * Returns an object implementing the requested interface type. 46cdf0e10cSrcweir * 47cdf0e10cSrcweir * @param type the requested UNO interface type; must be a <code>Type</code> 48cdf0e10cSrcweir * object representing a UNO interface type 49cdf0e10cSrcweir * @return a reference to the requested UNO interface type if available, 50cdf0e10cSrcweir * otherwise <code>null</code> 51cdf0e10cSrcweir * @see com.sun.star.uno.UnoRuntime 52cdf0e10cSrcweir */ queryInterface(Type type)53cdf0e10cSrcweir Object queryInterface(Type type); 54cdf0e10cSrcweir 55cdf0e10cSrcweir /** 56cdf0e10cSrcweir * Tests if the given reference represents a facet of the underlying UNO 57cdf0e10cSrcweir * object. 58cdf0e10cSrcweir * 59cdf0e10cSrcweir * @param object a reference to any Java object representing (a facet of) a 60cdf0e10cSrcweir * UNO object; may be <code>null</code> 61cdf0e10cSrcweir * @return <code>true</code> if and only if <code>object</code> is not 62cdf0e10cSrcweir * <code>null</code> and represents the same UNO object as this object 63cdf0e10cSrcweir */ isSame(Object object)64cdf0e10cSrcweir boolean isSame(Object object); 65cdf0e10cSrcweir } 66