Package org.picocontainer

Examples of org.picocontainer.MutablePicoContainer.registerComponentInstance()


    container.registerComponentInstance(globalConfig);
    container.registerComponentInstance(globalConfig.getPreferences());
    container.registerComponentInstance(globalConfig.forScanner());
    container.registerComponentInstance(globalConfig.forGUI());
    container.registerComponentInstance(globalConfig.forOpeners());
    container.registerComponentInstance(globalConfig.forFavorites());
    container.registerComponentInstance(Labels.getInstance());
    container.registerComponentImplementation(CommentsConfig.class);
    container.registerComponentImplementation(ConfigDetector.class);

    container.registerComponentImplementation(ExporterRegistry.class);
View Full Code Here


    container.registerComponentInstance(globalConfig.getPreferences());
    container.registerComponentInstance(globalConfig.forScanner());
    container.registerComponentInstance(globalConfig.forGUI());
    container.registerComponentInstance(globalConfig.forOpeners());
    container.registerComponentInstance(globalConfig.forFavorites());
    container.registerComponentInstance(Labels.getInstance());
    container.registerComponentImplementation(CommentsConfig.class);
    container.registerComponentImplementation(ConfigDetector.class);

    container.registerComponentImplementation(ExporterRegistry.class);
    container.registerComponentImplementation(TXTExporter.class);
View Full Code Here

    container.registerComponentImplementation(CommandLineProcessor.class);

    // GUI follows (TODO: move GUI to a separate place)

    // Some "shared" GUI components
    container.registerComponentInstance(Display.getDefault());
    container.registerComponentImplementation("mainShell", Shell.class);
    container.registerComponentImplementation("mainMenu", Menu.class, new Parameter[] {
        new ComponentParameter("mainShell"), new ConstantParameter(SWT.BAR) });
    container.registerComponentImplementation("commandsMenu", CommandsMenu.class);
View Full Code Here

    ComponentParameter anyComponentParameter = new ComponentParameter();

    // non-GUI
    Config globalConfig = Config.getConfig();
    container.registerComponentInstance(globalConfig);
    container.registerComponentInstance(globalConfig.getPreferences());
    container.registerComponentInstance(globalConfig.forScanner());
    container.registerComponentInstance(globalConfig.forGUI());
    container.registerComponentInstance(globalConfig.forOpeners());
    container.registerComponentInstance(globalConfig.forFavorites());
View Full Code Here

    ComponentParameter anyComponentParameter = new ComponentParameter();

    // non-GUI
    Config globalConfig = Config.getConfig();
    container.registerComponentInstance(globalConfig);
    container.registerComponentInstance(globalConfig.getPreferences());
    container.registerComponentInstance(globalConfig.forScanner());
    container.registerComponentInstance(globalConfig.forGUI());
    container.registerComponentInstance(globalConfig.forOpeners());
    container.registerComponentInstance(globalConfig.forFavorites());
    container.registerComponentInstance(Labels.getInstance());
View Full Code Here

    // non-GUI
    Config globalConfig = Config.getConfig();
    container.registerComponentInstance(globalConfig);
    container.registerComponentInstance(globalConfig.getPreferences());
    container.registerComponentInstance(globalConfig.forScanner());
    container.registerComponentInstance(globalConfig.forGUI());
    container.registerComponentInstance(globalConfig.forOpeners());
    container.registerComponentInstance(globalConfig.forFavorites());
    container.registerComponentInstance(Labels.getInstance());
    container.registerComponentImplementation(CommentsConfig.class);
View Full Code Here

      if (componentInstance instanceof MutablePicoContainer)
      {
         MutablePicoContainer pc = (MutablePicoContainer)componentInstance;
         Object contrivedKey = new Object();
         String contrivedComp = "";
         pc.registerComponentInstance(contrivedKey, contrivedComp);
         try
         {
            if (this.getComponentInstance(contrivedKey) != null)
            {
               throw new PicoRegistrationException(
View Full Code Here

        final IAdmin _admin = (IAdmin) _container.getComponentInstanceOfType(IAdmin.class);

        final ITypedAdmin _typedAdmin = new ITypedAdminImpl(_admin, _container, supportedInterface);

        _container.registerComponentInstance(ITypedAdmin.class, _typedAdmin);

        return _container;
    }

    private MutablePicoContainer newContainerForProxy(boolean isIDPublic)
View Full Code Here

            {
                return getJMXObjectName();
            }
        };

        _containerForProxy.registerComponentInstance(IAdmin.class, _admin);

        return _containerForProxy;
    }

    public final String getJMXObjectName()
View Full Code Here

        {
            _container = createContainer(optionalParent, _logger);
        }

        // register existing orb
        _container.registerComponentInstance(org.omg.CORBA.ORB.class, orb);

        registerORBServices(_container);

        registerCoreServices(_container);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.