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

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.Jikes
All Implemented Interfaces:
Component, LanguageCompiler, LogEnabled, Poolable, Recyclable, Serviceable

public class Jikes
extends AbstractJavaCompiler
implements Serviceable

This class wraps IBM's Jikes Java compiler NOTE: inspired by the Apache Jasper implementation.

Since:
2.0
Version:
CVS $Id: Jikes.java 56841 2004-11-07 12:06:55Z giacomo $
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
Jikes()
           
 
Method Summary
 boolean compile()
          Execute the compiler
protected  List parseStream(BufferedReader input)
          Parse the compiler error stream to produce a list of CompilerErrors
 void service(ServiceManager serviceManager)
          Set the ServiceManager
 String toString()
           
protected  String[] toStringArray(List arguments)
          Copy arguments to a string array
 
Methods inherited from class org.apache.cocoon.components.language.programming.java.AbstractJavaCompiler
fillArguments, getErrors, recycle, setClasspath, setCompilerComplianceLevel, setDestination, setEncoding, setFile, setSource
 
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

Jikes

public Jikes()
Method Detail

service

public void service(ServiceManager serviceManager)
             throws ServiceException
Set the ServiceManager

Specified by:
service in interface Serviceable
Throws:
ServiceException

toStringArray

protected String[] toStringArray(List arguments)
Copy arguments to a string array

Overrides:
toStringArray in class AbstractJavaCompiler
Parameters:
arguments - The compiler arguments
Returns:
A string array containing compilation arguments

compile

public boolean compile()
                throws IOException
Execute the compiler

Specified by:
compile in interface LanguageCompiler
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.