public class

NumberFormatter

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

Class Overview

Number formatter, used for immediates and addresses.
TODO: merge with AddressFormatter.

Notes:
- max 64-bit long
- signedness: applicable to oct/dec/hex, N/A for bin/ascii

TODO:
- support for hexa-numbers lower case or upper case (eg, 0x7ffa vs 0x7FFA)
- support for hex fills
- support for floating numbers

Summary

Nested Classes
enum NumberFormatter.HexaNotationType  
enum NumberFormatter.NumberBase  
Public Constructors
NumberFormatter()
NumberFormatter(NumberFormatter defaultNumberFormatter)
Public Methods
String format(int bitsize, long rawValue)
Format a number using the formatter's current settings.
String format(int bitsize, long rawValue, NumberFormatter.NumberBase base, boolean treatAsSignedNumber)
NumberFormatter.NumberBase getBase()
NumberFormatter.HexaNotationType getHexaNotationType()
boolean isSignedNumber()
NumberFormatter.NumberBase rotateBase()
void setBase(NumberFormatter.NumberBase base)
void setConstantsFormatterOverride(ConstantsFormatter cf)
void setHexaNotationType(NumberFormatter.HexaNotationType hexaNotationType)
void setSignedNumber(boolean signedNumber)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public NumberFormatter ()

public NumberFormatter (NumberFormatter defaultNumberFormatter)

Public Methods

public String format (int bitsize, long rawValue)

Format a number using the formatter's current settings.

public String format (int bitsize, long rawValue, NumberFormatter.NumberBase base, boolean treatAsSignedNumber)

public NumberFormatter.NumberBase getBase ()

public NumberFormatter.HexaNotationType getHexaNotationType ()

public boolean isSignedNumber ()

public NumberFormatter.NumberBase rotateBase ()

public void setBase (NumberFormatter.NumberBase base)

public void setConstantsFormatterOverride (ConstantsFormatter cf)

public void setHexaNotationType (NumberFormatter.HexaNotationType hexaNotationType)

public void setSignedNumber (boolean signedNumber)