Interface SourceWriter

All Known Implementing Classes:
JavaSourceWriter, SourceWriterBase, StringSourceWriter

public interface SourceWriter
A mechanism to write source files.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
  • Method Details

    • abort

      void abort()
      Abort the source file being generated.
    • beginJavaDocComment

      void beginJavaDocComment()
      Begin emitting a JavaDoc comment.
    • close

      void close()
      Close the source file being generated.
    • endJavaDocComment

      void endJavaDocComment()
      End emitting a JavaDoc comment.
    • indent

      void indent()
      Increase indent level.
    • indentln

      void indentln(String string)
      Print a line at an increased indentation level without altering the indent level for the next line.
      Parameters:
      string -
    • indentln

      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.
      Parameters:
      format - format string, as in String.format(String, Object...)
      args - arguments for the format string
    • outdent

      void outdent()
      Decrease indent level.
    • print

      void print(String s)
      Write a string without a line terminator.
      Parameters:
      s -
    • print

      void print(String format, Object... args)
      Format and print a string without a line terminator.
      Parameters:
      format - format string, as in String.format(String, Object...)
      args - arguments for the format string
    • println

      void println()
      Write a line terminator.
    • println

      void println(String string)
      Write a string with a line terminator.
      Parameters:
      string -
    • println

      void println(String format, Object... args)
      Format and print a string with a line terminator.
      Parameters:
      format - format string, as in String.format(String, Object...)
      args - arguments for the format string