public interface

ICodeUnit

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

Class Overview

Base interface for units representing disassembled binary code, such as bytecode, opcodes, object files, executable files, and so on.

Code units are interactive, in order to provide facility for code refactoring, modification, etc.

Code units generate CodeDocument, and as such, generate AssemblyItem objects. Implementors must implement getItemObject(long) properly.

Summary

Public Methods
abstract String getAddressFromCodeCoordinates(ICodeCoordinates cc)
Convert code coordinates to a unit address.
abstract ICodeClass getClass(String fqname)
Convenience method used to retrieve a class by name.
abstract List<? extends ICodeClass> getClasses()
Get the list of classes.
abstract ICodeCoordinates getCodeCoordinatesFromAddress(String address)
Convert a unit address to code coordinates.
abstract ICodeItem getCodeItemByAddress(String fqname)
Convenience method used to retrieve a code item by name.
abstract CodeCommentManager<?> getCommentManager()
Get the comment manager.
abstract String getDisassembly()
Convenience method used to generate the disassembly of this code unit using standard settings.
abstract ITextDocument getDisassemblyDocument()
Convenience method to retrieve the text document representing the disassembly of this code unit.
abstract ICodeField getField(String fqname)
Convenience method used to retrieve a field by name.
abstract List<? extends ICodeField> getFields()
Get the list of fields.
abstract ICodeHierarchy getHierarchy()
Get the code hierarchy.
abstract ICodeMethod getMethod(String fqname)
Convenience method used to retrieve a method by name.
abstract List<? extends ICodeMethod> getMethods()
Get the list of methods.
abstract List<? extends ICodePackage> getPackages()
Get the list of code packages.
abstract List<? extends ICodeString> getStrings()
Get the list of code strings.
abstract List<? extends ICodeType> getTypes()
Get the list of types.
[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 String getAddressFromCodeCoordinates (ICodeCoordinates cc)

Convert code coordinates to a unit address.

public abstract ICodeClass getClass (String fqname)

Convenience method used to retrieve a class by name.

public abstract List<? extends ICodeClass> getClasses ()

Get the list of classes.

public abstract ICodeCoordinates getCodeCoordinatesFromAddress (String address)

Convert a unit address to code coordinates.

public abstract ICodeItem getCodeItemByAddress (String fqname)

Convenience method used to retrieve a code item by name.

Returns
  • a class, method field or other item

public abstract CodeCommentManager<?> getCommentManager ()

Get the comment manager. This method is optional. When the unit is disposed, this method must return null. The default implementation returns null.

Returns
  • a comment manager, or null if the unit does not have one

public abstract String getDisassembly ()

Convenience method used to generate the disassembly of this code unit using standard settings.

public abstract ITextDocument getDisassemblyDocument ()

Convenience method to retrieve the text document representing the disassembly of this code unit.

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

public abstract ICodeField getField (String fqname)

Convenience method used to retrieve a field by name.

public abstract List<? extends ICodeField> getFields ()

Get the list of fields.

public abstract ICodeHierarchy getHierarchy ()

Get the code hierarchy.

public abstract ICodeMethod getMethod (String fqname)

Convenience method used to retrieve a method by name.

public abstract List<? extends ICodeMethod> getMethods ()

Get the list of methods.

public abstract List<? extends ICodePackage> getPackages ()

Get the list of code packages.

public abstract List<? extends ICodeString> getStrings ()

Get the list of code strings.

public abstract List<? extends ICodeType> getTypes ()

Get the list of types.