Class GCodeSection

  • Direct Known Subclasses:
    GComment, GMethod

    public class GCodeSection
    extends CodeGenerator
    Contains generated code or comment lines.
    Author:
    homac
    • Field Detail

      • currentLine

        protected java.lang.StringBuffer currentLine
    • Constructor Detail

      • GCodeSection

        public GCodeSection​(int initialIndent)
    • Method Detail

      • toString

        public java.lang.String toString​(int indent)
      • appendln

        public GCodeSection appendln​(java.lang.String line)
      • append

        public GCodeSection append​(java.lang.String text)
      • numLines

        public int numLines()
      • getLines

        public java.util.ArrayList<java.lang.String> getLines()
      • sortLines

        public void sortLines()
        Sorts existing lines by alphabetic order. Useful to sort for example import statements.
      • sortLines

        public void sortLines​(java.util.Comparator<java.lang.String> c)
        Sorts existing lines by the order defined by the given comparator. Useful to sort for example import statements.