org.wurbelizer
Interface Wurbiler

All Known Implementing Classes:
AbstractWurbiler, DefaultWurbiler

public interface Wurbiler

The wurblet compiler.


Method Summary
 int compile()
          Compiles the wurbelizable.
 String[] getArgs()
          Gets the preset wurblet args.
 String[] getImports()
          Gets the list of imports.
 int getIndent()
          Gets the source indentation.
 Logger getLogger()
          Gets the logger for warnings and errors.
 String getOutName()
          Gets the name of the output stream
 String getPackageName()
          Gets the package name.
 String getParentClass()
          Gets the parent class.
 List<String> getSourceList()
          Gets the list of invariant wurblet strings of the output level.
 boolean isAutoIndent()
          Gets the autoindent feature.
 void setArgs(String[] args)
          Preset wurblet args.
 void setAutoIndent(boolean autoIndent)
          Sets the autoindent feature.
 void setImports(String[] imports)
          Sets the imports.
 void setIndent(int indent)
          Sets the indentation for code generating the source.
 void setLogger(Logger logger)
          Sets the logger for warnings and errors.
 void setOutName()
          Sets name of the output stream to the default value (out).
 void setOutName(String outName)
          Sets the name of the output stream in the generated source.
 void setPackageName(String packageName)
          Sets the package name.
 void setParentClass(String parentClass)
          Sets the parent class.
 void setSourceList(List<String> sourceList)
          Presets the list of invariant wurblet strings of the output level.
 

Method Detail

compile

int compile()
            throws IOException
Compiles the wurbelizable.

Returns:
number of errors, 0 = no errors (warnings are not counted)
Throws:
IOException - if compilation failed due to i/o error

getSourceList

List<String> getSourceList()
Gets the list of invariant wurblet strings of the output level.

Returns:
a list of strings

setSourceList

void setSourceList(List<String> sourceList)
Presets the list of invariant wurblet strings of the output level.

Parameters:
sourceList - the source list, null if compile() should initialize it

getIndent

int getIndent()
Gets the source indentation.

Returns:
the current indentation

setIndent

void setIndent(int indent)
Sets the indentation for code generating the source.

Parameters:
indent - the new indentation

setAutoIndent

void setAutoIndent(boolean autoIndent)
Sets the autoindent feature.

Parameters:
autoIndent - true to enable autoindent (default)

isAutoIndent

boolean isAutoIndent()
Gets the autoindent feature.

Returns:
true if autoindent is enabled (default)

setOutName

void setOutName(String outName)
Sets the name of the output stream in the generated source.

Parameters:
outName - null sets to the default value "out".

setOutName

void setOutName()
Sets name of the output stream to the default value (out).


getOutName

String getOutName()
Gets the name of the output stream

Returns:
the name of the output stream

getLogger

Logger getLogger()
Gets the logger for warnings and errors.

Returns:
Value of property logger.

setLogger

void setLogger(Logger logger)
Sets the logger for warnings and errors.

Parameters:
logger - New value of property logger.

getPackageName

String getPackageName()
Gets the package name.

Returns:
the package name, null if default package

setPackageName

void setPackageName(String packageName)
Sets the package name.

Parameters:
packageName - the package name

getParentClass

String getParentClass()
Gets the parent class.

Returns:
the name of the parent class, null if default

setParentClass

void setParentClass(String parentClass)
Sets the parent class.

Parameters:
parentClass - the name of the parent class, null if default (AbstractWurblet)

getImports

String[] getImports()
Gets the list of imports.

Returns:
array of imports

setImports

void setImports(String[] imports)
Sets the imports.

Parameters:
imports - is the array of imports

getArgs

String[] getArgs()
Gets the preset wurblet args.

Returns:
wurblet args, null = default

setArgs

void setArgs(String[] args)
Preset wurblet args. The default (null) means that the args are determined at runtime by the wurbler, i.e. command-line, @wurblet-directive.

Parameters:
args - the wurblet args


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