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
Base implementation of
SourceWriter that implements all the indenting
and keeping track of comments.
Experimental API - subject to change.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidabort()Abort the source file being generated.voidBegin emitting a JavaDoc comment.voidclose()Close the source file being generated.voidEnd emitting a JavaDoc comment.voidindent()Increase indent level.voidPrint a line at an increased indentation level without altering the indent level for the next line.voidFormat and print a line at an increased indentation level without altering the indent level for the next line.voidoutdent()Decrease indent level.voidWrite a string without a line terminator.voidFormat and print a string without a line terminator.voidprintln()Write a line terminator.voidWrite a string with a line terminator.voidFormat and print a string with a line terminator.protected abstract voidWrite a string to the underlying output.
-
Constructor Details
-
SourceWriterBase
public SourceWriterBase()
-
-
Method Details
-
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
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
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
Description copied from interface:SourceWriterWrite a string without a line terminator.- Specified by:
printin interfaceSourceWriter
-
print
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
Description copied from interface:SourceWriterWrite a string with a line terminator.- Specified by:
printlnin interfaceSourceWriter
-
println
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
Write a string to the underlying output.- Parameters:
s-
-