Examples of addIf()


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

      if (namespaces.contains(uri)) {
        continue;
      }

      if ("".equals(uri)) {
        jm.addIf(namespaces.isEmpty(), pNamespaceURI, " == null  ||  ", pNamespaceURI, ".length() == 0");
      } else {
        jm.addIf(namespaces.isEmpty(), JavaSource.getQuoted(uri), ".equals(", pNamespaceURI, ")");
      }
      namespaces.add(uri);
View Full Code Here

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

      }

      if ("".equals(uri)) {
        jm.addIf(namespaces.isEmpty(), pNamespaceURI, " == null  ||  ", pNamespaceURI, ".length() == 0");
      } else {
        jm.addIf(namespaces.isEmpty(), JavaSource.getQuoted(uri), ".equals(", pNamespaceURI, ")");
      }
      namespaces.add(uri);

      // Now handle all elements with the namespace uri
      for (int j = i;  j < myParticles.length;  j++) {
View Full Code Here

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

        child = myParticles[j];
        XsQName name = child.getObjectSG().getName();
        if (!name.getNamespaceURI().equals(uri)) {
          continue;
        }
        jm.addIf(j == i, JavaSource.getQuoted(name.getLocalName()), ".equals(", pLocalName, ")");

        List validStates = new ArrayList();
        if (child.isMultiple()) {
          validStates.add(new Integer(j+3));
        }
View Full Code Here

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

    }
    jm.addEndIf();
    jm.addBreak();

    jm.addDefault();
    jm.addIf(pHandlerVar, " == null");
    jm.addLine("super.startElement(", pNamespaceURI, ", ", pLocalName, ", ", pQName, ", ", pAttr, ");");
    jm.addElse();
    jm.addLine(pHandlerVar, ".startElement(", pNamespaceURI, ", ", pLocalName, ", ", pQName, ", ", pAttr, ");");
    jm.addEndIf();
  }
View Full Code Here

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

    DirectAccessible pNamespaceURI = jm.addParam(String.class, "pNamespaceURI");
    DirectAccessible pLocalName = jm.addParam(String.class, "pLocalName");
    DirectAccessible pQName = jm.addParam(String.class, "pQName");
    jm.addThrows(SAXException.class);

    jm.addIf(pHandlerVar, " == null");
    jm.addIf(pLevelVar, " != 1");
    jm.addLine("super.endElement(", pNamespaceURI, ", ", pLocalName, ", ", pQName, ");");
    jm.addEndIf();
    jm.addElse();
    jm.addLine(pHandlerVar, ".endElement(", pNamespaceURI, ", ", pLocalName, ", ", pQName, ");");
View Full Code Here

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

    DirectAccessible pLocalName = jm.addParam(String.class, "pLocalName");
    DirectAccessible pQName = jm.addParam(String.class, "pQName");
    jm.addThrows(SAXException.class);

    jm.addIf(pHandlerVar, " == null");
    jm.addIf(pLevelVar, " != 1");
    jm.addLine("super.endElement(", pNamespaceURI, ", ", pLocalName, ", ", pQName, ");");
    jm.addEndIf();
    jm.addElse();
    jm.addLine(pHandlerVar, ".endElement(", pNamespaceURI, ", ", pLocalName, ", ", pQName, ");");
    jm.addEndIf();
View Full Code Here

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

    for (int i = 0;  i < myParticles.length;  i++) {
      ParticleSG child = myParticles[i];
      ObjectSG osg = child.getObjectSG();
      TypeSG childType = osg.getTypeSG();
      jm.addCase(Integer.toString(3+i));
      jm.addIf(pHandlerVar, " != null");
      jm.addLine(pHandlerVar, ".endDocument();");
      jm.addEndIf();
      Object v;
      JavaQName type;
      if (childType.isComplex()) {
View Full Code Here

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

    JavaMethod jm = pSource.newJavaMethod("characters", JavaQNameImpl.VOID, JavaSource.PUBLIC);
    DirectAccessible pChars = jm.addParam(char[].class, "pChars");
    DirectAccessible pOffset = jm.addParam(int.class, "pOffset");
    DirectAccessible pLen = jm.addParam(int.class, "pLen");
    jm.addThrows(SAXException.class);
    jm.addIf(pHandlerVar, " == null");
    jm.addLine("super.characters(", pChars,", ", pOffset, ", ", pLen, ");");
    jm.addElse();
    jm.addLine(pHandlerVar, ".characters(", pChars, ", ", pOffset, ", ", pLen, ");");
    jm.addEndIf();
    return jm;
View Full Code Here

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

    newInstanceMethod.addLine("return ", jf, ".getElement(", pElementInterface, ");");

    {
      JavaMethod getPropertyMethod = js.newJavaMethod("getProperty", Object.class, "public");
      Parameter pName = getPropertyMethod.addParam(String.class, "pName");
      getPropertyMethod.addIf(properties, " == null");
      getPropertyMethod.addLine("return null;");
      getPropertyMethod.addEndIf();
      getPropertyMethod.addLine("return ", properties, ".get(", pName, ");");
    }
View Full Code Here

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

    {
      JavaMethod setPropertyMethod = js.newJavaMethod("setProperty", void.class, "public");
      Parameter pName = setPropertyMethod.addParam(String.class, "pName");
      Parameter pValue = setPropertyMethod.addParam(Object.class, "pValue");
      setPropertyMethod.addIf(properties, " == null");
      setPropertyMethod.addLine(properties, " = new ", HashMap.class, "();");
      setPropertyMethod.addEndIf();
      setPropertyMethod.addLine(properties, ".put(", pName, ", ", 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.