Package com.sun.star.lib.uno.helper
Class Factory
java.lang.Object
com.sun.star.lib.uno.helper.WeakBase
com.sun.star.lib.uno.helper.ComponentBase
com.sun.star.lib.uno.helper.Factory
- All Implemented Interfaces:
XComponent
,XServiceInfo
,XSingleComponentFactory
,XTypeProvider
,XInterface
,XWeak
Factory helper class supporting com.sun.star.lang.XServiceInfo and
com.sun.star.lang.XSingleComponentFactory.
Note: This factory implementation does not support lang.XSingleServiceFactory.
-
Field Summary
Fields inherited from class com.sun.star.lib.uno.helper.ComponentBase
bDisposed, bInDispose, listenerContainer
Fields inherited from interface com.sun.star.lang.XComponent
UNOTYPEINFO
Fields inherited from interface com.sun.star.lang.XServiceInfo
UNOTYPEINFO
Fields inherited from interface com.sun.star.lang.XSingleComponentFactory
UNOTYPEINFO
Fields inherited from interface com.sun.star.lang.XTypeProvider
UNOTYPEINFO
Fields inherited from interface com.sun.star.uno.XWeak
UNOTYPEINFO
-
Method Summary
Modifier and TypeMethodDescriptionstatic XSingleComponentFactory
createComponentFactory
(Class impl_class, String[] supported_services) Creates an object factory supporting interfaces com.sun.star.lang.XSingleComponentFactory and com.sun.star.lang.XServiceInfo The implementation name is the name of the implementation class.static XSingleComponentFactory
createComponentFactory
(Class impl_class, String impl_name, String[] supported_services) Creates an object factory supporting interfaces com.sun.star.lang.XSingleComponentFactory and com.sun.star.lang.XServiceInfofinal Object
createInstanceWithArgumentsAndContext
(Object[] arguments, XComponentContext xContext) final Object
createInstanceWithContext
(XComponentContext xContext) final String
final String[]
final boolean
supportsService
(String service_name) static boolean
writeRegistryServiceInfo
(String impl_name, String[] supported_services, XRegistryKey xKey) Writes component's implementation info to given registry key.Methods inherited from class com.sun.star.lib.uno.helper.ComponentBase
addEventListener, dispose, finalize, postDisposing, preDisposing, removeEventListener
Methods inherited from class com.sun.star.lib.uno.helper.WeakBase
getImplementationId, getTypes, queryAdapter
-
Method Details
-
createComponentFactory
public static XSingleComponentFactory createComponentFactory(Class impl_class, String impl_name, String[] supported_services) throws RuntimeException Creates an object factory supporting interfaces com.sun.star.lang.XSingleComponentFactory and com.sun.star.lang.XServiceInfo- Parameters:
impl_class
- implementation classimpl_name
- implementation namesupported_services
- services implemented- Returns:
- object factory
- Throws:
RuntimeException
- Since:
- UDK 3.2.13
-
createComponentFactory
public static XSingleComponentFactory createComponentFactory(Class impl_class, String[] supported_services) throws RuntimeException Creates an object factory supporting interfaces com.sun.star.lang.XSingleComponentFactory and com.sun.star.lang.XServiceInfo The implementation name is the name of the implementation class.- Parameters:
impl_class
- implementation classsupported_services
- services implemented- Returns:
- object factory
- Throws:
RuntimeException
-
writeRegistryServiceInfo
public static boolean writeRegistryServiceInfo(String impl_name, String[] supported_services, XRegistryKey xKey) Writes component's implementation info to given registry key.- Parameters:
impl_name
- name of implementationsupported_services
- supported services of implementationxKey
- registry key to write to- Returns:
- success
-
createInstanceWithContext
- Specified by:
createInstanceWithContext
in interfaceXSingleComponentFactory
- Throws:
Exception
-
createInstanceWithArgumentsAndContext
public final Object createInstanceWithArgumentsAndContext(Object[] arguments, XComponentContext xContext) throws Exception - Specified by:
createInstanceWithArgumentsAndContext
in interfaceXSingleComponentFactory
- Throws:
Exception
-
getImplementationName
- Specified by:
getImplementationName
in interfaceXServiceInfo
-
supportsService
- Specified by:
supportsService
in interfaceXServiceInfo
-
getSupportedServiceNames
- Specified by:
getSupportedServiceNames
in interfaceXServiceInfo
-