Package org.apache.hivemind.service

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


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

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

        body.end();

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

        classFab.addInterface(SingletonInnerProxy.class);
View Full Code Here


        builder.addln("if (_shutdown)");
        builder.addln("  throw org.apache.hivemind.HiveMind#createRegistryShutdownException();");

        builder.add("return _delegate;");

        builder.end();

        classFab.addMethod(Modifier.FINAL | Modifier.PRIVATE, new MethodSignature(delegateClass,
                DELEGATE_ACCESSOR_METHOD_NAME, null, null), builder.toString());
    }
View Full Code Here

        builder.add(serviceInterface.getName());
        builder.add(") _serviceModel.");
        builder.add(serviceModelMethodName);
        builder.add("();");

        builder.end();

        classFab.addMethod(Modifier.PRIVATE | Modifier.FINAL, new MethodSignature(serviceInterface,
                SERVICE_ACCESSOR_METHOD_NAME, null, null), builder.toString());
    }
}
View Full Code Here

        builder.add("return ($r) _delegate.");
        builder.add(sig.getName());
        builder.addln("($$);");

        builder.end();

        classFab.addMethod(Modifier.PUBLIC, sig, builder.toString());
    }

    protected void addServiceMethodImplementation(ClassFab classFab, MethodSignature sig)
View Full Code Here

            builder.addQuoted(methodName);
            builder.addln(", ($w)result);");
            builder.addln("return result;");
        }

        builder.end();

        MethodFab methodFab = classFab.addMethod(Modifier.PUBLIC, sig, builder.toString());

        builder.clear();
View Full Code Here

        builder.begin();
        builder.add("org.apache.hivemind.service.impl.LoggingUtils.exception(_log, ");
        builder.addQuoted(methodName);
        builder.addln(", $e);");
        builder.addln("throw $e;");
        builder.end();

        String body = builder.toString();

        Class[] exceptions = sig.getExceptionTypes();
View Full Code Here

                "var newWindow = window.open({0}, {1}, {2});",
                TapestryUtils.enquote(url),
                TapestryUtils.enquote(getWindowName()),
                TapestryUtils.enquote(getFeatures()));
        builder.addln("newWindow.focus();");
        builder.end();

        support.addBodyScript(builder.toString());

        return "javascript:" + functionName + "();";
    }
View Full Code Here

            builder.addQuoted(methodName);
            builder.addln(", ($w)result);");
            builder.addln("return result;");
        }

        builder.end();

        MethodFab methodFab = classFab.addMethod(Modifier.PUBLIC, sig, builder.toString());

        builder.clear();
View Full Code Here

        builder.begin();
        builder.add("_logException(");
        builder.addQuoted(methodName);
        builder.addln(", $e);");
        builder.addln("throw $e;");
        builder.end();

        String body = builder.toString();

        Class[] exceptions = sig.getExceptionTypes();
View Full Code Here

        builder.add("_inner.");
        builder.add(sig.getName());
        builder.addln("($$);");

        builder.end();

        classFab.addMethod(Modifier.PUBLIC, sig, builder.toString());
    }

    protected void addServiceMethodImplementation(ClassFab classFab, MethodSignature sig)
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.