Package spoon.support.sniper.internal
Interface PrinterEvent
- All Known Implementing Classes:
ElementPrinterEvent
,TokenPrinterEvent
public interface PrinterEvent
Represents an action of PrettyPrinter
-
Method Summary
Modifier and TypeMethodDescription@Nullable SourcePositionHolder
getRole()
void
printSourceFragment(SourceFragment fragment, ModificationStatus isModified)
We have a source fragment of to be printed element.
-
Method Details
-
getRole
CtRole getRole()- Returns:
- role of printed source code of element in scope of its parent
-
printSourceFragment
We have a source fragment of to be printed element. Print unmodified parts of this source `fragment`- Parameters:
fragment
-isModified
- true if at least some part of `SourceFragment` is modified.
-
getElement
@Nullable SourcePositionHolder getElement()- Returns:
- printed element or null if printing a primitive token
-