Package com.google.gwt.codegen.server
Class SourceWriterBase
- java.lang.Object
-
- com.google.gwt.codegen.server.SourceWriterBase
-
- All Implemented Interfaces:
SourceWriter
- Direct Known Subclasses:
JavaSourceWriter,StringSourceWriter
public abstract class SourceWriterBase extends java.lang.Object implements SourceWriter
Base implementation ofSourceWriterthat implements all the indenting and keeping track of comments.Experimental API - subject to change.
-
-
Constructor Summary
Constructors Constructor Description SourceWriterBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidabort()Abort the source file being generated.voidbeginJavaDocComment()Begin emitting a JavaDoc comment.voidclose()Close the source file being generated.voidendJavaDocComment()End emitting a JavaDoc comment.voidindent()Increase indent level.voidindentln(java.lang.String string)Print a line at an increased indentation level without altering the indent level for the next line.voidindentln(java.lang.String format, java.lang.Object... args)Format and print a line at an increased indentation level without altering the indent level for the next line.voidoutdent()Decrease indent level.voidprint(java.lang.String s)Write a string without a line terminator.voidprint(java.lang.String format, java.lang.Object... args)Format and print a string without a line terminator.voidprintln()Write a line terminator.voidprintln(java.lang.String string)Write a string with a line terminator.voidprintln(java.lang.String format, java.lang.Object... args)Format and print a string with a line terminator.protected abstract voidwriteString(java.lang.String s)Write a string to the underlying output.
-
-
-
Method Detail
-
abort
public abstract void abort()
Description copied from interface:SourceWriterAbort the source file being generated.- Specified by:
abortin interfaceSourceWriter
-
beginJavaDocComment
public void beginJavaDocComment()
Description copied from interface:SourceWriterBegin emitting a JavaDoc comment.- Specified by:
beginJavaDocCommentin interfaceSourceWriter
-
close
public void close()
Description copied from interface:SourceWriterClose the source file being generated.- Specified by:
closein interfaceSourceWriter
-
endJavaDocComment
public void endJavaDocComment()
Description copied from interface:SourceWriterEnd emitting a JavaDoc comment.- Specified by:
endJavaDocCommentin interfaceSourceWriter
-
indent
public void indent()
Description copied from interface:SourceWriterIncrease indent level.- Specified by:
indentin interfaceSourceWriter
-
indentln
public void indentln(java.lang.String string)
Description copied from interface:SourceWriterPrint a line at an increased indentation level without altering the indent level for the next line.- Specified by:
indentlnin interfaceSourceWriter
-
indentln
public void indentln(java.lang.String format, java.lang.Object... args)Description copied from interface:SourceWriterFormat and print a line at an increased indentation level without altering the indent level for the next line.- Specified by:
indentlnin interfaceSourceWriter- Parameters:
format- format string, as inString.format(String, Object...)args- arguments for the format string
-
outdent
public void outdent()
Description copied from interface:SourceWriterDecrease indent level.- Specified by:
outdentin interfaceSourceWriter
-
print
public void print(java.lang.String s)
Description copied from interface:SourceWriterWrite a string without a line terminator.- Specified by:
printin interfaceSourceWriter
-
print
public void print(java.lang.String format, java.lang.Object... args)Description copied from interface:SourceWriterFormat and print a string without a line terminator.- Specified by:
printin interfaceSourceWriter- Parameters:
format- format string, as inString.format(String, Object...)args- arguments for the format string
-
println
public void println()
Description copied from interface:SourceWriterWrite a line terminator.- Specified by:
printlnin interfaceSourceWriter
-
println
public void println(java.lang.String string)
Description copied from interface:SourceWriterWrite a string with a line terminator.- Specified by:
printlnin interfaceSourceWriter
-
println
public void println(java.lang.String format, java.lang.Object... args)Description copied from interface:SourceWriterFormat and print a string with a line terminator.- Specified by:
printlnin interfaceSourceWriter- Parameters:
format- format string, as inString.format(String, Object...)args- arguments for the format string
-
writeString
protected abstract void writeString(java.lang.String s)
Write a string to the underlying output.- Parameters:
s-
-
-