org.wurbelizer
Class DefaultWurbiler

java.lang.Object
  extended by org.wurbelizer.AbstractWurbiler
      extended by org.wurbelizer.DefaultWurbiler
All Implemented Interfaces:
Wurbiler

public class DefaultWurbiler
extends AbstractWurbiler

Default implementation of a wurblet compiler.

This wurbiler can be used as a console application (provided for testing purposes only) or from within ant, as implemented in AntWurbiler.

It takes the wurbelizable-source as its first argument and creates a java output file together with the serialized fixed source file. Example:

 java org.wurbelizer.DefaultWurbiler Test.wrbl
 
(the extension .wrbl may be omitted)

Creates: Test.java, the wurblet source ready to be compiled by javac, and Test.ser, the fixed source.


Constructor Summary
DefaultWurbiler(File wrblFile, File outputDir)
          Creates an instance of a wurbiler with default options for wrblFile to be compiled to outputDir.
 
Method Summary
 int compile()
          Compiles the wurbelizable.
static void main(String[] args)
          Invokes the wurbiler from the command line.
 
Methods inherited from class org.wurbelizer.AbstractWurbiler
addInterface, getArgs, getImports, getIndent, getInterfaces, getLogger, getOutName, getPackageName, getParentClass, getReader, getSourceList, getWriter, isAutoIndent, logError, logWarning, setArgs, setAutoIndent, setImports, setIndent, setLogger, setOutName, setOutName, setPackageName, setParentClass, setSourceList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWurbiler

public DefaultWurbiler(File wrblFile,
                       File outputDir)
                throws FileNotFoundException
Creates an instance of a wurbiler with default options for wrblFile to be compiled to outputDir.

Parameters:
wrblFile - the input wurbelizer file
outputDir - the output directory getting the .java and .ser-files.
Throws:
FileNotFoundException - if file not found
Method Detail

compile

public int compile()
            throws IOException
Compiles the wurbelizable.

Specified by:
compile in interface Wurbiler
Overrides:
compile in class AbstractWurbiler
Returns:
the number of errors, 0 = no errors (warnings are not counted)
Throws:
IOException - if compilation failed due to i/o error

main

public static void main(String[] args)
Invokes the wurbiler from the command line.

Parameters:
args - the command line arguments


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de