Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / ridljar / com / sun / star / uno / IQueryInterface.java
blob7857d620545579dd6a0242e646e493558b9bb3b9
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 package com.sun.star.uno;
21 /**
22 * This is the delegator interface for Java objects implementing interfaces of
23 * an underlying UNO object.
25 * <p>Calls are delegated through the <code>UnoRuntime</code> to this
26 * interface. Implement this interface in case you want to customize the
27 * behaviour of <code>UnoRuntime.queryInterface</code>.</p>
29 * @see com.sun.star.uno.UnoRuntime
31 public interface IQueryInterface {
32 /**
33 * Returns the unique object identifier (OID) of the underlying UNO object.
35 * @return the OID of the underlying object
37 String getOid();
39 /**
40 * Returns an object implementing the requested interface type.
42 * @param type the requested UNO interface type; must be a <code>Type</code>
43 * object representing a UNO interface type
44 * @return a reference to the requested UNO interface type if available,
45 * otherwise <code>null</code>
46 * @see com.sun.star.uno.UnoRuntime
48 Object queryInterface(Type type);
50 /**
51 * Tests if the given reference represents a facet of the underlying UNO
52 * object.
54 * @param object a reference to any Java object representing (a facet of) a
55 * UNO object; may be <code>null</code>
56 * @return <code>true</code> if and only if <code>object</code> is not
57 * <code>null</code> and represents the same UNO object as this object
59 boolean isSame(Object object);