Class PrintingContext.Writable

java.lang.Object
spoon.reflect.visitor.PrintingContext.Writable
All Implemented Interfaces:
AutoCloseable
Enclosing class:
PrintingContext

public class PrintingContext.Writable extends Object implements AutoCloseable
  • Constructor Details

    • Writable

      protected Writable()
  • Method Details

    • close

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

      public <T extends PrintingContext.Writable> T isFirstForVariable(boolean add)
      Parameters:
      add - true to the set option, false for removing. PrintingContext.isFirstForVariable()
    • isNextForVariable

      public <T extends PrintingContext.Writable> T isNextForVariable(boolean add)
    • ignoreGenerics

      public <T extends PrintingContext.Writable> T ignoreGenerics(boolean add)
    • skipArray

      public <T extends PrintingContext.Writable> T skipArray(boolean add)
    • ignoreStaticAccess

      public <T extends PrintingContext.Writable> T ignoreStaticAccess(boolean add)
    • ignoreEnclosingClass

      public <T extends PrintingContext.Writable> T ignoreEnclosingClass(boolean add)
    • forceWildcardGenerics

      public <T extends PrintingContext.Writable> T forceWildcardGenerics(boolean add)
    • 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.