org.apache.cocoon.components.language.programming.java
Class Jikes
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLoggable
|
+--org.apache.cocoon.components.language.programming.java.AbstractJavaCompiler
|
+--org.apache.cocoon.components.language.programming.java.Jikes
- All Implemented Interfaces:
- org.apache.avalon.framework.component.Component, LanguageCompiler, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable
- public class Jikes
- extends AbstractJavaCompiler
This class wraps IBM's Jikes Java compiler
NOTE: inspired by the Apache Jasper implementation.
- Since:
- 2.0
- Version:
- CVS $Id: Jikes.java,v 1.5 2002/02/22 07:00:09 cziegeler Exp $
- Author:
- Stefano Mazzocchi
Constructor Summary |
Jikes()
|
Method Summary |
boolean |
compile()
Execute the compiler |
protected java.util.List |
parseStream(java.io.BufferedReader input)
Parse the compiler error stream to produce a list of
CompilerError s |
java.lang.String |
toString()
|
protected java.lang.String[] |
toStringArray(java.util.List arguments)
Copy arguments to a string array |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Jikes
public Jikes()
toStringArray
protected java.lang.String[] toStringArray(java.util.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 java.io.IOException
- Execute the compiler
- Following copied from interface:
org.apache.cocoon.components.language.programming.LanguageCompiler
- Parameters:
filename
- The object program base file namebaseDirectory
- The directory containing the object program fileencoding
- The encoding expected in the source file or
null
if it is the platform's default encoding- Throws:
LanguageException
- If an error occurs during compilation
parseStream
protected java.util.List parseStream(java.io.BufferedReader input)
throws java.io.IOException
- Parse the compiler error stream to produce a list of
CompilerError
s
- Overrides:
parseStream
in class AbstractJavaCompiler
- Parameters:
errors
- The error stream- Returns:
- The list of compiler error messages
- Throws:
java.io.IOException
- If an error occurs during message collection
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.