Examples of addEndFor()


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

                 "), ", pAttr, ".getValue(", iVar, "));");
    } else {
      jm.addLine("addAttribute(", pAttr, ".getURI(", iVar, "), ", pAttr, ".getLocalName(", iVar,
                 "), ", pAttr, ".getValue(", iVar, "));");     
    }
    jm.addEndFor();
    jm.addEndIf();
    jm.addBreak();

    if (pController.hasSimpleContent()) {
      jm.addDefault();
View Full Code Here

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

    fromValueMethod.setStatic(true);
    DirectAccessible i = fromValueMethod.addForArray(instances);
    fromValueMethod.addIf(pController.getEqualsCheck(fromValueMethod, new Object[]{instances, "[", i, "].value"}, pValue));
    fromValueMethod.addLine("return ", instances, "[", i, "];");
    fromValueMethod.addEndIf();
    fromValueMethod.addEndFor();
    fromValueMethod.addThrowNew(IllegalArgumentException.class, JavaSource.getQuoted("Invalid value: "),
                                " + ", pValue);

    JavaMethod fromNameMethod = js.newJavaMethod("fromName", qName, JavaSource.PUBLIC);
    pName = fromNameMethod.addParam(String.class, "pName");
View Full Code Here

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

    fromNameMethod.setStatic(true);
    i = fromNameMethod.addForArray(instances);
    fromNameMethod.addIf(instances, "[", i, "].name.equals(", pName, ")");
    fromNameMethod.addLine("return ", instances, "[", i, "];");
    fromNameMethod.addEndIf();
    fromNameMethod.addEndFor();
    fromNameMethod.addThrowNew(IllegalArgumentException.class, JavaSource.getQuoted("Invalid name: "),
                                " + ", pName);

    JavaMethod fromStringMethod = js.newJavaMethod("fromString", qName, JavaSource.PUBLIC);
    pValue = fromStringMethod.addParam(String.class, "pValue");
View Full Code Here

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

       LocalJavaField sb = jm.newJavaField(StringBuffer.class, "sb");
       sb.addLine("new ", StringBuffer.class, "(", name, ")");
       DirectAccessible loopVar = jm.addForArray(values);
       jm.addLine(sb, ".append(", JavaSource.getQuoted(", "), ").append(",
                  values, "[", loopVar, "]);");
       jm.addEndFor();
       jm.addLine("return ", sb, ".toString();");

     }

     {
View Full Code Here

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

       LocalJavaField o = jm.newJavaField(Object.class, "o");
       o.addLine(values, "[", loopVar, "]");
       jm.addIf(o, " != null");
       jm.addLine(hashCodeResult, " += ", o, ".hashCode();");
       jm.addEndIf();
       jm.addEndFor();
       jm.addLine("return ", hashCodeResult, ";");
     }

     {
       JavaMethod jm = jic.newJavaMethod("equals", boolean.class, JavaSource.PUBLIC);
View Full Code Here

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

       jm.addElse();
       jm.addIf("!", v, ".equals(", other, ".values[", loopVar, "])");
       jm.addLine("return false;");
       jm.addEndIf();
       jm.addEndIf();
       jm.addEndFor();
       jm.addLine("return true;");
     }

     return jic;
  }
View Full Code Here

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

     main.addParam(String[].class, "pArgs");
     main.setStatic(true);
     main.addThrows(Exception.class);
     main.addFor(int.class, " i = 1;  i < 10;  i++");
     main.newPlaceHolder("test", pAutoMode);
     main.addEndFor();
     js.setDynamicImports(true);
     return js;
   }

   public void testPlaceHolders() {
View Full Code Here

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

      entry.addLine("(", Map.Entry.class, ") ", iter, ".next()");
      if (!pSource.isInterface()) {
        jm.addLine(result, "[--", size, "] = new ", WildcardAttribute.class, "((",
                   QName.class, ") ", entry, ".getKey(), (", String.class, ") ",
             entry, ".getValue());");
        jm.addEndFor();
        jm.addLine("return ", result, ";");
      }
      return jm;
  }
View Full Code Here

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

    fromValueMethod.setStatic(true);
    DirectAccessible i = fromValueMethod.addForArray(instances);
    fromValueMethod.addIf(pController.getEqualsCheck(fromValueMethod, new Object[]{instances, "[", i, "].value"}, pValue));
    fromValueMethod.addLine("return ", instances, "[", i, "];");
    fromValueMethod.addEndIf();
    fromValueMethod.addEndFor();
    fromValueMethod.addThrowNew(IllegalArgumentException.class, JavaSource.getQuoted("Invalid value: "),
                                " + ", pValue);

    JavaMethod fromNameMethod = js.newJavaMethod("fromName", qName, JavaSource.PUBLIC);
    pName = fromNameMethod.addParam(String.class, "pName");
View Full Code Here

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

    fromNameMethod.setStatic(true);
    i = fromNameMethod.addForArray(instances);
    fromNameMethod.addIf(instances, "[", i, "].name.equals(", pName, ")");
    fromNameMethod.addLine("return ", instances, "[", i, "];");
    fromNameMethod.addEndIf();
    fromNameMethod.addEndFor();
    fromNameMethod.addThrowNew(IllegalArgumentException.class, JavaSource.getQuoted("Invalid name: "),
                                " + ", pName);

    JavaMethod fromStringMethod = js.newJavaMethod("fromString", qName, JavaSource.PUBLIC);
    pValue = fromStringMethod.addParam(String.class, "pValue");
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.