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