Package org.apache.hivemind.service

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


        body.add("return _service;");

        body.end();

        classFab.addMethod(
                Modifier.PRIVATE | Modifier.FINAL | Modifier.SYNCHRONIZED,
                new MethodSignature(serviceInterface, "_service", null, null),
                body.toString());

        builder.addServiceMethods("_service()");
View Full Code Here


        body.add("_service();");

        body.end();

        classFab.addMethod(Modifier.PUBLIC | Modifier.FINAL, new MethodSignature(void.class,
                "_instantiateServiceImplementation", null, null), body.toString());

        classFab.addInterface(SingletonInnerProxy.class);

        return classFab.createClass();
View Full Code Here

        MockControl control = newControl(ClassFab.class);
        ClassFab cf = (ClassFab) control.getMock();
        MethodFab mf = (MethodFab) newMock(MethodFab.class);

        cf.addMethod(Modifier.PUBLIC, sig, expectedBody);
        control.setReturnValue(mf);

        replayControls();

        ClassFabUtils.addNoOpMethod(cf, sig);
View Full Code Here

        cf.addField("_stringValue", String.class);

        MethodSignature setStringValue =
            new MethodSignature(void.class, "setStringValue", new Class[] { String.class }, null);

        cf.addMethod(Modifier.PUBLIC, setStringValue, "_stringValue = $1;");

        MethodSignature getStringValue =
            new MethodSignature(String.class, "getStringValue", null, null);

        cf.addMethod(Modifier.PUBLIC, getStringValue, "return _stringValue;");
View Full Code Here

        cf.addMethod(Modifier.PUBLIC, setStringValue, "_stringValue = $1;");

        MethodSignature getStringValue =
            new MethodSignature(String.class, "getStringValue", null, null);

        cf.addMethod(Modifier.PUBLIC, getStringValue, "return _stringValue;");

        Class targetClass = cf.createClass();

        Object targetBean = targetClass.newInstance();
View Full Code Here

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

        MethodSignature getStringValue =
            new MethodSignature(String.class, "getStringValue", null, null);

        cf.addMethod(Modifier.PUBLIC, getStringValue, "return _stringValue;");

        Class targetClass = cf.createClass();

        try
        {
View Full Code Here

        cf.newClass("$Insert_97", baseClass);

        cfc.setReturnValue(fab);

        fab.addMethod(Modifier.PUBLIC, sig, "method body");
        fabc.setReturnValue(null);

        replayControls();

        EnhancementOperation eo = new EnhancementOperationImpl(new DefaultClassResolver(), spec,
View Full Code Here

        eo.extendMethodImplementation(PageDetachListener.class, sig, "more-code();");

        verifyControls();

        fab.addMethod(Modifier.PUBLIC, sig, "{\n  some-code();\n  more-code();\n}\n");
        fabc.setReturnValue(null);

        fab.createClass();
        fabc.setReturnValue(BaseComponent.class);
View Full Code Here

        eo.extendMethodImplementation(IComponent.class, sig, "some-code();");

        verifyControls();

        fab.addMethod(Modifier.PUBLIC, sig, "{\n  super.finishLoad($$);\n  some-code();\n}\n");
        fabc.setReturnValue(null);

        fab.createClass();
        fabc.setReturnValue(BaseComponent.class);
View Full Code Here

        eo.extendMethodImplementation(IComponent.class, sig, "some-code();");

        verifyControls();

        fab.addMethod(
                Modifier.PUBLIC,
                sig,
                "{\n  super.cleanupAfterRender($$);\n  some-code();\n}\n");
        fabc.setReturnValue(null);
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.