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

(Global Index)

Syntax

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

Description

has the same functionallity as XIdlField .

XIdlField2 correct a specification error of the com::sun::star::reflection::XIdlField::set method. The first parameter the object itself must be specified as an [inout] parameter.

This new interface must be implemented in all places where XIdlField is implemented. For a correct working XIdlField2::set method in all use cases a queryInterface to XIdlField2 is necessary.

Method Summary

getType

getAccessMode

get

set sets the field represented by this XIdlField2 on the specified object argument to the specified new value.

Method Details



getType

Syntax

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

Returns

an XIdlClass object that identifies the declared type for the field represented by this XIdlField .

getAccessMode

Syntax

com::sun::star::reflection::FieldAccessMode getAccessMode ();

Returns

an enumeration value which denotes whether the field is "const", "readonly", "writeonly", or "readwrite".

get

Syntax

any get (
any obj )
raises ( com::sun::star::lang::IllegalArgumentException );

Returns

the value of the field represented by this field on the specified object.

The underlying field's value is obtained as follows:

  • If the underlying field is a constant, the object argument is ignored; it may be NULL.
  • Otherwise, the underlying field is an instance field. If the specified object argument is NULL, the method throws an "IllegalArgumentException". If the specified object is not an instance of the class, interface, struct, union, or enum declaring the underlying field, the method throws an "IllegalArgumentException".
  • Otherwise, the value is retrieved from the underlying instance or constant.

Throws

IllegalArgumentException if the specified object is NULL and if the specified object is not an instance of the class or interface declaring the underlying field.

set

Syntax

void set (
any obj,
any value )
raises ( com::sun::star::lang::IllegalArgumentException , com::sun::star::lang::IllegalAccessException );

Description

sets the field represented by this XIdlField2 on the specified object argument to the specified new value.

The operation proceeds as follows:

  • If the specified object argument is NULL, the method throws an IllegalArgumentException . If the specified object argument is not an instance of the class or interface declaring the underlying field, then the method throws an IllegalArgumentException .
  • If the underlying field is constant, the method throws an IllegalAccessException .

    If the new value cannot be converted to the type of underlying field by an identity or widening conversion, the method throws an IllegalArgumentException .

The field is set to the possibly widened new value.

Top of Page