Class SourceBuilder


  • abstract class SourceBuilder
    extends Object
    Common behavior for source builder classes.
    • Constructor Detail

      • SourceBuilder

        SourceBuilder()
    • Method Detail

      • createLine

        String createLine​(String... toks)
        Creates a line from the given tokens with the current indentation and separated by spaces.
        Parameters:
        toks - the tokens to include on the line
        Returns:
        the String constructed from the tokens
      • toLines

        abstract List<String> toLines()
        Return the source for this declaration as lines of Strings
        Returns:
        the list of lines in this declaration
      • toString

        public String toString()
        Return this declaration as a String.
        Overrides:
        toString in class Object
        Returns:
        the String for this declaration