Package org.codehaus.jam

Examples of org.codehaus.jam.JamService


        for (int count = 0; count < generationParams.getExtraClasses().size(); ++count) {
            jam_service_parms.includeClass((String)generationParams.getExtraClasses().get(count));
        }

        JamService service = factory.createService(jam_service_parms);
        QName extraSchemaTypeName = null;
        JamClassIterator jClassIter = service.getClasses();
        // all most all the time the ittr will have only one class in it
        while (jClassIter.hasNext()) {
            JClass jclass = (JClass)jClassIter.next();
            // serviceName = jclass.getSimpleName();
            // todo in the future , when we support annotation we can use this
View Full Code Here


        JClass[] classes = null;
        File propertiesFile = scenariosFile;
        try {
            if (srcDir != null) {
                serviceParams.includeSourcePattern(path2files(srcDir), mIncludes);
                JamService jam = jamServiceFactory.createService(serviceParams);
                classes = jam.getAllClasses();
            }
            else {
                // lets try load the properties file
                classes = loadScenarioClasses();
                propertiesFile = null;
View Full Code Here

            JamServiceParams params = jamServiceFactory.createServiceParams();
            File[] dirs = new File[] {
                new File(sourceDir)
            };
            params.includeSourcePattern(dirs, "**/*.java");
            JamService jam = jamServiceFactory.createService(params);

            {
                JavaMarshallingGenerator script = new JavaMarshallingGenerator();
                script.setJam(jam);
                script.setTargetDir(basedir + "/src/main/java");
View Full Code Here

            JamServiceFactory jamServiceFactory = JamServiceFactory.getInstance();
            JamServiceParams params = jamServiceFactory.createServiceParams();           
            File[] dirs = new File[]{new File(sourceDir)};           
            params.includeSourcePattern(dirs, "**/*.java");
            JamService jam = jamServiceFactory.createService(params);

            {
              CppClassesGenerator script = new CppClassesGenerator();
            script.setJam(jam);
            script.setTargetDir(target+"/src/main/cpp");
View Full Code Here

            JamServiceFactory jamServiceFactory = JamServiceFactory.getInstance();
            JamServiceParams params = jamServiceFactory.createServiceParams();           
            File[] dirs = new File[]{new File(sourceDir)};           
            params.includeSourcePattern(dirs, "**/*.java");
            JamService jam = jamServiceFactory.createService(params);

            {
              CHeadersGenerator script = new CHeadersGenerator();
            script.setJam(jam);
            script.setTargetDir(target+"/src/libopenwire");
View Full Code Here

     File[] cp = path2files(mClasspath);
      for(int i=0; i<cp.length; i++) p.addClasspath(cp[i]);
    }
    p.includeSourcePattern(path2files(mSrcDir),mIncludes);
    try {
      JamService js = jsf.createService(p);
      JClass[] classes = js.getAllClasses();
      mAnnogen.addAnnotationClasses(classes);
      log("Generating annotation impls for the following classes:");
      for(int i=0; i<classes.length; i++) {
        log("  "+classes[i].getQualifiedName());
      }
View Full Code Here

        } else {
          params.includeSourceFile(f);
        }
      }
    }
      JamService js = jsf.createService(params);
      ag.addAnnotationClasses(js.getAllClasses());
      ag.doCodegen();
    } catch(IOException ioe) {
      ioe.printStackTrace();
      System.out.flush();
      System.exit(-1);
View Full Code Here

  public JamClassLoader createSystemJamClassLoader() {
    JamServiceParams params = createServiceParams();
    params.setUseSystemClasspath(true);
    try {
      JamService service = createService(params);
      return service.getClassLoader();
    } catch(IOException reallyUnexpected) {
      reallyUnexpected.printStackTrace();
      throw new IllegalStateException(reallyUnexpected.getMessage());
    }
  }
View Full Code Here

    JamServiceParams params = createServiceParams();
    params.setUseSystemClasspath(false); //?
    params.setPropertyInitializer(null);
    params.addClassLoader(cl);
    try {
      JamService service = createService(params);
      return service.getClassLoader();
    } catch(IOException reallyUnexpected) {
      reallyUnexpected.printStackTrace();
      throw new IllegalStateException(reallyUnexpected.getMessage());
    }
  }
View Full Code Here

    JamServiceFactory jsf = JamServiceFactory.getInstance();
    JamServiceParams params = jsf.createServiceParams();
    CachedClassBuilder cache = new CachedClassBuilder();
    // finish initalizing the params and create the service
    params.addClassBuilder(cache);
    JamService out = jsf.createService(params);
    // now go view the xml.  we have to do this afterwards so that the
    // classloader has been created and is available for linking.
    JamXmlReader reader = new JamXmlReader(cache,in,(ElementContext)params);
    reader.read();
    {
      // slightly gross hack to get the class names into the service
      List classNames = Arrays.asList(cache.getClassNames());
      classNames.addAll(Arrays.asList(out.getClassNames()));
      String[] nameArray = new String[classNames.size()];
      classNames.toArray(nameArray);
      ((JamServiceImpl)out).setClassNames(nameArray);
    }
    return out;
View Full Code Here

TOP

Related Classes of org.codehaus.jam.JamService

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.