uic.output
Class JavaFileWriter
java.lang.Object
uic.output.JavaFileWriter
- All Implemented Interfaces:
- OutputterInterface
- public class JavaFileWriter
- extends Object
- implements OutputterInterface
Take a Builder that has a build-structure in it and generate a java file.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
done
protected TreeSet done
blackList
protected Collection blackList
JavaFileWriter
public JavaFileWriter()
JavaFileWriter
public JavaFileWriter(UICBuilder builder)
setBuilder
public void setBuilder(UICBuilder builder)
- Description copied from interface:
OutputterInterface
- The UICBuilder contains the structure and info like the classname needed
when 'outputting'.
- Specified by:
setBuilder
in interface OutputterInterface
run
public Object run(String workingDir,
UIC.BuildSettings buildSettings)
throws CompilerException
- Description copied from interface:
OutputterInterface
- Run the outputter.
- Specified by:
run
in interface OutputterInterface
- Parameters:
workingDir
- is the (relative) path to the directory where the input file lives.buildSettings
- variables used to create the build.
- Throws:
CompilerException
- when something fails.
write
public void write(Writer writer)
throws IOException
- Throws:
IOException
build
protected String build(Representer representer,
boolean isRootNode)
build
protected String build(Representer representer,
boolean isRootNode,
boolean rootWidget)
- Parameters:
representer
- the representer that should be buildisRootNode
- when true this representer is on a new line and needs to be assigned to a name.rootWidget
- determines wheather the representer should be instanciated or not. The main class (where the guiInit is a method of) does not have a '= new' part, so then this is true
buildAdds
protected String buildAdds(ContainerRepresenter container)
getImports
protected String getImports(List widgets)
getImports
protected void getImports(Vector done,
HashMap packages,
Representer rep)
getImport
protected String getImport(Representer rep)
getPackageName
protected static String getPackageName(String fullClassName)
getDeclarations
protected static String getDeclarations(List widgets)
indent
protected static String indent(String in,
int amount)
chompClassname
protected static String chompClassname(String in)
fillBlackList
protected static Collection fillBlackList(UICBuilder builder)
Copyright © 2002,2003 Thomas Zander Available under the Free Apache licence