Package org.apache.s4.core.gen

Examples of org.apache.s4.core.gen.OverloadDispatcherGenerator.generate()


    }
   
    @Test
    public void testGenericEvent() throws Exception {
        OverloadDispatcherGenerator gen = new OverloadDispatcherGenerator(D.class);
        OverloadDispatcher dispatcher = (OverloadDispatcher) gen.generate().newInstance();
        D d = new D();
        dispatcher.dispatchEvent(d, new Event2());
        Assert.assertTrue(d.processedGenericEvent);
        dispatcher.dispatchEvent(d, new Event1());
        Assert.assertTrue(d.processedEvent1);
View Full Code Here


            Cloner cloner = clonerMap.get(event.getClass().getName());
            if (cloner == null) {
                ClonerGenerator cg = new ClonerGenerator();
                // generate byte code that knows how to call the clone method on
                // this event
                Class clonerClass = cg.generate(event.getClass());
                try {
                    cloner = (Cloner) clonerClass.newInstance();
                    clonerMap.put(event.getClass().getName(), cloner);
                } catch (InstantiationException ie) {
                    Logger.getLogger(this.getClass()).error(ie);
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.