Class PrintingContext.Writable

  • All Implemented Interfaces:
    Enclosing class:

    public class PrintingContext.Writable
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Constructor Detail

      • Writable

        protected Writable()
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • isFirstForVariable

        public <T extends PrintingContext.Writable> T isFirstForVariable​(boolean v)
        v - use true if printing first variable declaration of CtFor statement
      • isNextForVariable

        public <T extends PrintingContext.Writable> T isNextForVariable​(boolean v)
        v - use true if printing second or next variable declaration of CtFor statement
      • setStatement

        public <T extends PrintingContext.Writable> T setStatement​(CtStatement stmt)
        There are statements (e.g. invocation), which may play role of expression too. They have to be suffixed by semicolon depending on the printing context. Call this method to inform printer that invocation is used as statement.
        stmt - the instance of the actually printed statement. Such statement will be finished by semicolon.