public class

COutputSink

extends CppLikeDocumentPart
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

Class Overview

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.

Summary

[Expand]
Inherited Fields
From class com.pnfsoftware.jeb.core.output.code.CppLikeDocumentPart
From class com.pnfsoftware.jeb.core.output.code.CodeDocumentPart
Public Constructors
COutputSink(long baseAnchorId)
COutputSink(long baseAnchorId, CDocument doc, INativeDecompilerUnit<?> decomp)
Public Methods
void appendKeyword(CKeyword keyword)
int astDepth()
ICElement astPeekSafe(int n)
ICElement astPop()
void astPush(ICElement elt)
ICClass getCurrentContainingClass()
ICMethod getCurrentContainingMethod()
int getCurrentMethodIndex()
Get the method index of the method being generated
INativeDecompilerUnit<?> getDecompilerUnit()
May be null
CDocument getDocument()
May be null
IDynamicContentManager getDynamicContentManager()
boolean getHideCasts()
boolean getHideTLNS()
boolean getMergeAdjacentDefinitions()
ISourceCustomizer getSourceCustomizer()
boolean getSpaceOutCompounds()
ICClass getTopLevelClass()
boolean omitTypeForNextDefinitionPrinting()
ICClass popContainingClass()
ICMethod popContainingMethod()
void pushContainingClass(ICClass c)
void pushContainingMethod(ICMethod m)
void renderComment(ICodeCoordinates coord, int what, boolean appendEOL)
void renderInlineComment(ICodeCoordinates coord, boolean appendEOL)
void renderPreComment(ICodeCoordinates coord)
note: EOL always appended
int setCurrentMethodIndex(int index)
Set the method index of the method being generated
void setDynamicContentManager(IDynamicContentManager dcm)
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()
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.core.output.code.CppLikeDocumentPart
From class com.pnfsoftware.jeb.core.output.code.CodeDocumentPart
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.output.code.ICodeDocument
From interface com.pnfsoftware.jeb.core.output.text.ITextDocumentPart

Public Constructors

public COutputSink (long baseAnchorId)

public COutputSink (long baseAnchorId, CDocument doc, INativeDecompilerUnit<?> decomp)

Public Methods

public void appendKeyword (CKeyword keyword)

public int astDepth ()

public ICElement astPeekSafe (int n)

public ICElement astPop ()

public void astPush (ICElement elt)

public ICClass getCurrentContainingClass ()

public ICMethod getCurrentContainingMethod ()

public int getCurrentMethodIndex ()

Get the method index of the method being generated

Returns
  • <0 if cannot be determined or invalid

public INativeDecompilerUnit<?> getDecompilerUnit ()

May be null

public CDocument getDocument ()

May be null

public IDynamicContentManager getDynamicContentManager ()

public boolean getHideCasts ()

public boolean getHideTLNS ()

public boolean getMergeAdjacentDefinitions ()

public ISourceCustomizer getSourceCustomizer ()

public boolean getSpaceOutCompounds ()

public ICClass getTopLevelClass ()

public boolean omitTypeForNextDefinitionPrinting ()

public ICClass popContainingClass ()

public ICMethod popContainingMethod ()

public void pushContainingClass (ICClass c)

public void pushContainingMethod (ICMethod m)

public void renderComment (ICodeCoordinates coord, int what, boolean appendEOL)

public void renderInlineComment (ICodeCoordinates coord, boolean appendEOL)

public void renderPreComment (ICodeCoordinates coord)

note: EOL always appended

public int setCurrentMethodIndex (int index)

Set the method index of the method being generated

Parameters
index the current method index
Returns
  • the previous index

public void setDynamicContentManager (IDynamicContentManager dcm)

public void setHideCasts (Boolean override)

public void setHideTLNS (Boolean override)

public void setMergeAdjacentDefinitions (Boolean override)

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)

public void setSourceCustomizer (ISourceCustomizer sourceCustomizer)

public void setSpaceOutCompounds (Boolean override)

public void validate ()