Package org.apache.hivemind.service

Examples of org.apache.hivemind.service.ClassFab.addConstructor()


        cf.addInterface(serviceInterface);

        cf.addField("_adapterRegistry", AdapterRegistry.class);

        cf.addConstructor(new Class[]
        { AdapterRegistry.class }, null, "_adapterRegistry = $1;");

        // TODO: Should we add a check for $1 == null?

        cf.addMethod(Modifier.PRIVATE, new MethodSignature(serviceInterface, "_getAdapter",
View Full Code Here


        body.addln("_serviceModel = $2;");
        body.addln("_deferredProxy._setInner(this);");

        body.end();

        classFab.addConstructor(new Class[]
        { deferredProxyClass, getClass() }, null, body.toString());

        // Method _service() will look up the service implementation,
        // then update the deferred proxy to go directly to the
        // service implementation, bypassing itself!
View Full Code Here

        Class serviceType = service.getClass();

        cf.addField("_service", serviceType);

        cf.addConstructor(new Class[]
        { serviceType }, null, "{ super(); _service = $1; }");

        builder.addServiceMethods("_service");

        return cf.createClass();
View Full Code Here

        factoryControl.setReturnValue(cf);

        cf.addInterface(ToStringStrategy.class);
        cf.addField("_registry", StrategyRegistry.class);

        cf.addConstructor(new Class[]
        { StrategyRegistry.class }, null, "_registry = $1;");
        cfc.setMatcher(new AggregateArgumentsMatcher(new ArrayMatcher()));

        cf
                .addMethod(
View Full Code Here

        factoryControl.setReturnValue(cf);

        cf.addInterface(Runnable.class);
        cf.addField("_registry", StrategyRegistry.class);

        cf.addConstructor(new Class[]
        { StrategyRegistry.class }, null, "_registry = $1;");
        cfc.setMatcher(new AggregateArgumentsMatcher(new ArrayMatcher()));

        cf.addMethod(
                Modifier.PRIVATE,
View Full Code Here

        body.begin();
        body.addln("fred = $1;");
        body.addln("fred$0 = $2;");
        body.end();

        fab.addConstructor(new Class[]
        { String.class, Map.class }, null, body.toString());
        fabc.setMatcher(new ArrayMatcher());

        replayControls();
View Full Code Here

        factoryControl.setReturnValue(cf);

        cf.addInterface(ToStringAdapter.class);
        cf.addField("_adapterRegistry", AdapterRegistry.class);

        cf.addConstructor(new Class[]
        { AdapterRegistry.class }, null, "_adapterRegistry = $1;");
        cfc.setMatcher(new AggregateArgumentsMatcher(new ArrayMatcher()));

        cf
                .addMethod(
View Full Code Here

        factoryControl.setReturnValue(cf);

        cf.addInterface(Runnable.class);
        cf.addField("_adapterRegistry", AdapterRegistry.class);

        cf.addConstructor(new Class[]
        { AdapterRegistry.class }, null, "_adapterRegistry = $1;");
        cfc.setMatcher(new AggregateArgumentsMatcher(new ArrayMatcher()));

        cf.addMethod(
                Modifier.PRIVATE,
View Full Code Here

        body.addln("_serviceModel = $2;");
        body.addln("_deferredProxy._setInner(this);");

        body.end();

        classFab.addConstructor(
            new Class[] { deferredProxyClass, getClass()},
            null,
            body.toString());

        // Method _service() will look up the service implementation,
View Full Code Here

        body.begin();
        body.addln("fred = $1;");
        body.addln("fred_0 = $2;");
        body.end();
       
        fab.addConstructor(aryEq(new Class[] { String.class, Map.class }), (Class[])isNull(),
                eq(body.toString()));
       
        replay();

        eo.finalizeEnhancedClass();
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.