Hi there,

maybe I am overlooking the obvious.

When creating a service object like:
o = context.getServiceManager().createInstanceWithContext("com.sun.star.frame.Desktop", context );
and therafter using reflection (theCoreReflection is a reference to "/singletons/com.sun.star.reflection.theCoreReflection" from a default bootstraped context, ie. context=Bootstrap.bootstrap()):
XIdlClass xidl=theCoreReflection.getType(o);
String name=xidl.getName(); // returns the fully qualified type name
will return as type "com.sun.star.uno.XInterface" instead of "com.sun.star.frame.Desktop". This is true for any service one instantiates via Java.

---

Also, any interface object will also return an XIdlClass representing "com.sun.star.uno.XInterface" instead of the class representing the respective interface class.

---.

Is this working as designed (the behaviour is the same on OOo 1.5 and 2.0) ? If so, how can one unambiguously retrieve the typename of any object at runtime from Java (ie. get its fully qualified class name)?

Regards,

---rony




Reply via email to