# Class: com.pnfsoftware.jeb.core.units.code.asm.render.AddressFormatter

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](INativeCodeUnit)\) 
- As a relative address in hexadecimal/decimal 

 

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

## Constructor: AddressFormatter


## Constructor: AddressFormatter
- parameter: `base`, type: `com.pnfsoftware.jeb.core.units.code.asm.render.AddressFormatter.AddressBase`
- parameter: `pcName`, type: `java.lang.String`
- parameter: `hexNotation`, type: `com.pnfsoftware.jeb.core.units.code.asm.render.NumberFormatter.HexaNotationType`


## Method: format
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.INativeCodeUnit<?>`
- parameter: `bitsize`, type: `int`
- parameter: `address`, type: `long`
- parameter: `opnd`, type: `com.pnfsoftware.jeb.core.units.code.asm.processor.IInstructionOperandGeneric`
- return type: `java.lang.String`

Description: Format a number using the formatter's current settings.

## Method: format
- parameter: `bitsize`, type: `int`
- parameter: `address`, type: `long`
- parameter: `opnd`, type: `com.pnfsoftware.jeb.core.units.code.asm.processor.IInstructionOperandGeneric`
- return type: `java.lang.String`


## Method: format
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.INativeCodeUnit<?>`
- parameter: `bitsize`, type: `int`
- parameter: `address`, type: `long`
- parameter: `opnd`, type: `com.pnfsoftware.jeb.core.units.code.asm.processor.IInstructionOperandGeneric`
- parameter: `base`, type: `com.pnfsoftware.jeb.core.units.code.asm.render.AddressFormatter.AddressBase`
- return type: `java.lang.String`


## Method: getBase
- return type: `com.pnfsoftware.jeb.core.units.code.asm.render.AddressFormatter.AddressBase`


## Method: getHexaNotationType
- return type: `com.pnfsoftware.jeb.core.units.code.asm.render.NumberFormatter.HexaNotationType`


## Method: getRelativePrefix
- return type: `java.lang.String`


## Method: setBase
- parameter: `base`, type: `com.pnfsoftware.jeb.core.units.code.asm.render.AddressFormatter.AddressBase`


## Method: setHexaNotationType
- parameter: `hexaNotationType`, type: `com.pnfsoftware.jeb.core.units.code.asm.render.NumberFormatter.HexaNotationType`


## Method: setRelativePrefix
- parameter: `relativePrefix`, type: `java.lang.String`


