Package org.apache.hivemind.service

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


                "return (java.lang.Runnable) _registry.getStrategy($1.getClass());");
        cfc.setReturnValue(mf);

        MethodSignature sig = new MethodSignature(void.class, "run", null, null);

        cf.addMethod(Modifier.PUBLIC, sig, "{  }");
        cfc.setReturnValue(mf);

        fp.getErrorLog();
        fpc.setReturnValue(log);
View Full Code Here


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

        cf
                .addMethod(
                        Modifier.PRIVATE,
                        new MethodSignature(ToStringStrategy.class, "_getStrategy", new Class[]
                        { Object.class }, null),
                        "return (org.apache.hivemind.lib.strategy.ToStringStrategy) _registry.getStrategy($1.getClass());");
View Full Code Here

                        new MethodSignature(ToStringStrategy.class, "_getStrategy", new Class[]
                        { Object.class }, null),
                        "return (org.apache.hivemind.lib.strategy.ToStringStrategy) _registry.getStrategy($1.getClass());");
        cfc.setReturnValue(mf);

        cf.addMethod(Modifier.PUBLIC, new MethodSignature(String.class, "toString", new Class[]
        { Object.class }, null), "return ($r) _getStrategy($1).toString($$);");
        cfc.setReturnValue(mf);

        fp.getServiceId();
        fpc.setReturnValue("foo.Bar");
View Full Code Here

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

        cf.addMethod(
                Modifier.PRIVATE,
                new MethodSignature(Runnable.class, "_getStrategy", new Class[]
                { Object.class }, null),
                "return (java.lang.Runnable) _registry.getStrategy($1.getClass());");
        cfc.setReturnValue(mf);
View Full Code Here

                "return (java.lang.Runnable) _registry.getStrategy($1.getClass());");
        cfc.setReturnValue(mf);

        MethodSignature sig = new MethodSignature(void.class, "run", null, null);

        cf.addMethod(Modifier.PUBLIC, sig, "{  }");
        cfc.setReturnValue(mf);

        fp.getErrorLog();
        fpc.setReturnValue(log);
View Full Code Here

        builder.begin();
        builder.addln("for (int i = 0; i < _commands.length; i++)");
        builder.addln("_commands[i].run($$);");
        builder.end();

        cf.addMethod(Modifier.PUBLIC, sig, builder.toString());
        cfc.setReturnValue(newMethodFab());

        replayControls();

        ChainBuilderImpl cb = new ChainBuilderImpl();
View Full Code Here

        builder.addln("if (result != false) break;");
        builder.end();
        builder.addln("return result;");
        builder.end();

        cf.addMethod(Modifier.PUBLIC, sig, builder.toString());
        cfc.setReturnValue(newMethodFab());

        replayControls();

        ChainBuilderImpl cb = new ChainBuilderImpl();
View Full Code Here

        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

        { 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

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.