1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_beans_XIntrospection_idl__ 24#define __com_sun_star_beans_XIntrospection_idl__ 25 26#ifndef __com_sun_star_uno_XInterface_idl__ 27#include <com/sun/star/uno/XInterface.idl> 28#endif 29 30#ifndef __com_sun_star_beans_XIntrospectionAccess_idl__ 31#include <com/sun/star/beans/XIntrospectionAccess.idl> 32#endif 33 34 35//============================================================================= 36 37 module com { module sun { module star { module beans { 38 39//============================================================================= 40 41// DocMerge from xml: interface com::sun::star::beans::XIntrospection 42/** allows the inspection of an object's properties and methods. 43 44 <p><strong>Important note:</strong>An object can only be 45 inspected completely if it supports the <type scope= 46 "com::sun::star::lang">XTypeProvider</type> interface.</p> 47 48 <p>For details see method <member>XIntrospection::inspect</member>. </p> 49 50 @see XIntrospectionAccess 51 */ 52published interface XIntrospection: com::sun::star::uno::XInterface 53{ 54 //------------------------------------------------------------------------- 55 56 // DocMerge from xml: method com::sun::star::beans::XIntrospection::inspect 57 /** inspects the given object. 58 59 <p>It identifies all properties supported by the object 60 if they are represented in one of the following ways: </p> 61 62 <dl> 63 <dt>property set </dt> 64 <dd>If the object supports an <type>XPropertySet</type> 65 interface, all its properties are adopted. 66 </dd> 67 68 <dt>attributes </dt> 69 <dd>All of an object's attributes are considered as properties 70 with same name. If an attribute is read-only, the property 71 also is read-only. 72 </dd> 73 74 <dt>get/set methods </dt> 75 <dd>Every method <code>RetType getX()</code> defines a 76 property where "X" stands for the property name and 77 "RetType" for its type. The method must not have any 78 parameters, or there is no property access method 79 and "X" has no property. If there is also a method 80 <code>void setX( [in] RetType )</code>, the property 81 "X" also allows write access; otherwise it is read-only. 82 </dd> 83 84 <dt> <strong>Important note:</strong></dt> 85 <dd>If an object implements <type scope="com::sun::star::container">XNameAccess</type>, 86 the items that can be accessed are not considered as properties 87 of the object and so are not included in the property list offered by 88 <member scope="com::sun::star::beans">XIntrospectionAccess::getProperties()</member>. 89 <type scope="com::sun::star::container">XNameAccess</type> items have to be 90 accessed separately by <member scope="com::sun::star::beans">XIntrospectionAccess::getNameAccess()</member>. 91 </dd> 92 </dl> 93 94 <p>In addition, the inspect method identifies all listener 95 access methods in the form <code>add...Listener</code>/ 96 <code>remove...Listener</code> (except methods of interface 97 <type>XPropertySet</type>) where "..." stands for the listener type. 98 </p> 99 100 <p>Methods which do not belong to a property nor which represent 101 a listener access nor which are methods of <type>XPropertySet</type>, 102 <type scope="com::sun::star::container">XNameAccess</type>, 103 <type scope="com::sun::star::container">XIndexAccess</type>, or 104 <type scope="com::sun::star::container">XEnumerationAccess</type>, are considered to be normal 105 methods. </p> 106 107 @see XIntrospectionAccess 108 */ 109 com::sun::star::beans::XIntrospectionAccess inspect( [in] any aObject ); 110 111}; 112 113//============================================================================= 114 115}; }; }; }; 116 117#endif 118