Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: beans ::

interface XIntrospectionAccess
Description
represents the result of an introspection operation done by the inspect method of XIntrospection.

This interface gives information about an object's properties and methods as detected in the introspection process. It's not possible to access properties or call methods directly using this interface but it provides access to other interfaces to do so. See XIntrospectionAccess::queryAdapter()

The XExactName interface has to be supported in order to implement inaccurate name access for all objects which implement the ::com::sun::star::container::XNameAccess interface or XPropertySet.

The XMaterialHolder interface has to be supported to give access to the inspected object.

See also
XPropertySet, XExactName

Methods' Summary
getSuppliedMethodConcepts returns information about which method concepts described in the MethodConcept constants group are supported by this XIntrospectionAccess implementation.  
getSuppliedPropertyConcepts returns information about which property concepts described in the PropertyConcept constants group are supported by this XIntrospectionAccess implementation.  
getProperty returns information about a property if a property with the demanded name exists and if it accords to one of the demanded PropertyConcepts. The information is provided as Property struct.  
hasProperty allows to ask if a property with the demanded name exists and if it accords to one of the demanded PropertyConcepts.  
getProperties returns a sequence of properties of the introspected object  
getMethod returns information about a method if a method with the demanded name exists and if it accords to one of the demanded MethodConcepts. The information is provided as ::com::sun::star::reflection::XIdlMethod.  
hasMethod allows to ask if a method with the demanded name exists and if it accords to one of the demanded MethodConcepts.  
getMethods returns a sequence of methods of the introspected object.  
getSupportedListeners returns the listener types supported by the introspected object.  
queryAdapter creates an adapter that implements an interface with the specified type.  
Methods' Details
getSuppliedMethodConcepts
long
getSuppliedMethodConcepts();

Description
returns information about which method concepts described in the MethodConcept constants group are supported by this XIntrospectionAccess implementation.

The minimum supported concepts should be:

  • MethodConcept::PROPERTY,
  • MethodConcept::LISTENER,
  • MethodConcept::ENUMERATION,
  • MethodConcept::NAMECONTAINER
  • MethodConcept::INDEXCONTAINER;
Returns
zero or more constants of the MethodConcept constants group combined by an arithmetical or-operation.
getSuppliedPropertyConcepts
long
getSuppliedPropertyConcepts();

Description
returns information about which property concepts described in the PropertyConcept constants group are supported by this XIntrospectionAccess implementation.

The minimum supported concepts should be:

  • PropertyConcept::PROPERTYSET,
  • PropertyConcept::ATTRIBUTES and
  • PropertyConcept::METHODS.
Returns
zero or more constants of the PropertyConcept constants group.combined by an arithmetical or-operation.
getProperty
Property
getProperty( [in] string  aName,
[in] long  nPropertyConcepts )
raises( ::com::sun::star::container::NoSuchElementException );

Description
returns information about a property if a property with the demanded name exists and if it accords to one of the demanded PropertyConcepts. The information is provided as Property struct.
Returns
A Property struct providing information about the demanded property, if a corresponding property exists.
Parameter aName
the name of the property.
Parameter nPropertyConcepts
zero or more constants of the PropertyConcept constants group combined by an arithmetical or-operation.
Throws
NoSuchElementException when a property with the demanded name doesn't exist or if it accords to a wrong PropertyConcept.
hasProperty
boolean
hasProperty( [in] string  aName,
[in] long  nPropertyConcepts );

Description
allows to ask if a property with the demanded name exists and if it accords to one of the demanded PropertyConcepts.
Returns
true if the property exists and accords to one of the demanded PropertyConcepts, otherwise false is returned.
Parameter aName
the name of the property.
Parameter nPropertyConcepts
zero or more constants of the PropertyConcept constants group combined by an arithmetical or-operation.
getProperties
sequence< Property >
getProperties( [in] long  nPropertyConcepts );

Description
returns a sequence of properties of the introspected object
Returns
all properties of the introspected object which accord to the demanded PropertyConcepts.
Parameter nPropertyConcepts
zero or more constants of the PropertyConcept constants group combined by an arithmetical or-operation.
getMethod
::com::sun::star::reflection::XIdlMethod
getMethod( [in] string  aName,
[in] long  nMethodConcepts )
raises( ::com::sun::star::lang::NoSuchMethodException );

Description
returns information about a method if a method with the demanded name exists and if it accords to one of the demanded MethodConcepts. The information is provided as ::com::sun::star::reflection::XIdlMethod.
Returns
A ::com::sun::star::reflection::XIdlMethod providing information about and access to the demanded method if a corresponding method exists.
Parameter aName
the name of the method.
Parameter nMethodConcepts
zero or more constants of the MethodConcept constants group combined by an arithmetical or-operation.
Throws
NoSuchElementException when a method with the demanded name doesn't exist or if it accords to a wrong MethodConcept.
hasMethod
boolean
hasMethod( [in] string  aName,
[in] long  nMethodConcepts );

Description
allows to ask if a method with the demanded name exists and if it accords to one of the demanded MethodConcepts.
Returns
true if the method exists and accords to one of the demanded MethodConcepts, otherwise false is returned.
Parameter aName
the name of the method.
Parameter nMethodConcepts
zero or more constants of the MethodConcept constants group combined by an arithmetical or-operation.
getMethods
sequence< ::com::sun::star::reflection::XIdlMethod >
getMethods( [in] long  nMethodConcepts );

Description
returns a sequence of methods of the introspected object.
Returns
all methods of the introspected object which accord to the demanded MethodConcepts.
Parameter nMethodConcepts
zero or more constants of the MethodConcept constants group combined by an arithmetical or-operation.
getSupportedListeners
sequence< type >
getSupportedListeners();

Description
returns the listener types supported by the introspected object.

If the introspected object has the methods addFooListener( XFooListener xFoo ) and removeFooListener( XFooListener xFoo ) the type of XFooListener will be one of the elements in the returned sequence.

Returns
a sequence of the types of listener interfaces which are supported by the introspected object.
queryAdapter
::com::sun::star::uno::XInterface
queryAdapter( [in] type  aInterfaceType )
raises( IllegalTypeException );

Description
creates an adapter that implements an interface with the specified type.

To access properties, query for the XPropertySet interface. If the XPropertySet can be queried, the XFastPropertySet interface must be supported too.

If the introspected object implements a name container, the introspection should return the ::com::sun::star::container::XNameAccess and ::com::sun::star::container::XNameContainer interfaces.

If the introspected object implements an index container, the introspection should return the ::com::sun::star::container::XIndexAccess and ::com::sun::star::container::XIndexContainer interfaces.

If the introspected object implements an enumeration container, the introspection should return the ::com::sun::star::container::XEnumerationAccess interface.

If the introspected object implements the ::com::sun::star::reflection::XIdlArray interface, the introspection should return this.

To implement inaccurate name access, at all objects, which implement the ::com::sun::star::container::XNameAccess or XPropertySet interface, the XExactName interface has to be supported.

See also
XExactName
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.