1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_beans_XIntrospectionAccess_idl__
28 #define __com_sun_star_beans_XIntrospectionAccess_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
34 #ifndef __com_sun_star_beans_Property_idl__
35 #include
<com
/sun
/star
/beans
/Property.idl
>
38 #ifndef __com_sun_star_container_NoSuchElementException_idl__
39 #include
<com
/sun
/star
/container
/NoSuchElementException.idl
>
42 #ifndef __com_sun_star_reflection_XIdlMethod_idl__
43 #include
<com
/sun
/star
/reflection
/XIdlMethod.idl
>
46 #ifndef __com_sun_star_lang_NoSuchMethodException_idl__
47 #include
<com
/sun
/star
/lang
/NoSuchMethodException.idl
>
50 #ifndef __com_sun_star_reflection_XIdlClass_idl__
51 #include
<com
/sun
/star
/reflection
/XIdlClass.idl
>
54 #ifndef __com_sun_star_beans_IllegalTypeException_idl__
55 #include
<com
/sun
/star
/beans
/IllegalTypeException.idl
>
58 //=============================================================================
60 module com
{ module sun
{ module star
{ module beans
{
62 //=============================================================================
64 /** represents the result of an introspection operation done by
65 the inspect method of <type scope="com::sun::star::beans">
66 XIntrospection</type>.
68 <p>This interface gives information about an object's
69 properties and methods as detected in the introspection
70 process. It's not possible to access properties or call
71 methods directly using this interface but it provides
72 access to other interfaces to do so.
73 See <member scope="com::sun::star::beans">
74 XIntrospectionAccess::queryAdapter()</member></p>
76 <p>The <type>XExactName</type> interface has to be supported
77 in order to implement inaccurate name access for all objects
78 which implement the <type scope="com::sun::star::container">
79 XNameAccess</type> interface or <type>XPropertySet</type>.</p>
81 <p>The <type>XMaterialHolder</type> interface has to be
82 supported to give access to the inspected object.</p>
85 @see com::sun::star::beans::XExactName
87 published
interface XIntrospectionAccess
: com
::sun
::star
::uno
::XInterface
89 //-------------------------------------------------------------------------
90 /** returns information about which method concepts described in
91 the <type>MethodConcept</type> constants group are supported
92 by this <type>XIntrospectionAccess</type> implementation.
94 <p>The minimum supported concepts should be:</p>
97 <li> <const>MethodConcept::PROPERTY</const>, </li>
98 <li> <const>MethodConcept::LISTENER</const>, </li>
99 <li> <const>MethodConcept::ENUMERATION</const>, </li>
100 <li> <const>MethodConcept::NAMECONTAINER</const></li>
101 <li> <const>MethodConcept::INDEXCONTAINER</const>; </li>
105 zero or more constants of the <type>MethodConcept</type>
106 constants group combined by an arithmetical or-operation.
108 long getSuppliedMethodConcepts
();
110 //-------------------------------------------------------------------------
111 /** returns information about which property concepts described in
112 the <type>PropertyConcept</type> constants group are supported
113 by this <type>XIntrospectionAccess</type> implementation.
115 <p>The minimum supported concepts should be:</p>
118 <li> <const>PropertyConcept::PROPERTYSET</const>, </li>
119 <li> <const>PropertyConcept::ATTRIBUTES</const> and </li>
120 <li> <const>PropertyConcept::METHODS</const>. </li>
124 zero or more constants of the <type>PropertyConcept</type>
125 constants group.combined by an arithmetical or-operation.
127 long getSuppliedPropertyConcepts
();
129 //-------------------------------------------------------------------------
130 /** returns information about a property if a property with
131 the demanded name exists and if it accords to one of the
132 demanded <type>PropertyConcept</type>s. The information
133 is provided as <type>Property</type> struct.
136 A <type>Property</type> struct providing
137 information about the demanded property,
138 if a corresponding property exists.
141 the name of the property.
143 @param nPropertyConcepts
144 zero or more constants of the <type>PropertyConcept
145 </type> constants group combined by an arithmetical
148 @throws NoSuchElementException
149 when a property with the demanded name doesn't exist
150 or if it accords to a wrong <type>PropertyConcept
153 com
::sun
::star
::beans
::Property getProperty
( [in] string aName
,
154 [in] long nPropertyConcepts
)
155 raises
( com
::sun
::star
::container
::NoSuchElementException
);
157 //-------------------------------------------------------------------------
158 /** allows to ask if a property with the demanded name exists
159 and if it accords to one of the demanded <type>
160 PropertyConcept</type>s.
163 <TRUE/> if the property exists and accords to one of
164 the demanded <type>PropertyConcept</type>s, otherwise
165 <FALSE/> is returned.
168 the name of the property.
170 @param nPropertyConcepts
171 zero or more constants of the <type>PropertyConcept
172 </type> constants group combined by an arithmetical
175 boolean hasProperty
( [in] string aName
,
176 [in] long nPropertyConcepts
);
178 //-------------------------------------------------------------------------
179 /** returns a sequence of properties of the introspected object
182 all properties of the introspected object which accord
183 to the demanded <type>PropertyConcept</type>s.
185 @param nPropertyConcepts
186 zero or more constants of the <type>PropertyConcept
187 </type> constants group combined by an arithmetical
190 sequence
<com
::sun
::star
::beans
::Property
> getProperties
(
191 [in] long nPropertyConcepts
);
193 //-------------------------------------------------------------------------
194 /** returns information about a method if a method with
195 the demanded name exists and if it accords to one of
196 the demanded MethodConcepts. The information is
197 provided as <type scope="com::sun::star::reflection">
201 A <type scope="com::sun::star::reflection">
202 XIdlMethod</type> providing information about and
203 access to the demanded method if a corresponding
207 the name of the method.
209 @param nMethodConcepts
210 zero or more constants of the <type>MethodConcept
211 </type> constants group combined by an arithmetical
214 @throws NoSuchElementException
215 when a method with the demanded name doesn't exist
216 or if it accords to a wrong <type>MethodConcept</type>.
218 com
::sun
::star
::reflection
::XIdlMethod getMethod
( [in] string aName
,
219 [in] long nMethodConcepts
)
220 raises
( com
::sun
::star
::lang
::NoSuchMethodException
);
222 //-------------------------------------------------------------------------
223 /** allows to ask if a method with the demanded name exists
224 and if it accords to one of the demanded <type>MethodConcept
228 <TRUE/> if the method exists and accords to one of
229 the demanded <type>MethodConcept</type>s, otherwise
230 <FALSE/> is returned.
233 the name of the method.
235 @param nMethodConcepts
236 zero or more constants of the <type>MethodConcept
237 </type> constants group combined by an arithmetical
240 boolean hasMethod
( [in] string aName
,
241 [in] long nMethodConcepts
);
243 //-------------------------------------------------------------------------
244 /** returns a sequence of methods of the introspected object.
247 all methods of the introspected object which accord
248 to the demanded <type>MethodConcept</type>s.
250 @param nMethodConcepts
251 zero or more constants of the <type>MethodConcept
252 </type> constants group combined by an arithmetical
255 sequence
<com
::sun
::star
::reflection
::XIdlMethod
> getMethods
(
256 [in] long nMethodConcepts
);
258 //-------------------------------------------------------------------------
259 /** returns the listener types supported by the introspected
262 <p>If the introspected object has the methods
263 <code>addFooListener( XFooListener xFoo )</code> and
264 <code>removeFooListener( XFooListener xFoo )</code>
265 the type of XFooListener will be one of the elements
266 in the returned sequence.
269 a sequence of the types of listener interfaces
270 which are supported by the introspected object.
272 sequence
<type
> getSupportedListeners
();
274 //-------------------------------------------------------------------------
275 /** creates an adapter that implements an interface with the
278 <p>To access properties, query for the <type>XPropertySet
279 </type> interface. If the <type>XPropertySet</type> can
280 be queried, the <type>XFastPropertySet</type> interface
281 must be supported too. </p>
283 <p>If the introspected object implements a name container,
284 the introspection should return the <type scope=
285 "com::sun::star::container">XNameAccess</type> and <type
286 scope="com::sun::star::container">XNameContainer</type>
289 <p>If the introspected object implements an index container,
290 the introspection should return the <type scope=
291 "com::sun::star::container">XIndexAccess</type> and <type
292 scope="com::sun::star::container">XIndexContainer</type>
295 <p>If the introspected object implements an enumeration
296 container, the introspection should return the <type scope=
297 "com::sun::star::container">XEnumerationAccess</type>
300 <p>If the introspected object implements the <type scope=
301 "com::sun::star::reflection">XIdlArray</type> interface,
302 the introspection should return this.</p>
304 <p>To implement inaccurate name access, at all objects,
305 which implement the <type scope="com::sun::star::container">
306 XNameAccess</type> or <type>XPropertySet</type> interface,
307 the <type>XExactName</type> interface has to be supported.
310 @see com::sun::star::beans::XExactName
312 com
::sun
::star
::uno
::XInterface queryAdapter
( [in] type aInterfaceType
)
313 raises
( com
::sun
::star
::beans
::IllegalTypeException
);
317 //=============================================================================