Package org.apache.ws.jaxme.js

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


                  "\n" +
                  "}\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


 
  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

  }
 
  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());
    createXMLBean(pController, js);
    log.finest(mName, "<-", js.getQName());
    return js;
  }
View Full Code Here

  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);
    createXMLSerializer(pController, js);
    log.finest(mName, "<-", js.getQName());
    return js;
  }
View Full Code Here

  }

  public JavaSource getXMLHandler(ComplexTypeSG pController, JavaQName pQName) throws SAXException {
    final String mName = "getXMLHandler";
    log.finest(mName, "->", typeSG.getName());
    JavaSourceFactory jsf = typeSG.getSchema().getJavaSourceFactory();
    JavaSource js = jsf.newJavaSource(pQName, JavaSource.PUBLIC);
    createXMLHandler(pController, js);
    log.finest(mName, "<-", js.getQName());
    return js;
  }
View Full Code Here

        }
    }

    private JavaSource[] loadSources(ClassLoader pClassLoader, String pName)
            throws RecognitionException, TokenStreamException, IOException {
        JavaSourceFactory jsf = new JavaSourceFactory();
        List sources = new ArrayList();
        Set names = new HashSet();
        loadSources(pClassLoader, JavaQNameImpl.getInstance(pName),
                    jsf, sources, names);
        if (sources.isEmpty()) {
View Full Code Here

        try {
            if (cl == null) {
                throw new ClassNotFoundException(controllerInterfaceName);
            }
            CompiledClassReflector r = new CompiledClassReflector(controllerInterfaceName, cl);
            result = new JavaSource[]{r.getJavaSource(new JavaSourceFactory())};
        } catch (ClassNotFoundException e) {
            result = loadSources(Thread.currentThread().getContextClassLoader(),
                                 controllerInterfaceName);
            if (result == null) {
              throw e;
View Full Code Here

     ChainGenerator cg = new ChainGenerator();
     cg.setChainInterfaceName("org.apache.ws.jaxme.generator.sg.ComplexTypeSGChain");
     cg.setControllerInterfaceName("org.apache.ws.jaxme.generator.sg.ComplexTypeSG");
     cg.setImplementationClassName("org.apache.ws.jaxme.generator.sg.ComplexTypeSGImpl");
     cg.setProxyClassName("org.apache.ws.jaxme.generator.sg.ComplexTypeSGChainImpl");
     JavaSourceFactory f = new JavaSourceFactory();
     cg.generate(f);
     f.write(new File("/tmp/qName"));
   }
View Full Code Here

           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();
           try {
               chain.generate(pFactory);
           } catch (Exception e) {
               throw new BuildException(e, getLocation());
           }
        }
        try {
           pFactory.write(getDestDir());
        } catch (IOException e) {
           throw new BuildException(e, getLocation());
        }
     }
View Full Code Here

                                         getLocation());
            }
        }

    public void doExecute() throws Exception {
            JavaSourceFactory jsf = new JavaSourceFactory();
            JavaSourceFactory inputs = new JavaSourceFactory();
            XmlRpcClientGenerator gen = new XmlRpcClientGenerator(jsf, getTargetPackage());
            List sources = new ArrayList();
            for (int i = 0;  i < serverClasses.size();  i++) {
              FileSet fs = (FileSet) serverClasses.get(i);
                DirectoryScanner ds = fs.getDirectoryScanner(getProject());
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.js.JavaSourceFactory

Copyright © 2018 www.massapicom. 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.