Package org.picocontainer.defaults

Examples of org.picocontainer.defaults.DefaultComponentAdapterFactory


                if ( isAttribute(attributes, COMPONENT_MONITOR) ) {
                    changeComponentMonitor(childContainer, createComponentMonitor(attributes));
                }
                parent.getPico().addChildContainer(childContainer);
            } else if ( isAttribute(attributes, COMPONENT_MONITOR) ) {
                ComponentAdapterFactory componentAdapterFactory = new DefaultComponentAdapterFactory(
                                                    createComponentMonitor(attributes));
                childContainer = new DefaultPicoContainer(
                        decorationDelegate.decorate(componentAdapterFactory, attributes), parent.getPico());
            } else {
                childContainer = parent.getPico().makeChildContainer();
View Full Code Here


    }

    private ComponentAdapterFactory createComponentAdapterFactory(Map attributes) {
        final ComponentAdapterFactory factory = (ComponentAdapterFactory) attributes.remove(COMPONENT_ADAPTER_FACTORY);
        if ( factory == null ){
            return new DefaultComponentAdapterFactory();
        }
        return factory;
    }
View Full Code Here

        super(new ImplementationHidingPicoContainer(caf, parent), classLoader);
    }


    public ImplementationHidingNanoPicoContainer(ClassLoader classLoader, PicoContainer parent) {
        super(new ImplementationHidingPicoContainer(new DefaultComponentAdapterFactory(), parent), classLoader);
    }
View Full Code Here

     * <code>org.picocontainer.defaults.DefaultComponentAdapterFactory</code>.
     *
     * @param aspectsApplicator used to apply the aspects.
     */
    public AspectsComponentAdapterFactory(AspectsApplicator aspectsApplicator) {
        this(aspectsApplicator, new DefaultComponentAdapterFactory());
    }
View Full Code Here

                if ( isAttribute(attributes, COMPONENT_MONITOR) ) {
                    changeComponentMonitor(childContainer, createComponentMonitor(attributes));
                }
                parent.getPico().addChildContainer(childContainer);
            } else if ( isAttribute(attributes, COMPONENT_MONITOR) ) {
                ComponentAdapterFactory componentAdapterFactory = new DefaultComponentAdapterFactory(
                                                    createComponentMonitor(attributes));
                childContainer = new DefaultPicoContainer(
                        getDecorationDelegate().decorate(componentAdapterFactory, attributes), parent.getPico());
            } else {
                childContainer = parent.getPico().makeChildContainer();
View Full Code Here

    }

    private ComponentAdapterFactory createComponentAdapterFactory(Map attributes) {
        final ComponentAdapterFactory factory = (ComponentAdapterFactory) attributes.remove(COMPONENT_ADAPTER_FACTORY);
        if ( factory == null ){
            return new DefaultComponentAdapterFactory();
        }
        return factory;
    }
View Full Code Here

        return instance;
    }

    private ComponentAdapter createComponentAdapter(String className, ClassLoader classLoader) throws ClassNotFoundException {
        Class implementation = classLoader.loadClass(className);
        ComponentAdapterFactory factory = new DefaultComponentAdapterFactory();
        return factory.createComponentAdapter(className, implementation, new Parameter[]{});
    }
View Full Code Here

    public DefaultNanoPicoContainer(ClassLoader classLoader, ComponentAdapterFactory caf, PicoContainer parent) {
        super(new DefaultPicoContainer(caf, parent), classLoader);
    }

    public DefaultNanoPicoContainer(ClassLoader classLoader, PicoContainer parent) {
        super(new DefaultPicoContainer(new DefaultComponentAdapterFactory(), parent), classLoader);
    }
View Full Code Here

    public DefaultNanoPicoContainer(ClassLoader classLoader, PicoContainer parent) {
        super(new DefaultPicoContainer(new DefaultComponentAdapterFactory(), parent), classLoader);
    }

    public DefaultNanoPicoContainer(ClassLoader classLoader, PicoContainer parent, ComponentMonitor componentMonitor) {
        super(new DefaultPicoContainer(new DefaultComponentAdapterFactory(componentMonitor), parent), classLoader);
    }
View Full Code Here

          }
        });

    callAccessManager.expects(atLeastOnce()).method("checkPermission").will(returnValue(false));

    DynaopComponentAdapterFactory factory = new DynaopComponentAdapterFactory(new DefaultComponentAdapterFactory(), aspects);
    MutablePicoContainer container = new DefaultPicoContainer(factory);
    container.registerComponentImplementation(SecureObject.class, SecureObjectImpl.class);

    SecureObject object = (SecureObject) container.getComponentInstance(SecureObject.class);
View Full Code Here

TOP

Related Classes of org.picocontainer.defaults.DefaultComponentAdapterFactory

Copyright © 2018 www.massapicom. 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.