Examples of newJavaSource()


Examples of org.apache.ws.jaxme.js.JavaSourceFactory.newJavaSource()

  public JavaSource getXMLInterface(ComplexTypeSG pController) throws SAXException {
    final String mName = "getXMLInterface";
    log.finest(mName, "->");
    JavaQName qName = pController.getClassContext().getXMLInterfaceName();
    JavaSourceFactory jsf = pController.getTypeSG().getSchema().getJavaSourceFactory();
    JavaSource js = jsf.newJavaSource(qName, JavaSource.PUBLIC);
    js.setType(JavaSource.INTERFACE);

    generateProperties(pController, js);
    if (!pController.hasSimpleContent()) {
      GroupSG groupSG = pController.getComplexContentSG().getGroupSG();
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSourceFactory.newJavaSource()

 
  public JavaSource getXMLImplementation(ComplexTypeSG pController) throws SAXException {
    final String mName = "getXMLImplementation(JavaQName)";
    log.finest(mName, "->", typeSG.getName());
    JavaSourceFactory jsf = pController.getTypeSG().getSchema().getJavaSourceFactory();
    JavaSource js = jsf.newJavaSource(pController.getClassContext().getXMLImplementationName(), JavaSource.PUBLIC);
    js.addImplements(pController.getClassContext().getXMLInterfaceName());
    SerializableSG.makeSerializable(pController.getTypeSG().getSchema(), js);

    generateProperties(pController, js);
    if (!pController.hasSimpleContent()) {
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSourceFactory.newJavaSource()

  public JavaSource getXMLSerializer(ComplexTypeSG pController) throws SAXException {
    final String mName = "getXMLSerializer";
    log.finest(mName, "->", typeSG.getName());
    JavaQName xmlSerializerName = pController.getClassContext().getXMLSerializerName();
    JavaSourceFactory jsf = typeSG.getSchema().getJavaSourceFactory();
    JavaSource js = jsf.newJavaSource(xmlSerializerName, JavaSource.PUBLIC);
    js.addExtends(JMXmlSerializerImpl.class);
    pController.generateXMLSerializerMethods(js);
    return js;
  }
 
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSourceFactory.newJavaSource()

  public JavaSource getXMLHandler(ComplexTypeSG pController) throws SAXException {
    final String mName = "getXMLHandler";
    log.finest(mName, "->", typeSG.getName());
    JavaQName xmlSerializerName = pController.getClassContext().getXMLHandlerName();
    JavaSourceFactory jsf = typeSG.getSchema().getJavaSourceFactory();
    JavaSource js = jsf.newJavaSource(xmlSerializerName, JavaSource.PUBLIC);
    js.addExtends(JMHandlerImpl.class);
    pController.generateXMLHandlerMethods(js);
    return js;
  }
 
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSourceFactory.newJavaSource()

    JavaSourceFactory factory = new JavaSourceFactory();
    factory.setOverwriteForced(true);
    // Let the factory create a Java source class
    // "com.mycompany.demo.Parser"
    JavaQName className = getBusinessInformer(sourceClass.getQName());
    JavaSource js = factory.newJavaSource(className, "public");
    JavaComment comment = js.newComment();
    comment.addLine("");
    comment.addLine("Define improved Informer for "+sourceClass.getClassName()+".");
    comment.addLine("Elements of this method allows easier usage of improved gaedo finders.");
    comment.addLine("The instances of FieldInformer used for that class various fields have been chosen according to FieldInformerLocator current implementation.");
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSourceFactory.newJavaSource()

      JavaConstructor jcon;
      JavaMethod jm;
      JavaField jf;
      LocalJavaField lfj;
      if (pProtection == null) {
        js = factory.newJavaSource(JavaQNameImpl.getInstance(PACKAGE_NAME, CLASS_NAME));
        js.newJavaInnerClass("Bof");
        jf = js.newJavaField("someField", int.class);
        jcon = js.newJavaConstructor();
        jm = js.newJavaMethod("test", void.class);
        lfj = jm.newJavaField(String.class, "localTest");
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSourceFactory.newJavaSource()

        jf = js.newJavaField("someField", int.class);
        jcon = js.newJavaConstructor();
        jm = js.newJavaMethod("test", void.class);
        lfj = jm.newJavaField(String.class, "localTest");
      } else {
        js = factory.newJavaSource(JavaQNameImpl.getInstance(PACKAGE_NAME, CLASS_NAME), pProtection);
        js.newJavaInnerClass("Bof", pProtection);
        jf = js.newJavaField("someField", int.class, pProtection);
        jcon = js.newJavaConstructor(pProtection);
        jm = js.newJavaMethod("test", void.class, pProtection);
        lfj = jm.newJavaField(String.class, "localTest");
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSourceFactory.newJavaSource()

      assertStringEquals(getResult(JavaSource.PUBLIC), js.toString());
   }

   public void testAbstract() {
     JavaSourceFactory factory = new JavaSourceFactory();
     JavaSource js = factory.newJavaSource(JavaQNameImpl.getInstance("com.foo", "Bar"), JavaSource.PUBLIC);
     js.setAbstract(true);
     JavaMethod jm = js.newJavaMethod("test", JavaQNameImpl.VOID, JavaSource.PUBLIC);
     jm.setAbstract(true);
     assertStringEquals("public abstract void test();\n", jm.asString());
     assertStringEquals("package com.foo;\n" +
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSourceFactory.newJavaSource()

                  "}\n", js.asString());
   }

   private JavaSource getPlaceHolderSource(boolean pAutoMode) {
     JavaSourceFactory factory = new JavaSourceFactory();
     JavaSource js = factory.newJavaSource(JavaQNameImpl.getInstance("com.foo", "Bar"), JavaSource.PUBLIC);
     JavaMethod main = js.newJavaMethod("main", JavaQNameImpl.VOID, JavaSource.PUBLIC);
     main.addParam(String[].class, "pArgs");
     main.setStatic(true);
     main.addThrows(Exception.class);
     main.addFor(int.class, " i = 1;  i < 10;  i++");
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSourceFactory.newJavaSource()

  public JavaSource getXMLInterface(ComplexTypeSG pController) throws SAXException {
    final String mName = "getXMLInterface";
    log.finest(mName, "->");
    JavaQName qName = pController.getClassContext().getXMLInterfaceName();
    JavaSourceFactory jsf = pController.getTypeSG().getSchema().getJavaSourceFactory();
    JavaSource js = jsf.newJavaSource(qName, JavaSource.PUBLIC);
    js.setType(JavaSource.INTERFACE);
    createXMLBean(pController, js);
    log.finest(mName, "<-", js.getQName());
    return js;
  }
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.