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