org.apache.cocoon.components.language.programming.java
Class Javac

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.language.programming.java.AbstractJavaCompiler
          extended by org.apache.cocoon.components.language.programming.java.Javac
All Implemented Interfaces:
Poolable, Recyclable, Component, LogEnabled, LanguageCompiler
Direct Known Subclasses:
Pizza

public class Javac
extends AbstractJavaCompiler

This class wraps the Sun's Javac Compiler.

Since:
2.0
Version:
CVS $Id: Javac.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Stefano Mazzocchi

Field Summary
 
Fields inherited from class org.apache.cocoon.components.language.programming.java.AbstractJavaCompiler
classpath, compilerComplianceLevel, destDir, encoding, errors, file, srcDir
 
Constructor Summary
Javac()
           
 
Method Summary
 boolean compile()
          Compile a source file yielding a loadable class file.
protected  List parseStream(BufferedReader input)
          Parse the compiler error stream to produce a list of CompilerErrors
 String toString()
           
 
Methods inherited from class org.apache.cocoon.components.language.programming.java.AbstractJavaCompiler
fillArguments, getErrors, recycle, setClasspath, setCompilerComplianceLevel, setDestination, setEncoding, setFile, setSource, toStringArray
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Javac

public Javac()
Method Detail

compile

public boolean compile()
                throws IOException
Compile a source file yielding a loadable class file. null if it is the platform's default encoding

Throws:
IOException - If an error occurs during compilation

parseStream

protected List parseStream(BufferedReader input)
                    throws IOException
Parse the compiler error stream to produce a list of CompilerErrors

Specified by:
parseStream in class AbstractJavaCompiler
Parameters:
input - The error stream
Returns:
The list of compiler error messages
Throws:
IOException - If an error occurs during message collection

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.