interface XIdlMethod in module com::sun::star::reflection::

(Global Index)

Syntax

interface XIdlMethod : com::sun::star::reflection::XIdlMember ;

Description

makes it possible to access the specification of a method dynamically.

Method Summary

getReturnType

getParameterTypes * Returns a sequence of XIdlClass objects that represent the formal * parameter types, in declaration order, of the method * represented by this Method object. Returns a sequence of length * 0 if the underlying method takes no parameters.

getParameterInfos * Returns a sequence of ParamInfo objects that represent all informations * about the formal parameter types, in declaration order, of the method * represented by this Method object. Returns a sequence of length * 0 if the underlying method takes no parameters.

getExceptionTypes * Returns a sequence of XIdlClass objects that represent the types of * the checked exceptions thrown by the underlying method * represented by this Method object. Returns a sequence of length * 0 if the method throws no checked exceptions.

getMode

invoke Invokes the underlying method represented by this method object on the specified object with the specified parameters. Individual parameters are subject to widening conversions as necessary.

Method Details



getReturnType

Syntax

com::sun::star::reflection::XIdlClass getReturnType ();

Description

Returns

an XIdlClass object that represents the formal return type of the method represented by this method object.

getParameterTypes

Syntax

sequence< com::sun::star::reflection::XIdlClass > getParameterTypes ();

Description

* Returns a sequence of XIdlClass objects that represent the formal * parameter types, in declaration order, of the method * represented by this Method object. Returns a sequence of length * 0 if the underlying method takes no parameters.


getParameterInfos

Syntax

sequence< com::sun::star::reflection::ParamInfo > getParameterInfos ();

Description

* Returns a sequence of ParamInfo objects that represent all informations * about the formal parameter types, in declaration order, of the method * represented by this Method object. Returns a sequence of length * 0 if the underlying method takes no parameters.


getExceptionTypes

Syntax

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

Description

* Returns a sequence of XIdlClass objects that represent the types of * the checked exceptions thrown by the underlying method * represented by this Method object. Returns a sequence of length * 0 if the method throws no checked exceptions.


getMode

Syntax

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

Description

Returns

an enumeration value which denotes whether the method is one-way or two-way.

invoke

Syntax

any invoke (
any obj,
sequence< any > args )
raises ( com::sun::star::lang::IllegalArgumentException , com::sun::star::reflection::InvocationTargetException );

Description

Invokes the underlying method represented by this method object on the specified object with the specified parameters. Individual parameters are subject to widening conversions as necessary.

Method invocation proceeds in the following order of steps:

If the specified object argument is NULL, the invocation throws an IllegalArgumentException . Otherwise, if the specified object argument is not an instance of the class or interface declaring the underlying method, the invocation throws an IllegalArgumentException .

If the number of actual parameters supplied via args is different from the number of formal parameters required by the underlying method, the invocation throws an IllegalArgumentException .

For each actual parameter in the supplied args array:

If the parameter value cannot be converted to the corresponding formal parameter type by an identity or widening conversion, the invocation throws an IllegalArgumentException .

When the control transfers to the underlying method and the method stops abruptly by throwing an exception, the exception is placed in an InvocationTargetException and thrown in turn to the caller of .

If the method completes normally, the value it returns is returned to the caller of . If the underlying method return type is void, the invocation returns void> .

Top of Page