LibreOffice: XIdlMethod Interface Reference

LibreOffice LibreOffice 5.3 SDK API Reference

Public Member Functions | List of all members
XIdlMethod Interface Referencepublished

Reflects an IDL interface method. More...

`import"XIdlMethod.idl";`

Inheritance diagram for XIdlMethod:

## Public Member Functions
XIdlClass | getReturnType ()
| Returns the return type of the reflected method. More...
sequence< XIdlClass > | getParameterTypes ()
| Returns the formal parameter types of the reflected method in order of IDL declaration. More...
sequence< ParamInfo > | getParameterInfos ()
| Returns formal parameter information of the reflected method in order of IDL declaration. More...
sequence< com::sun::star::reflection::XIdlClass > | getExceptionTypes ()
| Returns the declared exceptions types of the reflected method. More...
com::sun::star::reflection::MethodMode | getMode ()
| Returns the method mode in which calls are run, i.e. More...
any | invoke ([in] any obj, [inout] sequence< any > args) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::reflection::InvocationTargetException )
| Invokes the reflected method on a given object with the given parameters. More...
Public Member Functions inherited from XIdlMember
XIdlClass | getDeclaringClass ()
| Returns the declaring type of this field, i.e. More...
string | getName ()
| Returns the fully-qualified name of the member. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Detailed Description

Reflects an IDL interface method.

## Member Function Documentation

## ◆ getExceptionTypes()

sequence<com::sun::star::reflection::XIdlClass> getExceptionTypes | ( |  | ) |

Returns the declared exceptions types of the reflected method.

Returns
  declared exception types of reflected method

## ◆ getMode()

com::sun::star::reflection::MethodMode getMode | ( |  | ) |

Returns the method mode in which calls are run, i.e.

either oneway or twoway. Method mode oneway denotes that a call may be run asynchronously (thus having no out parameters or return value)

Returns
  method mode of reflected method

## ◆ getParameterInfos()

sequence<ParamInfo> getParameterInfos | ( |  | ) |

Returns formal parameter information of the reflected method in order of IDL declaration.

Parameter information reflects the parameter's access mode (in, out, inout), the parameter's name and formal type.

Returns
  parameter information of reflected method

## ◆ getParameterTypes()

sequence<XIdlClass> getParameterTypes | ( |  | ) |

Returns the formal parameter types of the reflected method in order of IDL declaration.

Returns
  formal parameter types of reflected method

## ◆ getReturnType()

XIdlClass getReturnType | ( |  | ) |

Returns the return type of the reflected method.

Returns
  return type of reflected method

## ◆ invoke()

any invoke | ( | [in] any | obj,
|  | [inout] sequence< any > | args
| ) |  |
raises | ( | com::sun::star::lang::IllegalArgumentException,
|  | com::sun::star::reflection::InvocationTargetException
| ) |  |

Invokes the reflected method on a given object with the given parameters.

The parameters may be widening converted to fit their exact IDL type, meaning no loss of information.

Parameters

  obj | object to call on
  args | arguments passed to the method

Returns
  return value of the method call (may be empty for methods returning void)

Exceptions

  IllegalArgumentException | if the given object is a nuull reference or does not support the reflected method's interface
  IllegalArgumentException | if the given number of arguments differ from the expected number or the given arguments' types differ from the expected ones (even a widening conversion was not possible)
  InvocationTargetException | if the reflected method that has been invoked has thrown an exception. The original exception will be wrapped up and signalled by the InvocationTargetException

The documentation for this interface was generated from the following file:

- com/sun/star/reflection/XIdlMethod.idl