Package com.sun.grid.cull

Examples of com.sun.grid.cull.Printer


         File f = super.getFileForClass(javaClassName);

         if( !f.exists() || f.lastModified() < templateFile.lastModified() ) {


            Printer p  = new Printer(f);

            template.print(p, params );
            p.flush();
            p.close();
         }
      } catch(IntrospectionException itse) {
         IOException e = new IOException("Introspection error: " + itse.getMessage());
         e.initCause(itse);
         throw e;
View Full Code Here


        Template template = fac.createTemplate(templateFile);

        try {
            if (printer == null) {
                if (!outputFile.exists() || outputFile.lastModified() < templateFile.lastModified() || (prologFile != null && outputFile.lastModified() < prologFile.lastModified()) || (epilogFile != null && outputFile.lastModified() < epilogFile.lastModified())) {
                    printer = new Printer(outputFile);
                    if (prologFile != null) {
                        logger.fine("write prolog " + prologFile);
                        printer.printFile(prologFile);
                    }
                }
View Full Code Here

         logger.info("create template class " + className + " from file " + f);
        
         // Template class doest not exists or is older the the template file
         // Recompile it
        
         Printer p = new Printer(srcFile);

         writeHeader(p, null, className );
         writeTemplate(p, f);
         writeFooter(p, className );

         p.flush();
         p.close();

         String args [] = {        
            "-d", tmpClassesDir.getAbsolutePath(),
            "-classpath", classpath,
            "-source", javaSourceVersion,
View Full Code Here

        }
        try {
            TemplateFactory fac = new TemplateFactory(buildDir, classpath.toString(), source, target);
            Template t = fac.createTemplate(template);

            Printer p = null;

            if (getOutputFile() == null) {
                p = new Printer();
            } else {
                p = new Printer(getOutputFile());
            }




            Map<String, String> paramMap = new HashMap<String, String>();
            for (Param param : params) {
                paramMap.put(param.getName(), param.getValue());
            }
            t.print(p, paramMap);
            p.flush();
        } catch (IOException ioe) {
            throw new BuildException("I/O Error: " + ioe.getMessage(), ioe);
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.grid.cull.Printer

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.