Difference between revisions of "Uno/Article/Types&Reflection"

From Apache OpenOffice Wiki
< Uno
Jump to: navigation, search
m (Fixed: section level.)
m (Added some links. Replaced UNO with Uno.)
Line 1: Line 1:
UNO provides several ways to access, get and deal with types of objects and values.  
+
[[Uno]] provides several ways to access, get and deal with types of objects and values.  
  
; [http://api.openoffice.org/docs/common/ref/com/sun/star/reflection/CoreReflection.html com.sun.star.refelction.CoreReflection]: Gives access to the methods etc. of the passed type name, respectively methods etc. of the exact type of the passed object. Methods, attributes etc. can be "called" directly. The CoreReflection is only available for Binary UNO, e.g. there is no such service for pure Java-UNO.
+
; [http://api.openoffice.org/docs/common/ref/com/sun/star/reflection/CoreReflection.html com.sun.star.refelction.CoreReflection]: Gives access to the methods etc. of the passed type name, respectively methods etc. of the exact type of the passed object. Methods, attributes etc. can be "called" directly. The CoreReflection is only available for [[Uno/Binary|Binary Uno]], e.g. there is no such service for pure [[Uno/Java|Java Uno]].
  
 
; [http://api.openoffice.org/docs/common/ref/com/sun/star/beans/Introspection.html com.sun.star.beans.Introspection]: Gives access to all methods and interfaces of the passed object as an integrated entity. The Introspection relies on the CoreReflection and on the object to implement the XTypeProvider interface. E.g. in contrast to the CoreReflection, Introspection unifies property and attribute information.
 
; [http://api.openoffice.org/docs/common/ref/com/sun/star/beans/Introspection.html com.sun.star.beans.Introspection]: Gives access to all methods and interfaces of the passed object as an integrated entity. The Introspection relies on the CoreReflection and on the object to implement the XTypeProvider interface. E.g. in contrast to the CoreReflection, Introspection unifies property and attribute information.
  
; [http://api.openoffice.org/docs/common/ref/com/sun/star/script/Invocation.html com.sun.star.scrip.Invocation]: A service for dynamically invoking a method of a particular object. This service was designed for scripting languages connection to UNO. It also takes care of needed type conversions (with the help of the script.Converter service) etc. The Invocation relies on the CoreReflection.
+
; [http://api.openoffice.org/docs/common/ref/com/sun/star/script/Invocation.html com.sun.star.scrip.Invocation]: A service for dynamically invoking a method of a particular object. This service was designed for scripting languages connection to [[Uno]]. It also takes care of needed type conversions (with the help of the script.Converter service) etc. The Invocation relies on the CoreReflection.
  
; [http://api.openoffice.org/docs/common/ref/com/sun/star/reflection/TypeDescriptionProvider.html com.sun.star.reflection.TypeDescriptionProvider] / [http://api.openoffice.org/docs/common/ref/com/sun/star/reflection/TypeDescriptionManager.html com.sun.star.reflection.TypeDescriptionManager]: Services providing access to type descriptions. The TypeDescriptionManager just delegates requests to the registered providers. The returned type descriptions are different of what the CoreReflection provides and are for informational purposes only. E.g. the remote bridges use these type descriptions. Additionally, the TypeDescriptionManager caches typedescription objects and the TypeDescriptionManager is the only source that reflects all [[Uno/Spec/IDL|IDL]] (Interface Definition Language) information with the exception of documentation.
+
; [http://api.openoffice.org/docs/common/ref/com/sun/star/reflection/TypeDescriptionProvider.html com.sun.star.reflection.TypeDescriptionProvider] / [http://api.openoffice.org/docs/common/ref/com/sun/star/reflection/TypeDescriptionManager.html com.sun.star.reflection.TypeDescriptionManager]: Services providing access to type descriptions. The TypeDescriptionManager just delegates requests to the registered providers. The returned type descriptions are different of what the CoreReflection provides and are for informational purposes only. E.g. the remote bridges use these type descriptions. Additionally, the TypeDescriptionManager caches typedescription objects and the TypeDescriptionManager is the only source that reflects all Uno [[Uno/Spec/IDL|IDL]] (Interface Definition Language) information with the exception of documentation.
 
: The current TypeDescriptionManager is available as a singleton "/singletons/com.sun.star.reflection.theTypeDescriptionManager" by querying the ComponentContext.
 
: The current TypeDescriptionManager is available as a singleton "/singletons/com.sun.star.reflection.theTypeDescriptionManager" by querying the ComponentContext.
  
Line 19: Line 19:
 
* [[XIDLReflection_Interface|XIdlReflection Interface]]
 
* [[XIDLReflection_Interface|XIdlReflection Interface]]
 
* Writing a Program to Control OpenOffice.org, by Franco Pingiori — [http://www.linuxjournal.com/article/8550 Part 1] and [http://www.linuxjournal.com/article/8608 Part 2], Linux Journal
 
* Writing a Program to Control OpenOffice.org, by Franco Pingiori — [http://www.linuxjournal.com/article/8550 Part 1] and [http://www.linuxjournal.com/article/8608 Part 2], Linux Journal
 +
  
 
[[Category:Uno:Tutorials]]
 
[[Category:Uno:Tutorials]]
 
 
 
[[Category:Uno:Article]]
 
[[Category:Uno:Article]]

Revision as of 08:58, 28 September 2006

Uno provides several ways to access, get and deal with types of objects and values.

com.sun.star.refelction.CoreReflection
Gives access to the methods etc. of the passed type name, respectively methods etc. of the exact type of the passed object. Methods, attributes etc. can be "called" directly. The CoreReflection is only available for Binary Uno, e.g. there is no such service for pure Java Uno.
com.sun.star.beans.Introspection
Gives access to all methods and interfaces of the passed object as an integrated entity. The Introspection relies on the CoreReflection and on the object to implement the XTypeProvider interface. E.g. in contrast to the CoreReflection, Introspection unifies property and attribute information.
com.sun.star.scrip.Invocation
A service for dynamically invoking a method of a particular object. This service was designed for scripting languages connection to Uno. It also takes care of needed type conversions (with the help of the script.Converter service) etc. The Invocation relies on the CoreReflection.
com.sun.star.reflection.TypeDescriptionProvider / com.sun.star.reflection.TypeDescriptionManager
Services providing access to type descriptions. The TypeDescriptionManager just delegates requests to the registered providers. The returned type descriptions are different of what the CoreReflection provides and are for informational purposes only. E.g. the remote bridges use these type descriptions. Additionally, the TypeDescriptionManager caches typedescription objects and the TypeDescriptionManager is the only source that reflects all Uno IDL (Interface Definition Language) information with the exception of documentation.
The current TypeDescriptionManager is available as a singleton "/singletons/com.sun.star.reflection.theTypeDescriptionManager" by querying the ComponentContext.
com.sun.star.lang.XTypeProvider
An to be implemented interface providing all interfaces of an object, the Introspection and OOo BASIC rely on objects to implement this interface.
com.sun.star.lang.XServiceInfo
An interface providing the implementation name and the supported services of an object. This was/is needed for objects not implemented using the new multiple inheritance stuff.

See also

Personal tools