Package org.apache.ws.jaxme.js

Examples of org.apache.ws.jaxme.js.JavaField.newComment()


    return jm;
  }
 
  private JavaField getXMLHandlersLevelField(ComplexTypeSG pController, JavaSource pSource) {
    JavaField jf = pSource.newJavaField("__level", int.class, JavaSource.PRIVATE);
    jf.newComment().addLine("The current level of nested elements. 0, if outside the root element.");
    return jf;
  }

  protected JavaMethod getXMLHandlersCharactersMethod(ComplexTypeSG pController, JavaSource pSource,
                            JavaField pLevelVar) throws SAXException {
View Full Code Here


  private JavaField getXMLHandlersStateField(GroupSG pController, JavaSource pSource) throws SAXException {
    ParticleSG[] myParticles = pController.getParticles();
    if (myParticles.length > 0) {
      JavaField jf = pSource.newJavaField("__state", int.class, JavaSource.PRIVATE);
      JavaComment jc = jf.newComment();
      jc.addLine("The current state. The following values are valid states:");
      jc.addLine(" 0 = Before parsing the element");
      jc.addLine(" 1 = Parsing an unknown element");
      jc.addLine(" 2 = After parsing the element");
      for (int i = 0;  i < myParticles.length;  i++) {
View Full Code Here

  private JavaField getXMLHandlersHandlerField(GroupSG pController, JavaSource pSource) throws SAXException {
    ParticleSG[] myParticles = pController.getParticles();
    if (myParticles.length > 0) {
      JavaField jf = pSource.newJavaField("__handler", JMHandler.class, JavaSource.PRIVATE);
      jf.newComment().addLine("The current handler for parsing child elements or simple content.");
      return jf;
    }
    return null;

  }
View Full Code Here

    return jm;
  }
 
  private JavaField getXMLHandlersLevelField(ComplexTypeSG pController, JavaSource pSource) {
    JavaField jf = pSource.newJavaField("__level", int.class, JavaSource.PRIVATE);
    jf.newComment().addLine("The current level of nested elements. 0, if outside the root element.");
    return jf;
  }

  protected JavaMethod getXMLHandlersCharactersMethod(ComplexTypeSG pController, JavaSource pSource,
                            JavaField pLevelVar) throws SAXException {
View Full Code Here

      Item item = pItems[i];
    String itemName = item.getName();
    String itemValue = item.getValue();
    JavaField instance = pSource.newJavaField(itemName, pSource.getQName(),
                                             JavaSource.PUBLIC);
    instance.newComment().addLine("The enumeration item with name " + itemName +
                                 " and value " + itemValue + ".");
    instance.setStatic(true);
    instance.setFinal(true);
    instance.addLine("new ", pSource.getQName(), "(", JavaSource.getQuoted(itemName),
                     ", ", JavaSource.getQuoted(itemValue), ")");
View Full Code Here

      Item item = pItems[i];
    String itemName = item.getName();
    String itemValue = item.getValue();
    JavaField instance = pSource.newJavaField(itemName, pSource.getQName(),
                                             JavaSource.PUBLIC);
    instance.newComment().addLine("The enumeration item with name " + itemName +
                                 " and value " + itemValue + ".");
    instance.setStatic(true);
    instance.setFinal(true);
    instance.addLine("new ", pSource.getQName(), "(", JavaSource.getQuoted(itemName),
                     ", ", JavaSource.getQuoted(itemValue), ")");
View Full Code Here

    return pState-1;
  }

  protected JavaField newStateField() throws SAXException {
    JavaField jf = getJavaSource().newJavaField("__state", int.class, JavaSource.PRIVATE);
    JavaComment jc = jf.newComment();
    jc.addLine("The current state. The following values are valid states:");
    jc.addLine(" 0 = Before parsing the element");
    for (int i = 0;  i < particles.length;  i++) {
      ParticleSG particle = particles[i];
      if (particle.isGroup()) {
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.