Class COutputSink
java.lang.Object
com.pnfsoftware.jeb.core.output.code.CodeDocumentPart
com.pnfsoftware.jeb.core.output.code.CppLikeDocumentPart
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.COutputSink
- All Implemented Interfaces:
ICodeDocument
,ITextDocumentPart
This output sink is the recipient for the generation of a C-like Abstract Syntax Tree (AST). The
sink also contains configuration elements that will guide and determine how certain AST elements
are to be generated. A sink receives the output for a class, a field, or a method element.
Generating an AST yields a special type of elements, called items, that a UI client may want to track to achieve higher level functions such as syntax coloration.
-
Field Summary
Fields inherited from class com.pnfsoftware.jeb.core.output.code.CppLikeDocumentPart
commentBlockBegin, commentBlockEnd, commentInline
Fields inherited from class com.pnfsoftware.jeb.core.output.code.CodeDocumentPart
indentString, paddingString
-
Constructor Summary
ConstructorsConstructorDescriptionCOutputSink
(long baseAnchorId) COutputSink
(long baseAnchorId, CDocument doc, INativeDecompilerUnit<?> decomp) -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendKeyword
(CKeyword keyword) int
astDepth()
astPeekSafe
(int n) astPop()
void
int
Get the method index of the method being generatedMay be nullMay be nullboolean
boolean
boolean
boolean
boolean
void
void
void
renderComment
(ICodeCoordinates coord, int what, boolean appendEOL) void
renderInlineComment
(ICodeCoordinates coord, boolean appendEOL) void
renderPreComment
(ICodeCoordinates coord) note: EOL always appendedint
setCurrentMethodIndex
(int index) Set the method index of the method being generatedvoid
void
setHideCasts
(Boolean override) void
setHideTLNS
(Boolean override) void
setMergeAdjacentDefinitions
(Boolean override) void
setOmitTypeForNextDefinitionPrinting
(boolean omitTypeForNextDefinitionPrinting) One shot deactivation of types printing in definition (i.e.void
setSourceCustomizer
(ISourceCustomizer sourceCustomizer) void
setSpaceOutCompounds
(Boolean override) void
validate()
Methods inherited from class com.pnfsoftware.jeb.core.output.code.CppLikeDocumentPart
appendMultiLineComment, appendMultiLineCommentAuto, eol, eol, getEolComment, getEolCoordinates, onEolAddComment, setEolComment, setEolComment, setEolCoordinates
Methods inherited from class com.pnfsoftware.jeb.core.output.code.CodeDocumentPart
append, append, append, appendAndRecord, appendAndRecord, appendAndRecord, appendComment, appendComment, appendCommentAuto, appendKeyword, appendKeyword, appendKeyword, appendMulti, appendParameterSeparator, brace, braceClose, bracket, bracketClose, decrementIndentationLevel, disablePadding, enablePadding, enableTokenFlattening, format, getAnchors, getCurrentAnchor, getCurrentCoordinates, getCurrentLine, getCurrentLineCoordinates, getCurrentLineIndex, getCurrentLineLength, getCurrentMarginLength, getCurrentMostPreciseCodeCoordinates, getIndentationLevel, getIndentationString, getLastLineIndex, getLine, getLineCount, getLines, getObjectLocations, incrementIndentationLevel, indentReset, isCurrentLineEmpty, markCurrentPosition, moveLastLine, moveLine, paren, parenClose, prependCodePart, recordCurrentCoordinates, recordLineCoordinates, recordObjectLocation, registerAnchor, registerAnchor, registerKeyword, resetPaddingString, setIndentationLevel, setIndentationString, setPaddingString, setParameterSeparator, space, space, toString, unrecordCurrentCoordinates, unrecordLineCoordinates
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.pnfsoftware.jeb.core.output.text.ITextDocumentPart
getAnchor
-
Constructor Details
-
COutputSink
public COutputSink(long baseAnchorId) -
COutputSink
-
-
Method Details
-
getDocument
May be null -
getDecompilerUnit
May be null -
setSpaceOutCompounds
-
getSpaceOutCompounds
public boolean getSpaceOutCompounds() -
setMergeAdjacentDefinitions
-
getMergeAdjacentDefinitions
public boolean getMergeAdjacentDefinitions() -
setHideCasts
-
getHideCasts
public boolean getHideCasts() -
setHideTLNS
-
getHideTLNS
public boolean getHideTLNS() -
omitTypeForNextDefinitionPrinting
public boolean omitTypeForNextDefinitionPrinting() -
setOmitTypeForNextDefinitionPrinting
public void setOmitTypeForNextDefinitionPrinting(boolean omitTypeForNextDefinitionPrinting) One shot deactivation of types printing in definition (i.e. when set to true, it only works for the next printing) -
pushContainingClass
-
popContainingClass
-
getCurrentContainingClass
-
getTopLevelClass
-
pushContainingMethod
-
popContainingMethod
-
getCurrentContainingMethod
-
setDynamicContentManager
-
getDynamicContentManager
-
setSourceCustomizer
-
getSourceCustomizer
-
setCurrentMethodIndex
public int setCurrentMethodIndex(int index) Set the method index of the method being generated- Parameters:
index
- the current method index- Returns:
- the previous index
-
getCurrentMethodIndex
public int getCurrentMethodIndex()Get the method index of the method being generated- Returns:
- <0 if cannot be determined or invalid
-
appendKeyword
-
astPush
-
astPop
-
astPeekSafe
-
astDepth
public int astDepth() -
renderPreComment
note: EOL always appended -
renderInlineComment
-
renderComment
-
validate
public void validate()- Overrides:
validate
in classCppLikeDocumentPart
-