Package org.jboss.jca.codegenerator

Examples of org.jboss.jca.codegenerator.MethodParam


               out.write("public " + method.getReturnType() + " " +
                  method.getMethodName() + "(");
               int paramSize = method.getParams().size();
               for (int i = 0; i < paramSize; i++)
               {
                  MethodParam param = method.getParams().get(i);
                  out.write(param.getType());
                  out.write(" ");
                  out.write(param.getName());
                  if (i + 1 < paramSize)
                     out.write(", ");
               }
               out.write(")");
               int exceptionSize = method.getExceptionType().size();
View Full Code Here


         }
         out.write("connection." + method.getMethodName() + "(");
         int paramSize = method.getParams().size();
         for (int i = 0; i < paramSize; i++)
         {
            MethodParam param = method.getParams().get(i);
            out.write(BasicType.defaultValue(param.getType()));
            if (i + 1 < paramSize)
               out.write(", ");
         }
         out.write(");");
View Full Code Here

               writeEol(out);
              
               int paramSize = method.getParams().size();
               for (int i = 0; i < paramSize; i++)
               {
                  MethodParam param = method.getParams().get(i);
                  writeIndent(out, indent);
                  out.write(" * @param " + param.getName() + " " + param.getType());
                  writeEol(out);
               }
               int exceptionSize = method.getExceptionType().size();
               for (int i = 0; i < exceptionSize; i++)
               {
                  String ex = method.getExceptionType().get(i);
                  writeIndent(out, indent);
                  out.write(" * @throws " + ex);
                  writeEol(out);
               }
               if (!method.getReturnType().equals("void"))
               {
                  writeIndent(out, indent);
                  out.write(" * @return " + method.getReturnType());
                  writeEol(out);
               }
               writeIndent(out, indent);
               out.write(" */");
               writeEol(out);
              
               writeIndent(out, indent);
               out.write(method.getReturnType() + " " + method.getMethodName() + "(");

               for (int i = 0; i < paramSize; i++)
               {
                  MethodParam param = method.getParams().get(i);
                  out.write(param.getType());
                  out.write(" ");
                  out.write(param.getName());
                  if (i + 1 < paramSize)
                     out.write(", ");
               }
               out.write(")");

View Full Code Here

            out.write("NoArg");
         else
         {
            for (int i = 0; i < paramSize; i++)
            {
               MethodParam param = method.getParams().get(i);
               out.write(upcaseFirst(param.getName()));
               String type = param.getType();
               if (type.indexOf(".") >= 0)
                  type = type.substring(type.lastIndexOf(".") + 1);
               out.write(type);
            }
         }
         out.write("() throws Throwable");
         writeLeftCurlyBracket(out, indent);

         writeIndent(out, indent + 1);
         out.write("assertNotNull(connectionFactory" + num + ");");
         writeEol(out);
         writeIndent(out, indent + 1);
         if (def.getMcfDefs().get(num - 1).isUseCciConnection())
            out.write("javax.resource.cci.Connection");
         else
            out.write(def.getMcfDefs().get(num - 1).getConnInterfaceClass());
         out.write(" connection" + num + " = connectionFactory" + num + ".getConnection();");
         writeEol(out);
         writeIndent(out, indent + 1);
         out.write("assertNotNull(connection" + num + ");");
         writeEol(out);
        
         writeIndent(out, indent + 1);
         if (!method.getReturnType().equals("void"))
         {
            out.write(method.getReturnType() + " result = ");
         }
         out.write("connection" + num + "." + method.getMethodName() + "(");
         for (int i = 0; i < paramSize; i++)
         {
            MethodParam param = method.getParams().get(i);
            out.write(BasicType.defaultValue(param.getType()));
            if (i + 1 < paramSize)
               out.write(", ");
         }
         out.write(");");
         writeEol(out);
View Full Code Here

               out.write("public " + method.getReturnType() + " " +
                  method.getMethodName() + "(");
               int paramSize = method.getParams().size();
               for (int i = 0; i < paramSize; i++)
               {
                  MethodParam param = method.getParams().get(i);
                  out.write(param.getType());
                  out.write(" ");
                  out.write(param.getName());
                  if (i + 1 < paramSize)
                     out.write(", ");
               }
               out.write(")");
               int exceptionSize = method.getExceptionType().size();
View Full Code Here

               out.write("public " + method.getReturnType() + " " +
                  method.getMethodName() + "(");
               int paramSize = method.getParams().size();
               for (int i = 0; i < paramSize; i++)
               {
                  MethodParam param = method.getParams().get(i);
                  out.write(param.getType());
                  out.write(" ");
                  out.write(param.getName());
                  if (i + 1 < paramSize)
                     out.write(", ");
               }
               out.write(") throws Exception");

               writeLeftCurlyBracket(out, indent);
               writeIndent(out, indent + 1);
               if (!method.getReturnType().equals("void"))
               {
                  out.write("return ");
               }
               out.write("getConnection()." + method.getMethodName() + "(");
               for (int i = 0; i < paramSize; i++)
               {
                  MethodParam param = method.getParams().get(i);
                  out.write(param.getName());
                  if (i + 1 < paramSize)
                     out.write(", ");
               }
               out.write(");");
               writeEol(out);
View Full Code Here

               writeEol(out);
              
               int paramSize = method.getParams().size();
               for (int i = 0; i < paramSize; i++)
               {
                  MethodParam param = method.getParams().get(i);
                  writeIndent(out, indent);
                  out.write(" * @param " + param.getName() + " " + param.getType());
                  writeEol(out);
               }
               int exceptionSize = method.getExceptionType().size();
               for (int i = 0; i < exceptionSize; i++)
               {
                  String ex = method.getExceptionType().get(i);
                  writeIndent(out, indent);
                  out.write(" * @throws " + ex);
                  writeEol(out);
               }
               if (!method.getReturnType().equals("void"))
               {
                  writeIndent(out, indent);
                  out.write(" * @return " + method.getReturnType());
                  writeEol(out);
               }
               writeIndent(out, indent);
               out.write(" */");
               writeEol(out);
              
               writeIndent(out, indent);
               out.write("public " + method.getReturnType() + " " +
                  method.getMethodName() + "(");

               for (int i = 0; i < paramSize; i++)
               {
                  MethodParam param = method.getParams().get(i);
                  out.write(param.getType());
                  out.write(" ");
                  out.write(param.getName());
                  if (i + 1 < paramSize)
                     out.write(", ");
               }
               out.write(")");

View Full Code Here

               out.write("public " + method.getReturnType() + " " +
                  method.getMethodName() + "(");
               int paramSize = method.getParams().size();
               for (int i = 0; i < paramSize; i++)
               {
                  MethodParam param = method.getParams().get(i);
                  out.write(param.getType());
                  out.write(" ");
                  out.write(param.getName());
                  if (i + 1 < paramSize)
                     out.write(", ");
               }
               out.write(") throws Exception;");
View Full Code Here

            out.write("NoArg");
         else
         {
            for (int i = 0; i < paramSize; i++)
            {
               MethodParam param = method.getParams().get(i);
               out.write(upcaseFirst(param.getName()));
               out.write(param.getType());
            }
         }
         out.write("() throws Throwable");
         writeLeftCurlyBracket(out, indent);
        

         writeIndent(out, indent + 1);
         out.write("assertNotNull(connectionFactory);");
         writeEol(out);
         writeIndent(out, indent + 1);
         out.write(def.getConnInterfaceClass() + " connection = connectionFactory.getConnection();");
         writeEol(out);
         writeIndent(out, indent + 1);
         out.write("assertNotNull(connection);");
         writeEol(out);
        
         writeIndent(out, indent + 1);
         if (!method.getReturnType().equals("void"))
         {
            out.write(method.getReturnType() + " result = ");
         }
         out.write("connection." + method.getMethodName() + "(");
         for (int i = 0; i < paramSize; i++)
         {
            MethodParam param = method.getParams().get(i);
            out.write(BasicType.defaultValue(param.getType()));
            if (i + 1 < paramSize)
               out.write(", ");
         }
         out.write(");");
View Full Code Here

               out.write("public " + method.getReturnType() + " " +
                  method.getMethodName() + "(");
               int paramSize = method.getParams().size();
               for (int i = 0; i < paramSize; i++)
               {
                  MethodParam param = method.getParams().get(i);
                  out.write(param.getType());
                  out.write(" ");
                  out.write(param.getName());
                  if (i + 1 < paramSize)
                     out.write(", ");
               }
               out.write(")");
               int exceptionSize = method.getExceptionType().size();
View Full Code Here

TOP

Related Classes of org.jboss.jca.codegenerator.MethodParam

Copyright © 2018 www.massapicom. 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.