Examples of addThrowNew()


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

     protected JavaConstructor getConstructor(JavaSource pJs,
                       InterfaceDescription[] pInterfaces) {
       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;
     }
View Full Code Here

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

     protected JavaConstructor getConstructor(JavaSource pJs,
                       InterfaceDescription[] pInterfaces) {
       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;
     }
View Full Code Here

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

         protected JavaConstructor getConstructor(JavaSource pJs,
                                                   InterfaceDescription[] pInterfaces) {
            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;
         }
View Full Code Here

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

         protected JavaConstructor getConstructor(JavaSource pJs,
                                                   InterfaceDescription[] pInterfaces) {
            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;
         }
View Full Code Here

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

   */
  protected JavaConstructor getConstructor(JavaSource pJs, InterfaceDescription[] pInterfaces) {
     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(), ")");
View Full Code Here

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

                     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 "),
                      " + o.getClass().getName() + ",
                      JavaSource.getQuoted(" is not implementing "),
                      " + ", pInterfaces[i].getInterface(), ".class.getName()");
        jcon.addEndIf();
View Full Code Here

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

     protected JavaConstructor getConstructor(JavaSource pJs,
                       InterfaceDescription[] pInterfaces) {
       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;
     }
View Full Code Here

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

     protected JavaConstructor getConstructor(JavaSource pJs,
                       InterfaceDescription[] pInterfaces) {
       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;
     }
View Full Code Here

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

   */
  protected JavaConstructor getConstructor(JavaSource pJs, InterfaceDescription[] pInterfaces) {
     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(), ")");
View Full Code Here

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

                     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 "),
                      " + o.getClass().getName() + ",
                      JavaSource.getQuoted(" is not implementing "),
                      " + ", pInterfaces[i].getInterface(), ".class.getName()");
        jcon.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.