update dev300-m58
[ooovba.git] / udkapi / com / sun / star / reflection / XIdlMethod.idl
blob23e43693f2ec168969b67e51256fc87948f46e86
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XIdlMethod.idl,v $
10 * $Revision: 1.14 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_reflection_XIdlMethod_idl__
31 #define __com_sun_star_reflection_XIdlMethod_idl__
33 #ifndef __com_sun_star_reflection_XIdlMember_idl__
34 #include <com/sun/star/reflection/XIdlMember.idl>
35 #endif
37 #ifndef __com_sun_star_reflection_ParamInfo_idl__
38 #include <com/sun/star/reflection/ParamInfo.idl>
39 #endif
41 #ifndef __com_sun_star_reflection_MethodMode_idl__
42 #include <com/sun/star/reflection/MethodMode.idl>
43 #endif
45 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
46 #include <com/sun/star/lang/IllegalArgumentException.idl>
47 #endif
49 #ifndef __com_sun_star_reflection_InvocationTargetException_idl__
50 #include <com/sun/star/reflection/InvocationTargetException.idl>
51 #endif
54 //=============================================================================
56 module com { module sun { module star { module reflection {
58 published interface XIdlClass;
60 //=============================================================================
62 /** Reflects an IDL interface method.
64 published interface XIdlMethod: com::sun::star::reflection::XIdlMember
66 /** Returns the return type of the reflected method.
68 @return
69 return type of reflected method
71 XIdlClass getReturnType();
73 /** Returns the formal parameter types of the reflected method in order of IDL
74 declaration.
76 @return
77 formal parameter types of reflected method
79 sequence<XIdlClass> getParameterTypes();
81 /** Returns formal parameter informations of the reflected method
82 in order of IDL declaration.
83 Parameter information reflects the parameter's access mode (in, out, inout),
84 the parameter's name and formal type.
86 @return
87 parameter informations of reflected method
89 sequence<ParamInfo> getParameterInfos();
91 /** Returns the declared exceptions types of the reflected method.
93 @return
94 declared exception types of reflected method
96 sequence<com::sun::star::reflection::XIdlClass> getExceptionTypes();
98 /** Returns the method mode in which calls are run, i.e. either oneway or
99 twoway. Method mode oneway denotes that a call may be run asynchronously
100 (thus having no out parameters or return value)
102 @return
103 method mode of reflected method
105 com::sun::star::reflection::MethodMode getMode();
107 /** Invokes the reflected method on a given object with the given parameters.
108 The parameters may be widening converted to fit their exact IDL type,
109 meaning no loss of information.
111 @param obj
112 object to call on
113 @param args
114 arguments passed to the method
115 @return
116 return value of the method call (may be empty for methods returning void)
118 @throws IllegalArgumentException
119 if the given object is a nuull reference or does not support the reflected
120 method's interface
121 @throws IllegalArgumentException
122 if the given number of arguments differ from the expected number
123 or the given arguments' types differ from the expected ones (even a
124 widening conversion was not possible)
125 @throws InvocationTargetException
126 if the reflected method that has been invoked has thrown an exception.
127 The original exception will be wrapped up and signalled by the
128 InvocationTargetException
130 any invoke(
131 [in] any obj,
132 [inout] sequence<any> args )
133 raises( com::sun::star::lang::IllegalArgumentException,
134 com::sun::star::reflection::InvocationTargetException );
137 //=============================================================================
139 }; }; }; };
141 /*=============================================================================
143 =============================================================================*/
144 #endif