1*408a4873SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*408a4873SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*408a4873SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*408a4873SAndrew Rist * distributed with this work for additional information 6*408a4873SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*408a4873SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*408a4873SAndrew Rist * "License"); you may not use this file except in compliance 9*408a4873SAndrew Rist * with the License. You may obtain a copy of the License at 10*408a4873SAndrew Rist * 11*408a4873SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*408a4873SAndrew Rist * 13*408a4873SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*408a4873SAndrew Rist * software distributed under the License is distributed on an 15*408a4873SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*408a4873SAndrew Rist * KIND, either express or implied. See the License for the 17*408a4873SAndrew Rist * specific language governing permissions and limitations 18*408a4873SAndrew Rist * under the License. 19*408a4873SAndrew Rist * 20*408a4873SAndrew Rist *************************************************************/ 21*408a4873SAndrew Rist 22*408a4873SAndrew Rist 23cdf0e10cSrcweir#ifndef __com_sun_star_reflection_XIdlMethod_idl__ 24cdf0e10cSrcweir#define __com_sun_star_reflection_XIdlMethod_idl__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_reflection_XIdlMember_idl__ 27cdf0e10cSrcweir#include <com/sun/star/reflection/XIdlMember.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir 30cdf0e10cSrcweir#ifndef __com_sun_star_reflection_ParamInfo_idl__ 31cdf0e10cSrcweir#include <com/sun/star/reflection/ParamInfo.idl> 32cdf0e10cSrcweir#endif 33cdf0e10cSrcweir 34cdf0e10cSrcweir#ifndef __com_sun_star_reflection_MethodMode_idl__ 35cdf0e10cSrcweir#include <com/sun/star/reflection/MethodMode.idl> 36cdf0e10cSrcweir#endif 37cdf0e10cSrcweir 38cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 39cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl> 40cdf0e10cSrcweir#endif 41cdf0e10cSrcweir 42cdf0e10cSrcweir#ifndef __com_sun_star_reflection_InvocationTargetException_idl__ 43cdf0e10cSrcweir#include <com/sun/star/reflection/InvocationTargetException.idl> 44cdf0e10cSrcweir#endif 45cdf0e10cSrcweir 46cdf0e10cSrcweir 47cdf0e10cSrcweir//============================================================================= 48cdf0e10cSrcweir 49cdf0e10cSrcweir module com { module sun { module star { module reflection { 50cdf0e10cSrcweir 51cdf0e10cSrcweir published interface XIdlClass; 52cdf0e10cSrcweir 53cdf0e10cSrcweir//============================================================================= 54cdf0e10cSrcweir 55cdf0e10cSrcweir/** Reflects an IDL interface method. 56cdf0e10cSrcweir*/ 57cdf0e10cSrcweirpublished interface XIdlMethod: com::sun::star::reflection::XIdlMember 58cdf0e10cSrcweir{ 59cdf0e10cSrcweir /** Returns the return type of the reflected method. 60cdf0e10cSrcweir 61cdf0e10cSrcweir @return 62cdf0e10cSrcweir return type of reflected method 63cdf0e10cSrcweir */ 64cdf0e10cSrcweir XIdlClass getReturnType(); 65cdf0e10cSrcweir 66cdf0e10cSrcweir /** Returns the formal parameter types of the reflected method in order of IDL 67cdf0e10cSrcweir declaration. 68cdf0e10cSrcweir 69cdf0e10cSrcweir @return 70cdf0e10cSrcweir formal parameter types of reflected method 71cdf0e10cSrcweir */ 72cdf0e10cSrcweir sequence<XIdlClass> getParameterTypes(); 73cdf0e10cSrcweir 74cdf0e10cSrcweir /** Returns formal parameter informations of the reflected method 75cdf0e10cSrcweir in order of IDL declaration. 76cdf0e10cSrcweir Parameter information reflects the parameter's access mode (in, out, inout), 77cdf0e10cSrcweir the parameter's name and formal type. 78cdf0e10cSrcweir 79cdf0e10cSrcweir @return 80cdf0e10cSrcweir parameter informations of reflected method 81cdf0e10cSrcweir */ 82cdf0e10cSrcweir sequence<ParamInfo> getParameterInfos(); 83cdf0e10cSrcweir 84cdf0e10cSrcweir /** Returns the declared exceptions types of the reflected method. 85cdf0e10cSrcweir 86cdf0e10cSrcweir @return 87cdf0e10cSrcweir declared exception types of reflected method 88cdf0e10cSrcweir */ 89cdf0e10cSrcweir sequence<com::sun::star::reflection::XIdlClass> getExceptionTypes(); 90cdf0e10cSrcweir 91cdf0e10cSrcweir /** Returns the method mode in which calls are run, i.e. either oneway or 92cdf0e10cSrcweir twoway. Method mode oneway denotes that a call may be run asynchronously 93cdf0e10cSrcweir (thus having no out parameters or return value) 94cdf0e10cSrcweir 95cdf0e10cSrcweir @return 96cdf0e10cSrcweir method mode of reflected method 97cdf0e10cSrcweir */ 98cdf0e10cSrcweir com::sun::star::reflection::MethodMode getMode(); 99cdf0e10cSrcweir 100cdf0e10cSrcweir /** Invokes the reflected method on a given object with the given parameters. 101cdf0e10cSrcweir The parameters may be widening converted to fit their exact IDL type, 102cdf0e10cSrcweir meaning no loss of information. 103cdf0e10cSrcweir 104cdf0e10cSrcweir @param obj 105cdf0e10cSrcweir object to call on 106cdf0e10cSrcweir @param args 107cdf0e10cSrcweir arguments passed to the method 108cdf0e10cSrcweir @return 109cdf0e10cSrcweir return value of the method call (may be empty for methods returning void) 110cdf0e10cSrcweir 111cdf0e10cSrcweir @throws IllegalArgumentException 112cdf0e10cSrcweir if the given object is a nuull reference or does not support the reflected 113cdf0e10cSrcweir method's interface 114cdf0e10cSrcweir @throws IllegalArgumentException 115cdf0e10cSrcweir if the given number of arguments differ from the expected number 116cdf0e10cSrcweir or the given arguments' types differ from the expected ones (even a 117cdf0e10cSrcweir widening conversion was not possible) 118cdf0e10cSrcweir @throws InvocationTargetException 119cdf0e10cSrcweir if the reflected method that has been invoked has thrown an exception. 120cdf0e10cSrcweir The original exception will be wrapped up and signalled by the 121cdf0e10cSrcweir InvocationTargetException 122cdf0e10cSrcweir */ 123cdf0e10cSrcweir any invoke( 124cdf0e10cSrcweir [in] any obj, 125cdf0e10cSrcweir [inout] sequence<any> args ) 126cdf0e10cSrcweir raises( com::sun::star::lang::IllegalArgumentException, 127cdf0e10cSrcweir com::sun::star::reflection::InvocationTargetException ); 128cdf0e10cSrcweir}; 129cdf0e10cSrcweir 130cdf0e10cSrcweir//============================================================================= 131cdf0e10cSrcweir 132cdf0e10cSrcweir}; }; }; }; 133cdf0e10cSrcweir 134cdf0e10cSrcweir/*============================================================================= 135cdf0e10cSrcweir 136cdf0e10cSrcweir=============================================================================*/ 137cdf0e10cSrcweir#endif 138