public class

AddressFormatter

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.asm.render.AddressFormatter

Class Overview

A native memory address formatter.

The formatter can generate different types of addresses:

  • As an absolute address (always in hexadecimal form)
  • As a label (using a INativeCodeUnit)
  • As a relative address in hexadecimal/decimal

As an example: loc_400248 -> 400248h -> PC+10h/ PC+16.

Summary

Nested Classes
enum AddressFormatter.AddressBase Rendering base. 
Public Constructors
AddressFormatter()
AddressFormatter(AddressFormatter.AddressBase base, String pcName, NumberFormatter.HexaNotationType hexNotation)
Public Methods
String format(INativeCodeUnit<?> unit, int bitsize, long address, IInstructionOperandGeneric opnd)
Format a number using the formatter's current settings.
String format(int bitsize, long address, IInstructionOperandGeneric opnd)
String format(INativeCodeUnit<?> unit, int bitsize, long address, IInstructionOperandGeneric opnd, AddressFormatter.AddressBase base)
AddressFormatter.AddressBase getBase()
NumberFormatter.HexaNotationType getHexaNotationType()
String getRelativePrefix()
void setBase(AddressFormatter.AddressBase base)
void setHexaNotationType(NumberFormatter.HexaNotationType hexaNotationType)
void setRelativePrefix(String relativePrefix)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AddressFormatter ()

public AddressFormatter (AddressFormatter.AddressBase base, String pcName, NumberFormatter.HexaNotationType hexNotation)

Public Methods

public String format (INativeCodeUnit<?> unit, int bitsize, long address, IInstructionOperandGeneric opnd)

Format a number using the formatter's current settings.

public String format (int bitsize, long address, IInstructionOperandGeneric opnd)

public String format (INativeCodeUnit<?> unit, int bitsize, long address, IInstructionOperandGeneric opnd, AddressFormatter.AddressBase base)

public AddressFormatter.AddressBase getBase ()

public NumberFormatter.HexaNotationType getHexaNotationType ()

public String getRelativePrefix ()

public void setBase (AddressFormatter.AddressBase base)

public void setHexaNotationType (NumberFormatter.HexaNotationType hexaNotationType)

public void setRelativePrefix (String relativePrefix)