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_reflection_XIdlClass_idl__
24#define __com_sun_star_reflection_XIdlClass_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_uno_TypeClass_idl__
31#include <com/sun/star/uno/TypeClass.idl>
32#endif
33
34#ifndef __com_sun_star_uno_Uik_idl__
35#include <com/sun/star/uno/Uik.idl>
36#endif
37
38//=============================================================================
39
40module com {  module sun {  module star {  module reflection {
41
42 published interface XIdlField;
43 published interface XIdlMethod;
44 published interface XIdlArray;
45
46//=============================================================================
47
48/** Provides information reflecting an UNO type.
49*/
50published interface XIdlClass: com::sun::star::uno::XInterface
51{
52	/** Deprecated.  Do not call.
53        @deprecated
54    */
55	sequence<XIdlClass> getClasses();
56	/** Deprecated.  Do not call.
57        @deprecated
58    */
59	XIdlClass getClass( [in] string aName );
60
61	/** Tests whether two reflecting objects reflect the same type.
62
63        @returns
64                true, if the objects reflect the same type, false otherwise.
65    */
66	boolean equals( [in] XIdlClass Type );
67
68	/** Tests whether values of this reflected type are assignable from values
69        of a second one (<code>xType</code>).
70
71        @param xType
72               another reflected type
73        @return
74                true, if values of this reflected type are assignable
75                from values of <code>xType</code>.
76    */
77	boolean isAssignableFrom( [in] XIdlClass xType );
78
79	/** Returns the <type scope="com::sun::star::uno">TypeClass</type>
80        of the reflected type.
81
82        @returns
83                  type class of the reflected type.
84    */
85	com::sun::star::uno::TypeClass getTypeClass();
86
87	/** Returns the fully-qualified name of the reflected type.
88
89        @returns
90                  the fully-qualified name of the type
91    */
92	string getName();
93
94	/** Deprecated.  Do not call.
95
96        @deprecated
97    */
98	com::sun::star::uno::Uik getUik();
99
100	/** If the reflected type is an interface, then the returned
101        sequence of <type>XIdlClass</type> reflect the base interfaces.
102        <br>
103        If the reflected type is not an interface or an interface that is
104        not derived from another, then an empty sequence is returned.
105
106        @return
107                all base interfaces of an interface type or an empty sequence.
108    */
109	sequence<XIdlClass> getSuperclasses();
110
111	/** Deprecated.  Do not call.
112        @deprecated
113    */
114	sequence<XIdlClass> getInterfaces();
115
116	/** If the reflected type is an array or sequence, then this method
117		returns a <type>XIdlClass</type> interface reflecting
118        the element.
119
120        @return
121                reflection interface of the element type of an array or
122                sequence type (null-reference otherwise).
123    */
124	XIdlClass getComponentType();
125
126	/** If the reflected type is an interface, struct or union, then you
127        get a <type>XIdlField</type> interface reflecting the demanded
128        field (/interface attribute) by name.
129        <br>
130        If the reflected type is not an interface, struct or union or the
131        interace, struct or union does not have a field (/interface attribute)
132        with the demanded name, then a null-reference is returned.
133
134        @param aName
135               name of the demanded field reflection
136        @return
137                demanded field (/interface attribute) reflection (or null-reference)
138    */
139	XIdlField getField( [in] string aName );
140
141	/** If the reflected type is an interface, struct or union, then you
142        get a sequence of <type>XIdlField</type> interfaces reflecting all fields
143        (/interface attributes).  This also includes all inherited
144        fields (/interface attributes) of the interface, struct of union.
145        <br>
146        If the reflected type is not an interface, struct or union or the
147        interface, struct or union does not have any field (/interface attribute),
148        then an empty sequence is returned.
149
150        @return
151                all field (/interface attribute) reflections (or empty sequence)
152    */
153	sequence<XIdlField> getFields();
154
155	/** If the reflected type is an interface, then you get
156        a <type>XIdlMethod</type> interface reflecting the demanded method by name.
157        <br>
158        If the reflected type is not an interface or the interface does not have
159        a method with the demanded name (including inherited methods),
160        then a null-reference is returned.
161
162        @param aName
163               name of demanded method reflection
164        @return
165                demanded method reflection (or null-reference)
166    */
167	XIdlMethod getMethod( [in] string aName );
168
169	/** If the reflected type is an interface, then you get
170        a sequence of <type>XIdlMethod</type> interfaces reflecting all methods
171        of the interface.  This also includes the inherited methods of the interface.
172        <br>
173        If the reflected type is not an interface or the interface
174        does not have any methods, then a null-reference is returned.
175
176        @return
177                all method reflections (or empty sequence)
178    */
179	sequence<XIdlMethod> getMethods();
180
181	/** If the reflected type is an array, then you get
182        a <type>XIdlArray</type> interface to modify instances of the array type.
183        <br>
184        If the reflected type is not an array, then a null-reference is returned.
185
186        @return
187                inteface to modify array instances (or null-reference)
188    */
189	XIdlArray getArray();
190
191	/** This method creates instances of the reflected type.
192
193        @attention
194        Instances of type <code>any</code> can not be passed using an <code>any</code>, because
195        anys cannot be nested.  So if the reflected type is an <code>any</code>, then the
196        returned value is empty.
197
198        @param obj
199               pure out parameter to pass the created instance
200    */
201	void createObject( [out] any obj );
202};
203
204//=============================================================================
205
206}; }; }; };
207
208/*=============================================================================
209
210=============================================================================*/
211#endif
212