Package org.nanocontainer.aop

Examples of org.nanocontainer.aop.OrderEntity


        pico.registerComponentImplementation("noMixin", OrderEntityImpl.class);
        pico.registerComponentImplementation(IdGenerator.class, IdGeneratorImpl.class);

        Identifiable hasMixin1 = (Identifiable) pico.getComponentInstance("hasMixin1");
        Identifiable hasMixin2 = (Identifiable) pico.getComponentInstance("hasMixin1");
        OrderEntity noMixin = (OrderEntity) pico.getComponentInstance("noMixin");

        assertFalse(noMixin instanceof Identifiable);
        assertEquals(new Integer(1), hasMixin1.getId());
        assertEquals(new Integer(2), hasMixin2.getId());
View Full Code Here


        pico.registerMixin(cuts.componentName("hasMixin*"), new Class[]{Identifiable.class}, IdentifiableMixin.class);
        pico.registerComponentImplementation("hasMixin1", OrderEntityImpl.class);
        pico.registerComponentImplementation("hasMixin2", OrderEntityImpl.class);
        pico.registerComponentImplementation("noMixin", OrderEntityImpl.class);

        OrderEntity hasMixin1 = (OrderEntity) pico.getComponentInstance("hasMixin1");
        OrderEntity hasMixin2 = (OrderEntity) pico.getComponentInstance("hasMixin2");
        OrderEntity noMixin = (OrderEntity) pico.getComponentInstance("noMixin");

        assertTrue(hasMixin1 instanceof Identifiable);
        assertTrue(hasMixin2 instanceof Identifiable);
        assertFalse(noMixin instanceof Identifiable);

View Full Code Here

TOP

Related Classes of org.nanocontainer.aop.OrderEntity

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.