public class

JavaDocument

extends CodeDocument
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.events.EventSource
     ↳ com.pnfsoftware.jeb.core.output.text.impl.AbstractTextDocument
       ↳ com.pnfsoftware.jeb.core.output.code.CodeDocument
         ↳ com.pnfsoftware.jeb.core.units.code.java.JavaDocument

Class Overview

Java AST document used to render a decompiled piece of Java code. These documents are provided by the IDexDecompilerUnit or generated by IJavaSourceUnit.

Summary

Constants
String propnameDisplayASTElementStackOnHover
String propnameDisplayMethodInternalsAsComment
String propnameDisplayPrivateMethodsLast
String propnameDisregardCollapse
String propnameDoNotGenerateThisIfPossible
String propnameGenerateAnnotations
String propnameGenerateLambdas
String propnameGenerateOverrideAnnotations
String propnameGenerateSyntheticFields
String propnameGenerateSyntheticMethods
String propnameInsertBlankLinesAfterCompounds
String propnameResolveFieldAccessTargets
String propnameResolveMethodCallTargets
String propnameSortItemsForRendering
String propnameSplitCallArgThreshold
String propnameUseDebugInfoNames
[Expand]
Inherited Fields
From class com.pnfsoftware.jeb.util.events.EventSource
Public Constructors
JavaDocument(IJavaSourceUnit ast)
Public Methods
ICoordinates addressToCoordinates(String address, CoordinatesConversionPrecision precision)
Precision is not used - Use an exact address
static void buildPDM(IPropertyDefinitionManager unitPDM)
String coordinatesToAddress(ICoordinates coordinates, AddressConversionPrecision precision)
Convert document-specific text coordinates to a unit-specific address.
ICodeCoordinates coordinatesToCodeCoordinates(ICoordinates coordinates)
void dispose()
The default implementation does nothing.
long getAnchorCount()
JavaOutputSink getDocumentPart(long anchorId, int linesAfter, int linesBefore)
IJavaSourceUnit getOwnerUnit()
IUnit getUnit()
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.core.output.text.impl.AbstractTextDocument
From class com.pnfsoftware.jeb.util.events.EventSource
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.output.IGenericDocument
From interface com.pnfsoftware.jeb.core.output.text.ITextDocument
From interface com.pnfsoftware.jeb.util.events.IEventSource

Constants

public static final String propnameDisplayASTElementStackOnHover

Constant Value: "DisplayASTElementStackOnHover"

public static final String propnameDisplayMethodInternalsAsComment

Constant Value: "DisplayMethodInternalsAsComment"

public static final String propnameDisplayPrivateMethodsLast

Constant Value: "DisplayPrivateMethodsLast"

public static final String propnameDisregardCollapse

Constant Value: "DisregardCollapse"

public static final String propnameDoNotGenerateThisIfPossible

Constant Value: "DoNotGenerateThisIfPossible"

public static final String propnameGenerateAnnotations

Constant Value: "GenerateAnnotations"

public static final String propnameGenerateLambdas

Constant Value: "GenerateLambdas"

public static final String propnameGenerateOverrideAnnotations

Constant Value: "GenerateOverrideAnnotations"

public static final String propnameGenerateSyntheticFields

Constant Value: "GenerateSyntheticFields"

public static final String propnameGenerateSyntheticMethods

Constant Value: "GenerateSyntheticMethods"

public static final String propnameInsertBlankLinesAfterCompounds

Constant Value: "InsertBlankLinesAfterCompounds"

public static final String propnameResolveFieldAccessTargets

Constant Value: "ResolveFieldAccessTargets"

public static final String propnameResolveMethodCallTargets

Constant Value: "ResolveMethodCallTargets"

public static final String propnameSortItemsForRendering

Constant Value: "SortItemsForRendering"

public static final String propnameSplitCallArgThreshold

Constant Value: "SplitCallArgThreshold"

public static final String propnameUseDebugInfoNames

Constant Value: "UseDebugInfoNames"

Public Constructors

public JavaDocument (IJavaSourceUnit ast)

Public Methods

public ICoordinates addressToCoordinates (String address, CoordinatesConversionPrecision precision)

Precision is not used - Use an exact address

Parameters
address a textual address
Returns
  • the text coordinates, null on error

public static void buildPDM (IPropertyDefinitionManager unitPDM)

public String coordinatesToAddress (ICoordinates coordinates, AddressConversionPrecision precision)

Convert document-specific text coordinates to a unit-specific address.

Note: The addressing scheme is unit specific, and defined by the plugin developer. Addresses should not start with the reserved '@' prefix.

Parameters
coordinates the coordinates
precision indicate the precision of the address ( COARSE will return a raw address, with a faster result while FINE will return a more precise address that can be a bit longer). If COARSE can not be retrieved, it may return a null result, and the user will need to recall this method with another precision.
Returns
  • the address, null on error

public ICodeCoordinates coordinatesToCodeCoordinates (ICoordinates coordinates)

public void dispose ()

The default implementation does nothing.

public long getAnchorCount ()

public JavaOutputSink getDocumentPart (long anchorId, int linesAfter, int linesBefore)

public IJavaSourceUnit getOwnerUnit ()

public IUnit getUnit ()