Package org.apache.hivemind.service

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


        builder.begin();

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

        builder.end(); // if
        builder.addln("else");
        builder.add("  throw ex;");
        builder.end(); // catch
        builder.end(); // while
        builder.end();
View Full Code Here


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

        builder.end(); // if
        builder.addln("else");
        builder.add("  throw ex;");
        builder.end(); // catch
        builder.end(); // while
        builder.end();

        classFab.addMethod(Modifier.PUBLIC, new MethodSignature(m), builder.toString());
    }
View Full Code Here

        builder.end(); // if
        builder.addln("else");
        builder.add("  throw ex;");
        builder.end(); // catch
        builder.end(); // while
        builder.end();

        classFab.addMethod(Modifier.PUBLIC, new MethodSignature(m), builder.toString());
    }
View Full Code Here

        builder.end(); // if
        builder.addln("else");
        builder.add("  throw ex;");
        builder.end(); // catch
        builder.end(); // while
        builder.end();

        classFab.addMethod(Modifier.PUBLIC, new MethodSignature(m), builder.toString());
    }

    private void addToStringMethod(
View Full Code Here

            builder.add("return ($r) ");
            builder.add("_inner.");
            builder.add(methodName);
            builder.addln("($$);");

            builder.end();

            classFab.addMethod(Modifier.PUBLIC, new MethodSignature(m), builder.toString());

        }
View Full Code Here

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

        builder.end();

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

}
View Full Code Here

        builder.add("return ($r) _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

            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

        builder.addln(");");

        builder.add("try");
        builder.begin();
        builder.add("_remote = home.create();");
        builder.end();
        builder.add("catch (javax.ejb.CreateException ex)");
        builder.begin();
        builder.add("throw new java.rmi.RemoteException(ex.getMessage(), ex);");
        builder.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.