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_XIdlMethod_idl__
28#define __com_sun_star_reflection_XIdlMethod_idl__
29
30#ifndef __com_sun_star_reflection_XIdlMember_idl__
31#include <com/sun/star/reflection/XIdlMember.idl>
32#endif
33
34#ifndef __com_sun_star_reflection_ParamInfo_idl__
35#include <com/sun/star/reflection/ParamInfo.idl>
36#endif
37
38#ifndef __com_sun_star_reflection_MethodMode_idl__
39#include <com/sun/star/reflection/MethodMode.idl>
40#endif
41
42#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
43#include <com/sun/star/lang/IllegalArgumentException.idl>
44#endif
45
46#ifndef __com_sun_star_reflection_InvocationTargetException_idl__
47#include <com/sun/star/reflection/InvocationTargetException.idl>
48#endif
49
50
51//=============================================================================
52
53 module com {  module sun {  module star {  module reflection {
54
55 published interface XIdlClass;
56
57//=============================================================================
58
59/** Reflects an IDL interface method.
60*/
61published interface XIdlMethod: com::sun::star::reflection::XIdlMember
62{
63	/** Returns the return type of the reflected method.
64
65        @return
66                return type of reflected method
67    */
68	XIdlClass getReturnType();
69
70	/** Returns the formal parameter types of the reflected method in order of IDL
71        declaration.
72
73        @return
74                formal parameter types of reflected method
75    */
76	sequence<XIdlClass> getParameterTypes();
77
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.
82
83        @return
84                parameter informations of reflected method
85    */
86	sequence<ParamInfo> getParameterInfos();
87
88	/** Returns the declared exceptions types of the reflected method.
89
90        @return
91                declared exception types of reflected method
92    */
93	sequence<com::sun::star::reflection::XIdlClass> getExceptionTypes();
94
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)
98
99        @return
100                method mode of reflected method
101    */
102	com::sun::star::reflection::MethodMode getMode();
103
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.
107
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)
114
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
126    */
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 );
132};
133
134//=============================================================================
135
136}; }; }; };
137
138/*=============================================================================
139
140=============================================================================*/
141#endif
142