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

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

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.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
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()
Overrides:
toString in class Object


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