public class

COutputSink

extends CodeDocumentPart
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.output.code.CodeDocumentPart
     ↳ 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

Public Constructors
COutputSink(long baseAnchorId)
COutputSink(long baseAnchorId, CDocument doc, INativeDecompilerUnit<?> decomp)
Public Methods
void appendComment(String text)
void appendKeyword(CKeyword keyword)
void appendKeyword(String keyword)
ICElement astPeekSafe(int n)
ICElement astPop()
void astPush(ICElement elt)
void eol()
Overridden to make sure a hint is added every time we end a line.
void eol(ICodeCoordinates coord)
End the current line.
ICClass getCurrentContainingClass()
ICMethod getCurrentContainingMethod()
int getCurrentMethodIndex()
Get the method index of the method being generated
IDynamicContentManager getDynamicContentManager()
String getGeneratedComment(ICodeCoordinates coord)
boolean getMergeAdjacentDefinitions()
ISourceCustomizer getSourceCustomizer()
boolean getSpaceOutCompounds()
ICClass getTopLevelClass()
boolean hasGeneratedComment(ICodeCoordinates coord)
boolean omitTypeForNextDefinitionPrinting()
void onEolSetComment(String comment)
void onEolSetComment(String comment, ICodeCoordinates coord)
void onEolSetCoordinates(ICodeCoordinates coord)
ICClass popContainingClass()
ICMethod popContainingMethod()
void pushContainingClass(ICClass c)
void pushContainingMethod(ICMethod m)
int setCurrentMethodIndex(int index)
Set the method index of the method being generated
void setDynamicContentManager(IDynamicContentManager dcm)
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)
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.core.output.code.CodeDocumentPart
From class java.lang.Object
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 appendComment (String text)

public void appendKeyword (CKeyword keyword)

public void appendKeyword (String keyword)

public ICElement astPeekSafe (int n)

public ICElement astPop ()

public void astPush (ICElement elt)

public void eol ()

Overridden to make sure a hint is added every time we end a line.

public void eol (ICodeCoordinates coord)

End the current line.

Parameters
coord optional chunk coordinates

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 IDynamicContentManager getDynamicContentManager ()

public String getGeneratedComment (ICodeCoordinates coord)

public boolean getMergeAdjacentDefinitions ()

public ISourceCustomizer getSourceCustomizer ()

public boolean getSpaceOutCompounds ()

public ICClass getTopLevelClass ()

public boolean hasGeneratedComment (ICodeCoordinates coord)

public boolean omitTypeForNextDefinitionPrinting ()

public void onEolSetComment (String comment)

public void onEolSetComment (String comment, ICodeCoordinates coord)

public void onEolSetCoordinates (ICodeCoordinates coord)

public ICClass popContainingClass ()

public ICMethod popContainingMethod ()

public void pushContainingClass (ICClass c)

public void pushContainingMethod (ICMethod m)

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 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)