Class 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 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 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 class
        impl_name - implementation name
        supported_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 class
        supported_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 implementation
        supported_services - supported services of implementation
        xKey - 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 interface com.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 interface com.sun.star.lang.XSingleComponentFactory
        Throws:
        com.sun.star.uno.Exception
      • getImplementationName

        public final java.lang.String getImplementationName()
        Specified by:
        getImplementationName in interface com.sun.star.lang.XServiceInfo
      • supportsService

        public final boolean supportsService​(java.lang.String service_name)
        Specified by:
        supportsService in interface com.sun.star.lang.XServiceInfo
      • getSupportedServiceNames

        public final java.lang.String[] getSupportedServiceNames()
        Specified by:
        getSupportedServiceNames in interface com.sun.star.lang.XServiceInfo