Examples of addEndIf()


Examples of org.apache.ws.jaxme.js.JavaConstructor.addEndIf()

       JavaConstructor jcon = pJs.newJavaConstructor(JavaSource.PROTECTED);
       jcon.addParam(getChainInterface(), "o");
       jcon.addIf("o == null");
       jcon.addThrowNew(NullPointerException.class,
           JavaSource.getQuoted("The supplied object must not be null."));
       jcon.addEndIf();
       jcon.addLine("backingObject = o;");
       return jcon;
     }

     public JavaMethod getInterfaceMethod(JavaSource pSource, JavaMethod pMethod) {
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaConstructor.addEndIf()

       JavaConstructor jcon = pJs.newJavaConstructor(JavaSource.PUBLIC);
       jcon.addParam(getChainInterface(), "o");
       jcon.addIf("o == null");
       jcon.addThrowNew(NullPointerException.class,
           JavaSource.getQuoted("The supplied object must not be null."));
       jcon.addEndIf();
       jcon.addLine("backingObject = o;");
       return jcon;
     }
     public JavaMethod getInterfaceMethod(JavaSource pSource,
                                      JavaMethod pMethod) {
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaConstructor.addEndIf()

            JavaConstructor jcon = pJs.newJavaConstructor(JavaSource.PROTECTED);
            jcon.addParam(getChainInterface(), "o");
            jcon.addIf("o == null");
            jcon.addThrowNew(NullPointerException.class,
                             JavaSource.getQuoted("The supplied object must not be null."));
            jcon.addEndIf();
            jcon.addLine("backingObject = o;");
            return jcon;
         }

         public JavaMethod getInterfaceMethod(JavaSource pSource,
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaConstructor.addEndIf()

            JavaConstructor jcon = pJs.newJavaConstructor(JavaSource.PUBLIC);
            jcon.addParam(getChainInterface(), "o");
            jcon.addIf("o == null");
            jcon.addThrowNew(NullPointerException.class,
                             JavaSource.getQuoted("The supplied object must not be null."));
            jcon.addEndIf();
            jcon.addLine("backingObject = o;");
            return jcon;
         }
         public JavaMethod getInterfaceMethod(JavaSource pSource,
                                               ProxyGenerator.InterfaceDescription pDescription,
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaConstructor.addEndIf()

     JavaConstructor jcon = pJs.newJavaConstructor(JavaSource.PROTECTED);
    jcon.addParam(Object.class, "o");
    jcon.addIf("o == null");
    jcon.addThrowNew(NullPointerException.class,
                     JavaSource.getQuoted("The supplied object must not be null."));
    jcon.addEndIf();
    for (int i = 0;  i < pInterfaces.length;  i++) {
      if (pInterfaces[i].isMandatory) {
        jcon.addIf("!(o instanceof ", pInterfaces[i].getInterface(), ")");
        jcon.addThrowNew(ClassCastException.class,
                      JavaSource.getQuoted("The supplied instance of "),
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaConstructor.addEndIf()

        jcon.addThrowNew(ClassCastException.class,
                      JavaSource.getQuoted("The supplied instance of "),
                      " + o.getClass().getName() + ",
                      JavaSource.getQuoted(" is not implementing "),
                      " + ", pInterfaces[i].getInterface(), ".class.getName()");
        jcon.addEndIf();
      }
    }
    jcon.addLine("backingObject = o;");
    return jcon;
  }
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaMethod.addEndIf()

        invoker.addLine("getInvoker(", name, ")");
        jm.addIf(invoker, " == null");
        jm.addThrowNew(IllegalStateException.class,
                       JavaSource.getQuoted("Unknown method name: "),
                       " + ", name);
        jm.addEndIf();
        jm.addTry();
        jm.addLine("return ", invoker, ".invoke(", args, ");");
        DirectAccessible e = jm.addCatch(Exception.class);
        jm.addLine("throw ", e, ";");
        DirectAccessible t = jm.addCatch(Throwable.class);
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaMethod.addEndIf()

    LocalJavaField query = jm.newJavaField(String.class);
    jm.addIf(pParams, " != null  &&  pParams.isDistinct()");
    jm.addLine(query, " = ", JavaSource.getQuoted("SELECT DISTINCT"), ";");
    jm.addElse();
    jm.addLine(query, " = ", JavaSource.getQuoted("SELECT"), ";");
    jm.addEndIf();
    jm.addLine(query, " += ", JavaSource.getQuoted(" " + sb + " FROM " + table.getQName()), ";");
    jm.addIf(pQuery, " != null");
    jm.addLine(query, " += ", JavaSource.getQuoted(" WHERE "), " + ", pQuery, ";");
    jm.addEndIf();
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaMethod.addEndIf()

    jm.addLine(query, " = ", JavaSource.getQuoted("SELECT"), ";");
    jm.addEndIf();
    jm.addLine(query, " += ", JavaSource.getQuoted(" " + sb + " FROM " + table.getQName()), ";");
    jm.addIf(pQuery, " != null");
    jm.addLine(query, " += ", JavaSource.getQuoted(" WHERE "), " + ", pQuery, ";");
    jm.addEndIf();

    LocalJavaField connection = jm.newJavaField(Connection.class);
    connection.addLine("null");
    jm.addTry();
    jm.addLine(connection, " = getConnection();");
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaMethod.addEndIf()

          }
          jm2.addLine(jf, ".init(getData());");
          DirectAccessible e = jm2.addCatch(JAXBException.class);
          jm2.addThrowNew(SAXException.class, e);
          jm2.addEndTry();
          jm2.addEndIf();
          jm2.addLine("return ", jf, ";");

          jm.addIf(jf, " != null");
          jm.addLine(jf, ".init(", pData, ");");
          jm.addEndIf();
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.