Package org.codehaus.jam.internal

Examples of org.codehaus.jam.internal.CachedClassBuilder


    throws IOException, XMLStreamException
  {
    if (in == null) throw new IllegalArgumentException("null stream");
    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);
    }
View Full Code Here


    throws IOException, XMLStreamException
  {
    if (in == null) throw new IllegalArgumentException("null stream");
    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);
    }
View Full Code Here

TOP

Related Classes of org.codehaus.jam.internal.CachedClassBuilder

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.