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 -
Constructor Summary
ConstructorsConstructorDescriptionCOutputSink(long baseAnchorId) COutputSink(long baseAnchorId, CDocument doc, INativeDecompilerUnit<?> decomp) -
Method Summary
Modifier and TypeMethodDescriptionvoidappendKeyword(CKeyword keyword) intastDepth()astPeekSafe(int n) astPop()voidintGet the method index of the method being generatedMay be nullMay be nullbooleanbooleanbooleanbooleanbooleanvoidvoidvoidrenderComment(ICodeCoordinates coord, int what, boolean appendEOL) voidrenderInlineComment(ICodeCoordinates coord, boolean appendEOL) voidrenderPreComment(ICodeCoordinates coord) note: EOL always appendedintsetCurrentMethodIndex(int index) Set the method index of the method being generatedvoidvoidsetHideCasts(Boolean override) voidsetHideTLNS(Boolean override) voidsetMergeAdjacentDefinitions(Boolean override) voidsetOmitTypeForNextDefinitionPrinting(boolean omitTypeForNextDefinitionPrinting) One shot deactivation of types printing in definition (i.e.voidsetSourceCustomizer(ISourceCustomizer sourceCustomizer) voidsetSpaceOutCompounds(Boolean override) voidvalidate()Methods inherited from class com.pnfsoftware.jeb.core.output.code.CppLikeDocumentPart
appendMultiLineComment, appendMultiLineCommentAuto, eol, eol, getEolComment, getEolCoordinates, onEolAddComment, setEolComment, setEolComment, setEolCoordinatesMethods 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, getAnchor, getAnchors, getCountOfAnchors, getCountOfLines, 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
-
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:
validatein classCppLikeDocumentPart
-