Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: reflection ::

interface XIdlMethod
Base Interfaces
XIdlMethodXIdlMember

XIdlMember
(referenced interface's summary:)
Base interface for XIdlField2s and XIdlMethods.
Description
Reflects an IDL interface method.

Methods' Summary
getReturnType Returns the return type of the reflected method.  
getParameterTypes Returns the formal parameter types of the reflected method in order of IDL declaration.  
getParameterInfos Returns formal parameter informations 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.  
getExceptionTypes Returns the declared exceptions types of the reflected method.  
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)  
invoke 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.  
Methods' Details
getReturnType
XIdlClass
getReturnType();

Description
Returns the return type of the reflected method.
Returns
return type of reflected method
getParameterTypes
sequence< XIdlClass >
getParameterTypes();

Description
Returns the formal parameter types of the reflected method in order of IDL declaration.
Returns
formal parameter types of reflected method
getParameterInfos
sequence< ParamInfo >
getParameterInfos();

Description
Returns formal parameter informations 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 informations of reflected method
getExceptionTypes
sequence< XIdlClass >
getExceptionTypes();

Description
Returns the declared exceptions types of the reflected method.
Returns
declared exception types of reflected method
getMode
MethodMode
getMode();

Description
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
invoke
any
invoke( [in] any  obj,
[inout] sequence< any >  args )
raises( ::com::sun::star::lang::IllegalArgumentException,
InvocationTargetException );

Description
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.
Parameter obj
object to call on
Parameter args
arguments passed to the method
Returns
return value of the method call (may be empty for methods returning void)
Throws
IllegalArgumentException if the given object is a nuull reference or does not support the reflected method's interface
Throws
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)
Throws
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
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.