public interface

ISourceUnit

implements IInteractiveUnit
com.pnfsoftware.jeb.core.units.code.ISourceUnit
Known Indirect Subclasses

Class Overview

This interface is used to represent source code abstract syntax trees (AST). Such units are produced by IDecompilerUnits.

Summary

Public Methods
abstract IDecompilerUnit getDecompiler()
Get the decompiler unit (possibly the parent, possibly null) that generated this unit.
abstract String getFileExtension()
Get the ideal or most commonly accepted file extension for the code represented by this source unit.
abstract String getFullyQualifiedName()
Get the fully-qualified, original name of this source entity.
abstract String getSource()
Generate the decompiled source text.
abstract ITextDocument getSourceDocument()
Get the text document representing the decompiled source.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.IUnitCreator
From interface com.pnfsoftware.jeb.core.IUserDataSupport
From interface com.pnfsoftware.jeb.core.units.IAddressableUnit
From interface com.pnfsoftware.jeb.core.units.IInteractiveUnit
From interface com.pnfsoftware.jeb.core.units.IUnit
From interface com.pnfsoftware.jeb.util.events.IEventSource

Public Methods

public abstract IDecompilerUnit getDecompiler ()

Get the decompiler unit (possibly the parent, possibly null) that generated this unit.

Returns
  • a decompiler unit, possibly null

public abstract String getFileExtension ()

Get the ideal or most commonly accepted file extension for the code represented by this source unit.

Returns
  • an extension string (not prefixed by dot), or null if unknown

public abstract String getFullyQualifiedName ()

Get the fully-qualified, original name of this source entity. Since ISourceUnit are normally produced by decompilers, this method will likely return a class or method name.

Returns
  • the name

public abstract String getSource ()

Generate the decompiled source text. Convenience method.

public abstract ITextDocument getSourceDocument ()

Get the text document representing the decompiled source.

The caller is responsible for disposing the returned document after usage.