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 Object implements SourceWriter
Base implementation of SourceWriter that implements all the indenting and keeping track of comments.

Experimental API - subject to change.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    Abort the source file being generated.
    void
    Begin emitting a JavaDoc comment.
    void
    Close the source file being generated.
    void
    End emitting a JavaDoc comment.
    void
    Increase indent level.
    void
    indentln(String string)
    Print a line at an increased indentation level without altering the indent level for the next line.
    void
    indentln(String format, Object... args)
    Format and print a line at an increased indentation level without altering the indent level for the next line.
    void
    Decrease indent level.
    void
    Write a string without a line terminator.
    void
    print(String format, Object... args)
    Format and print a string without a line terminator.
    void
    Write a line terminator.
    void
    println(String string)
    Write a string with a line terminator.
    void
    println(String format, Object... args)
    Format and print a string with a line terminator.
    protected abstract void
    Write a string to the underlying output.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SourceWriterBase

      public SourceWriterBase()
  • Method Details

    • abort

      public abstract void abort()
      Description copied from interface: SourceWriter
      Abort the source file being generated.
      Specified by:
      abort in interface SourceWriter
    • beginJavaDocComment

      public void beginJavaDocComment()
      Description copied from interface: SourceWriter
      Begin emitting a JavaDoc comment.
      Specified by:
      beginJavaDocComment in interface SourceWriter
    • close

      public void close()
      Description copied from interface: SourceWriter
      Close the source file being generated.
      Specified by:
      close in interface SourceWriter
    • endJavaDocComment

      public void endJavaDocComment()
      Description copied from interface: SourceWriter
      End emitting a JavaDoc comment.
      Specified by:
      endJavaDocComment in interface SourceWriter
    • indent

      public void indent()
      Description copied from interface: SourceWriter
      Increase indent level.
      Specified by:
      indent in interface SourceWriter
    • indentln

      public void indentln(String string)
      Description copied from interface: SourceWriter
      Print a line at an increased indentation level without altering the indent level for the next line.
      Specified by:
      indentln in interface SourceWriter
      Parameters:
      string -
    • indentln

      public void indentln(String format, Object... args)
      Description copied from interface: SourceWriter
      Format and print a line at an increased indentation level without altering the indent level for the next line.
      Specified by:
      indentln in interface SourceWriter
      Parameters:
      format - format string, as in String.format(String, Object...)
      args - arguments for the format string
    • outdent

      public void outdent()
      Description copied from interface: SourceWriter
      Decrease indent level.
      Specified by:
      outdent in interface SourceWriter
    • print

      public void print(String s)
      Description copied from interface: SourceWriter
      Write a string without a line terminator.
      Specified by:
      print in interface SourceWriter
      Parameters:
      s -
    • print

      public void print(String format, Object... args)
      Description copied from interface: SourceWriter
      Format and print a string without a line terminator.
      Specified by:
      print in interface SourceWriter
      Parameters:
      format - format string, as in String.format(String, Object...)
      args - arguments for the format string
    • println

      public void println()
      Description copied from interface: SourceWriter
      Write a line terminator.
      Specified by:
      println in interface SourceWriter
    • println

      public void println(String string)
      Description copied from interface: SourceWriter
      Write a string with a line terminator.
      Specified by:
      println in interface SourceWriter
      Parameters:
      string -
    • println

      public void println(String format, Object... args)
      Description copied from interface: SourceWriter
      Format and print a string with a line terminator.
      Specified by:
      println in interface SourceWriter
      Parameters:
      format - format string, as in String.format(String, Object...)
      args - arguments for the format string
    • writeString

      protected abstract void writeString(String s)
      Write a string to the underlying output.
      Parameters:
      s -