Package spoon.reflect.visitor
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 Summary
Constructors Modifier Constructor Description protected
Writable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
<T extends PrintingContext.Writable>
TforceWildcardGenerics(boolean add)
<T extends PrintingContext.Writable>
TignoreEnclosingClass(boolean add)
<T extends PrintingContext.Writable>
TignoreGenerics(boolean add)
<T extends PrintingContext.Writable>
TignoreStaticAccess(boolean add)
<T extends PrintingContext.Writable>
TisFirstForVariable(boolean add)
<T extends PrintingContext.Writable>
TisNextForVariable(boolean add)
<T extends PrintingContext.Writable>
TsetStatement(CtStatement stmt)
There are statements (e.g.<T extends PrintingContext.Writable>
TskipArray(boolean add)
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
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.
-
-