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

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.components.language.programming.java.AbstractJavaCompiler
          extended byorg.apache.cocoon.components.language.programming.java.Javac
All Implemented Interfaces:
Component, LanguageCompiler, LogEnabled, Poolable, Recyclable

public class Javac
extends AbstractJavaCompiler

This class wraps the Sun's Javac Compiler.

Since:
2.0
Version:
CVS $Id: Javac.java 156688 2005-03-09 20:56:23Z antonio $
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()


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.