public class

AddressFormatter

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

Class Overview

Address formatter. Allow address display in 3 shapes:
- Label (using a ProcessorBasedCodeUnit
- Absolute address (always in hexadecimal form)
- Relative address in Hexadecimal
- Relative address in decimal
As an example: loc_400248 -> 400248h -> PC+10h PC+16.
Please note that relative addresses will not be displayed for Absolute addresses (they will remain unchanged).

TODO: copied from NumberFormatter / needs review

Summary

Nested Classes
enum AddressFormatter.AddressBase  
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)