merged tag ooo/OOO330_m14
[LibreOffice.git] / udkapi / com / sun / star / reflection / XIdlMethod.idl
blob8a9f106ce66aea10b004d2cbfe16b9f3a28349a8
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_reflection_XIdlMethod_idl__
28 #define __com_sun_star_reflection_XIdlMethod_idl__
30 #ifndef __com_sun_star_reflection_XIdlMember_idl__
31 #include <com/sun/star/reflection/XIdlMember.idl>
32 #endif
34 #ifndef __com_sun_star_reflection_ParamInfo_idl__
35 #include <com/sun/star/reflection/ParamInfo.idl>
36 #endif
38 #ifndef __com_sun_star_reflection_MethodMode_idl__
39 #include <com/sun/star/reflection/MethodMode.idl>
40 #endif
42 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
43 #include <com/sun/star/lang/IllegalArgumentException.idl>
44 #endif
46 #ifndef __com_sun_star_reflection_InvocationTargetException_idl__
47 #include <com/sun/star/reflection/InvocationTargetException.idl>
48 #endif
51 //=============================================================================
53 module com { module sun { module star { module reflection {
55 published interface XIdlClass;
57 //=============================================================================
59 /** Reflects an IDL interface method.
61 published interface XIdlMethod: com::sun::star::reflection::XIdlMember
63 /** Returns the return type of the reflected method.
65 @return
66 return type of reflected method
68 XIdlClass getReturnType();
70 /** Returns the formal parameter types of the reflected method in order of IDL
71 declaration.
73 @return
74 formal parameter types of reflected method
76 sequence<XIdlClass> getParameterTypes();
78 /** Returns formal parameter informations of the reflected method
79 in order of IDL declaration.
80 Parameter information reflects the parameter's access mode (in, out, inout),
81 the parameter's name and formal type.
83 @return
84 parameter informations of reflected method
86 sequence<ParamInfo> getParameterInfos();
88 /** Returns the declared exceptions types of the reflected method.
90 @return
91 declared exception types of reflected method
93 sequence<com::sun::star::reflection::XIdlClass> getExceptionTypes();
95 /** Returns the method mode in which calls are run, i.e. either oneway or
96 twoway. Method mode oneway denotes that a call may be run asynchronously
97 (thus having no out parameters or return value)
99 @return
100 method mode of reflected method
102 com::sun::star::reflection::MethodMode getMode();
104 /** Invokes the reflected method on a given object with the given parameters.
105 The parameters may be widening converted to fit their exact IDL type,
106 meaning no loss of information.
108 @param obj
109 object to call on
110 @param args
111 arguments passed to the method
112 @return
113 return value of the method call (may be empty for methods returning void)
115 @throws IllegalArgumentException
116 if the given object is a nuull reference or does not support the reflected
117 method's interface
118 @throws IllegalArgumentException
119 if the given number of arguments differ from the expected number
120 or the given arguments' types differ from the expected ones (even a
121 widening conversion was not possible)
122 @throws InvocationTargetException
123 if the reflected method that has been invoked has thrown an exception.
124 The original exception will be wrapped up and signalled by the
125 InvocationTargetException
127 any invoke(
128 [in] any obj,
129 [inout] sequence<any> args )
130 raises( com::sun::star::lang::IllegalArgumentException,
131 com::sun::star::reflection::InvocationTargetException );
134 //=============================================================================
136 }; }; }; };
138 /*=============================================================================
140 =============================================================================*/
141 #endif