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:
com.sun.star.lang.XComponent
,com.sun.star.lang.XServiceInfo
,com.sun.star.lang.XSingleComponentFactory
,com.sun.star.lang.XTypeProvider
,com.sun.star.uno.XInterface
,com.sun.star.uno.XWeak
public class Factory extends ComponentBase implements com.sun.star.lang.XSingleComponentFactory, com.sun.star.lang.XServiceInfo
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static com.sun.star.lang.XSingleComponentFactory
createComponentFactory(java.lang.Class impl_class, java.lang.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 com.sun.star.lang.XSingleComponentFactory
createComponentFactory(java.lang.Class impl_class, java.lang.String impl_name, java.lang.String[] supported_services)
Creates an object factory supporting interfaces com.sun.star.lang.XSingleComponentFactory and com.sun.star.lang.XServiceInfojava.lang.Object
createInstanceWithArgumentsAndContext(java.lang.Object[] arguments, com.sun.star.uno.XComponentContext xContext)
java.lang.Object
createInstanceWithContext(com.sun.star.uno.XComponentContext xContext)
java.lang.String
getImplementationName()
java.lang.String[]
getSupportedServiceNames()
boolean
supportsService(java.lang.String service_name)
static boolean
writeRegistryServiceInfo(java.lang.String impl_name, java.lang.String[] supported_services, com.sun.star.registry.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 Detail
-
createComponentFactory
public static com.sun.star.lang.XSingleComponentFactory createComponentFactory(java.lang.Class impl_class, java.lang.String impl_name, java.lang.String[] supported_services) throws com.sun.star.uno.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:
com.sun.star.uno.RuntimeException
- Since:
- UDK 3.2.13
-
createComponentFactory
public static com.sun.star.lang.XSingleComponentFactory createComponentFactory(java.lang.Class impl_class, java.lang.String[] supported_services) throws com.sun.star.uno.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:
com.sun.star.uno.RuntimeException
-
writeRegistryServiceInfo
public static boolean writeRegistryServiceInfo(java.lang.String impl_name, java.lang.String[] supported_services, com.sun.star.registry.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
public final java.lang.Object createInstanceWithContext(com.sun.star.uno.XComponentContext xContext) throws com.sun.star.uno.Exception
- Specified by:
createInstanceWithContext
in interfacecom.sun.star.lang.XSingleComponentFactory
- Throws:
com.sun.star.uno.Exception
-
createInstanceWithArgumentsAndContext
public final java.lang.Object createInstanceWithArgumentsAndContext(java.lang.Object[] arguments, com.sun.star.uno.XComponentContext xContext) throws com.sun.star.uno.Exception
- Specified by:
createInstanceWithArgumentsAndContext
in interfacecom.sun.star.lang.XSingleComponentFactory
- Throws:
com.sun.star.uno.Exception
-
getImplementationName
public final java.lang.String getImplementationName()
- Specified by:
getImplementationName
in interfacecom.sun.star.lang.XServiceInfo
-
supportsService
public final boolean supportsService(java.lang.String service_name)
- Specified by:
supportsService
in interfacecom.sun.star.lang.XServiceInfo
-
getSupportedServiceNames
public final java.lang.String[] getSupportedServiceNames()
- Specified by:
getSupportedServiceNames
in interfacecom.sun.star.lang.XServiceInfo
-
-