Package org.apache.hivemind.service

Examples of org.apache.hivemind.service.BodyBuilder.begin()


        builder.begin();

        builder.addln("boolean first = true;");
        builder.add("while (true)");
        builder.begin();

        builder.add("try");
        builder.begin();

        if (!isVoid)
View Full Code Here


        builder.addln("boolean first = true;");
        builder.add("while (true)");
        builder.begin();

        builder.add("try");
        builder.begin();

        if (!isVoid)
            builder.add("return ");

        builder.add("_lookupRemote().");
View Full Code Here

            builder.addln("return;");

        builder.end(); // try

        builder.add("catch (java.rmi.RemoteException ex)");
        builder.begin();

        builder.addln("if (first)");
        builder.begin();

        builder.addln("_handleRemoteException(ex);");
View Full Code Here

        builder.add("catch (java.rmi.RemoteException ex)");
        builder.begin();

        builder.addln("if (first)");
        builder.begin();

        builder.addln("_handleRemoteException(ex);");
        builder.addln("first = false;");

        builder.end(); // if
View Full Code Here

                new MethodSignature(void.class, "_setInner", new Class[]
                { getConfigurationType() }, null),
                "{ _inner = $1; }");

        BodyBuilder builder = new BodyBuilder();
        builder.begin();

        builder.addln("return _inner;");
        builder.end();

        classFab.addMethod(Modifier.PRIVATE, new MethodSignature(getConfigurationType(), "_getInner",
View Full Code Here

        // created already
        // TODO: Implement like described
//        String proxyToStringMessage = "<LazyConstructionProxy for "
//            + getExtensionPointId() + "(" + configurationInterface.getName() + ")>";
        builder.clear();
        builder.begin();
        builder.addln(" return _inner.toString();");
        builder.end();

        MethodSignature toStringSignature = new MethodSignature(String.class, "toString", null,
                null);
View Full Code Here

        BodyBuilder body = new BodyBuilder();

        // The constructor remembers the outer proxy and registers itself
        // with the outer proxy.

        body.begin();

        body.addln("this($1);");
        body.addln("_deferredProxy = $2;");
        body.addln("_configurationPoint = $3;");
        body.addln("_deferredProxy._setInner(this);");
View Full Code Here

        // Method _configuration() will look up the configuration,
        // then update the deferred proxy to go directly to the
        // configuration, bypassing itself!

        body.clear();
        body.begin();

        body.add("if (_configuration == null)");
        body.begin();

        body.add("_configuration = (");
View Full Code Here

        body.clear();
        body.begin();

        body.add("if (_configuration == null)");
        body.begin();

        body.add("_configuration = (");
        body.add(getConfigurationType().getName());
        body.addln(") _configurationPoint.constructConfiguration();");
View Full Code Here

        builder.addServiceMethods("_configuration()");

        // Build the implementation of interface SingletonInnerProxy

        body.clear();
        body.begin();

        body.add("_configuration();");

        body.end();
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.