Package org.apache.ws.jaxme.js

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


           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

    /** For tests
     */
    public static void main(String[] args) throws Exception {
      for (int i = 0;  i < args.length;  i++) {
        new JavaParser(new JavaSourceFactory()).parse(new File(args[i]));
        }
    }
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

  /** Reads the interface methods and converts them
   * into an instance of {@link JavaSource}.
   */
  public JavaSource getJavaSource(JavaSourceFactory pFactory) {
        Class c = getCompiledClass();
    JavaSource js = new JavaSourceFactory().newJavaSource(JavaQNameImpl.getInstance(c.getName(), true));
    Method[] methods = c.getMethods();
    for (int i = 0;  i < methods.length;  i++) {
      Method m = methods[i];
      getMethod(js, m);
    }
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, true),
                    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

      for (int i = 0;  i < schemaFiles.length;  i++) {
        log("Reading schema file " + schemaFiles[i], Project.MSG_VERBOSE);
        try {
      SchemaSG schemaSG = generator.generate(schemaFiles[i]);
          if (producesFilesSet != null) {
            JavaSourceFactory jsf = schemaSG.getJavaSourceFactory();
            File targetDirectory = getTarget();
            for (Iterator iter = jsf.getJavaSources();  iter.hasNext()) {
              JavaSource js = (JavaSource) iter.next();
              File f = jsf.getLocation(targetDirectory, js).getAbsoluteFile();
              producesFilesSet.remove(f);
            }
            for (Iterator iter = jsf.getTextFiles();  iter.hasNext()) {
              TextFile tf = (TextFile) iter.next();
              File f = jsf.getLocation(targetDirectory, tf).getAbsoluteFile();
              producesFilesSet.remove(f);
            }
          }
        } catch (SAXParseException e) {
            String msg = LocSAXException.formatMsg(e.getMessage() == null ? e.getClass().getName() : e.getMessage(),
View Full Code Here

  private JavaSourceBuilder source;
  private int nbGeneratedSources = 0;
 
  public JavaSourceCompilerHandler(CompilerOptions options) {
    this.options = options;
    this.sourceFactory = new JavaSourceFactory();
    this.sourceFactory.setLogger(new JaxmeNullLog());
  }
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.