Class PrintingContext.Writable

  • All Implemented Interfaces:
    java.lang.AutoCloseable
    Enclosing class:
    PrintingContext

    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)
        Parameters:
        v - use true if printing first variable declaration of CtFor statement
      • isNextForVariable

        public <T extends PrintingContext.Writable> T isNextForVariable​(boolean v)
        Parameters:
        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.
        Parameters:
        stmt - the instance of the actually printed statement. Such statement will be finished by semicolon.