Top Description Fields Constructors Methods
com.sun.star.lib.uno.helper

public Class Factory

extends ComponentBase
implements com.sun.star.lang.XSingleComponentFactory, com.sun.star.lang.XServiceInfo
Class Inheritance
Imports
com.sun.star.uno.XComponentContext, com.sun.star.lang.XSingleComponentFactory, com.sun.star.lang.XServiceInfo, com.sun.star.lang.XInitialization, com.sun.star.registry.XRegistryKey, com.sun.star.uno.UnoRuntime

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

Modifier and TypeField and Description
private static final boolean
private final Constructor<T>
private final Class<?>
private final String
private final Method
private final String[]
Inherited from com.sun.star.lib.uno.helper.ComponentBase:
bDisposedbInDisposeEVT_LISTENER_TYPElistenerContainer

Constructor Summary

AccessConstructor and Description
private
Factory(Class<T> impl_class, String impl_name, String[] supported_services)

Method Summary

Modifier and TypeMethod and Description
public static com.sun.star.lang.XSingleComponentFactory

Returns:

object factory
createComponentFactory
(Class<T>
implementation class
impl_class
,
String
implementation name
impl_name
,
String[]
services implemented
supported_services
)

Creates an object factory supporting interfaces com.sun.star.lang.XSingleComponentFactory and com.sun.star.lang.XServiceInfo

public static com.sun.star.lang.XSingleComponentFactory

Returns:

object factory
createComponentFactory
(Class<T>
implementation class
impl_class
,
String[]
services implemented
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.

public final Object
createInstanceWithArgumentsAndContext(Object[] arguments, com.sun.star.uno.XComponentContext xContext)

public final Object
createInstanceWithContext(com.sun.star.uno.XComponentContext xContext)

public final String
public final String[]
private Object
instantiate(com.sun.star.uno.XComponentContext xContext)

public final boolean
supportsService(String service_name)

public static boolean

Returns:

success
writeRegistryServiceInfo
(String
name of implementation
impl_name
,
String[]
supported services of implementation
supported_services
,
com.sun.star.registry.XRegistryKey
registry key to write to
xKey
)

Writes component's implementation info to given registry key.

Inherited from com.sun.star.lib.uno.helper.ComponentBase:
addEventListenerdisposefinalizepostDisposingpreDisposingremoveEventListener

Field Detail

DEBUGback to summary
private static final boolean DEBUG

Hides com.sun.star.lib.uno.helper.ComponentBase.DEBUG.

m_ctorback to summary
private final Constructor<T> m_ctor
m_impl_classback to summary
private final Class<?> m_impl_class
m_impl_nameback to summary
private final String m_impl_name
m_methodback to summary
private final Method m_method
m_supported_servicesback to summary
private final String[] m_supported_services

Constructor Detail

Factoryback to summary
private Factory(Class<T> impl_class, String impl_name, String[] supported_services) throws com.sun.star.uno.DeploymentException

Method Detail

createComponentFactoryback to summary
public static com.sun.star.lang.XSingleComponentFactory createComponentFactory(Class<T> impl_class, String impl_name, 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:Class<T>

implementation class

impl_name:String

implementation name

supported_services:String[]

services implemented

Returns:com.sun.star.lang.XSingleComponentFactory

object factory

Since
UDK 3.2.13
createComponentFactoryback to summary
public static com.sun.star.lang.XSingleComponentFactory createComponentFactory(Class<T> impl_class, 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:Class<T>

implementation class

supported_services:String[]

services implemented

Returns:com.sun.star.lang.XSingleComponentFactory

object factory

createInstanceWithArgumentsAndContextback to summary
public final Object createInstanceWithArgumentsAndContext(Object[] arguments, com.sun.star.uno.XComponentContext xContext) throws com.sun.star.uno.Exception
createInstanceWithContextback to summary
public final Object createInstanceWithContext(com.sun.star.uno.XComponentContext xContext) throws com.sun.star.uno.Exception
getImplementationNameback to summary
public final String getImplementationName()
getSupportedServiceNamesback to summary
public final String[] getSupportedServiceNames()
instantiateback to summary
private Object instantiate(com.sun.star.uno.XComponentContext xContext) throws com.sun.star.uno.Exception
supportsServiceback to summary
public final boolean supportsService(String service_name)
writeRegistryServiceInfoback to summary
public static boolean writeRegistryServiceInfo(String impl_name, String[] supported_services, com.sun.star.registry.XRegistryKey xKey)

Writes component's implementation info to given registry key.

Parameters
impl_name:String

name of implementation

supported_services:String[]

supported services of implementation

xKey:com.sun.star.registry.XRegistryKey

registry key to write to

Returns:boolean

success