org.nuxeo.ecm.gwt.runtime.rebind
Class JSourceWriter
java.lang.Object
java.io.Writer
java.io.StringWriter
org.nuxeo.ecm.gwt.runtime.rebind.JSourceWriter
- All Implemented Interfaces:
- com.google.gwt.user.rebind.SourceWriter, Closeable, Flushable, Appendable
public class JSourceWriter
- extends StringWriter
- implements com.google.gwt.user.rebind.SourceWriter
A source writer that is writing in memory.
Used to be able to add imports after begining to write
- Author:
- Bogdan Stefanescu
Constructor Summary |
JSourceWriter(com.google.gwt.user.rebind.ClassSourceFileComposerFactory composer,
com.google.gwt.core.ext.GeneratorContext context,
PrintWriter printWriter)
|
Methods inherited from class java.io.StringWriter |
append, append, append, close, flush, getBuffer, toString, write, write, write, write |
crlf
protected String crlf
composer
protected com.google.gwt.user.rebind.ClassSourceFileComposerFactory composer
indent
protected int indent
inComment
protected boolean inComment
interfaces
protected ArrayList<String> interfaces
imports
protected ArrayList<String> imports
context
protected com.google.gwt.core.ext.GeneratorContext context
printWriter
protected PrintWriter printWriter
JSourceWriter
public JSourceWriter(com.google.gwt.user.rebind.ClassSourceFileComposerFactory composer,
com.google.gwt.core.ext.GeneratorContext context,
PrintWriter printWriter)
getComposer
public com.google.gwt.user.rebind.ClassSourceFileComposerFactory getComposer()
- Returns:
- the composer.
println
public void println()
- Specified by:
println
in interface com.google.gwt.user.rebind.SourceWriter
println
public void println(String str)
- Specified by:
println
in interface com.google.gwt.user.rebind.SourceWriter
print
public void print(String s)
- Specified by:
print
in interface com.google.gwt.user.rebind.SourceWriter
indent
public void indent()
- Specified by:
indent
in interface com.google.gwt.user.rebind.SourceWriter
outdent
public void outdent()
- Specified by:
outdent
in interface com.google.gwt.user.rebind.SourceWriter
indentln
public void indentln(String s)
- Specified by:
indentln
in interface com.google.gwt.user.rebind.SourceWriter
tabs
public void tabs()
beginJavaDocComment
public void beginJavaDocComment()
- Specified by:
beginJavaDocComment
in interface com.google.gwt.user.rebind.SourceWriter
endJavaDocComment
public void endJavaDocComment()
- Specified by:
endJavaDocComment
in interface com.google.gwt.user.rebind.SourceWriter
commit
public void commit(com.google.gwt.core.ext.TreeLogger logger)
- Specified by:
commit
in interface com.google.gwt.user.rebind.SourceWriter
addImport
public void addImport(String imp)
addImplementedInterface
public void addImplementedInterface(String intfName)
Copyright © 2010 Nuxeo SAS. All Rights Reserved.