Examples of JavaSourceFactory


Examples of org.apache.ws.jaxme.js.JavaSourceFactory

      log.finest(mName, "<-", "null");
      return null;
    }

    JavaQName xmlImplementationName = pController.getClassContext().getXMLImplementationName();
    JavaSourceFactory jsf = getSchema().getJavaSourceFactory();
    JavaSource js = jsf.newJavaSource(xmlImplementationName, JavaSource.PUBLIC);
    SerializableSG.makeSerializable(pController.getSchema(), js);
    js.addImplements(pController.getClassContext().getXMLInterfaceName());
    js.addImplements(JMElement.class);

    TypeSG myTypeSG = pController.getTypeSG();
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSourceFactory

      log.finest(mName, "<-", "null");
      return null;
    }

    JavaQName xmlSerializerName = pController.getClassContext().getXMLSerializerName();
    JavaSourceFactory jsf = getSchema().getJavaSourceFactory();
    JavaSource js = jsf.newJavaSource(xmlSerializerName, JavaSource.PUBLIC);
    js.addImplements(JMXmlSerializer.class);
    myTypeSG.getComplexTypeSG().generateXMLSerializerMethods(js);
    return js;
  }
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSourceFactory

    if (!myTypeSG.isComplex()) {
      log.finest(mName, "<-", null);
      return null;
    } else {
      JavaQName xmlHandlerName = pController.getClassContext().getXMLHandlerName();
      JavaSourceFactory jsf = getSchema().getJavaSourceFactory();
      JavaSource js = jsf.newJavaSource(xmlHandlerName, JavaSource.PUBLIC);
      js.addImplements(JMHandler.class);
      if (myTypeSG.isGlobalClass()) {
        Context typeContext = myTypeSG.getComplexTypeSG().getClassContext();
        js.addExtends(typeContext.getXMLHandlerName());
        JavaQName xmlElementInterface = pController.getClassContext().getXMLInterfaceName();
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSourceFactory

 
  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

  }
 
  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

 
  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

 
  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

    public abstract void generate(JavaSourceFactory pFactory, JavaQName pTargetClass)
        throws Exception;
    public void doExecute() {
       finish();
       try {
        JavaSourceFactory factory = new JavaSourceFactory();
        generate(factory, targetClass);
        factory.write(getDestDir());
       } catch (Exception e) {
         throw new BuildException(e, getLocation());
       }
    }
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSourceFactory

           throw new BuildException("At least one nested 'chain' element must be given.",
                                     getLocation());
        }
     }
     public void doExecute() {
        JavaSourceFactory pFactory = new JavaSourceFactory();
        for (Iterator iter = chains.iterator();  iter.hasNext()) {
           ChainGenerator chain = (ChainGenerator) iter.next();
           chain.generate(pFactory);
        }
        try {
           pFactory.write(getDestDir());
        } catch (IOException e) {
           throw new BuildException(e, getLocation());
        }
     }
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSourceFactory

   */
  private void doProcess(File f, File output) throws RecognitionException,
      TokenStreamException, IOException {
    logger.info("processing " + f.getAbsolutePath() + " to output "
        + output.getAbsolutePath());
    JavaSourceFactory javaSourceFactory = new JavaSourceFactory();
    JavaParser javaParser = new JavaParser(javaSourceFactory);
    javaParser.parse(f);
    Iterator iter = javaSourceFactory.getJavaSources();
    while (iter.hasNext()) {
      JavaSource sourceClass = (JavaSource) iter.next();
      JavaQName classQualifiedName = sourceClass.getQName();
      if (pattern.matcher(classQualifiedName.toString()).matches()) {
        logger.fine("class " + classQualifiedName.toString()
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.