# Interface: com.pnfsoftware.jeb.core.units.code.asm.INativeContext

Native code context. The context is a super\-interface of the [INativeCodeUnit](INativeCodeUnit) and allows the implementation of test disassemblers outside of the [unit](IUnit) management facility.

## Method: createMethodReference
- parameter: `name`, type: `java.lang.String`
- parameter: `prototype`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.IPrototypeItem`
- parameter: `methodData`, type: `com.pnfsoftware.jeb.core.units.code.asm.items.INativeMethodDataItem`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.items.INativeMethodItem`

Description: Create a method reference backed by native method data.
parameter: name: method name
parameter: prototype: method prototype
parameter: methodData: method data
return: method reference

## Method: getCodeContainerType
- return type: `int`

Description: Retrieve the code container type.
return: 0=unknown, 1=ELF, 2=PE

## Method: getDetectedCompiler
- return type: `com.pnfsoftware.jeb.core.units.code.asm.analyzer.ICompiler`

Description: Retrieve the compiler detected for this native unit.
return: detected compiler descriptor

## Method: getDynamicBranchResolution
- parameter: `address`, type: `long`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.analyzer.IBranchResolution`

Description: Retrieve the recorded dynamic branch resolution at an address.
parameter: address: branch instruction address
return: branch resolution, or null

## Method: getField
- parameter: `address`, type: `long`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.items.INativeFieldItem`

Description: Retrieve the field starting at an address.
parameter: address: field start address
return: field, or null

## Method: getFields
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.items.INativeFieldItem>`

Description: Retrieve all known fields.
return: field list

## Method: getImageSize
- return type: `long`

Description: Retrieve the size of the image
return: image size in bytes

## Method: getMemory
- return type: `com.pnfsoftware.jeb.core.units.code.asm.memory.IVirtualMemory`

Description: Retrieve the virtual memory model.
return: virtual memory model

## Method: getNativeItemAt
- parameter: `address`, type: `long`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.items.INativeContinuousItem`

Description: Retrieve the native continuous memory item \(a variable, an instruction\) starting at the provided address.
parameter: address: item start address
return: native item, or null

## Method: getNativeItemOver
- parameter: `address`, type: `long`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.items.INativeContinuousItem`

Description: Retrieve the native continuous memory item \(a variable, an instruction\) spanning over the provided address.
parameter: address: address to test
return: native item, or null

## Method: getProcessor
- return type: `com.pnfsoftware.jeb.core.units.code.asm.processor.IProcessor<?>`

Description: Retrieve the machine code parser \(pseudo\-processor\).
return: processor instance

## Method: getRoutine
- parameter: `address`, type: `long`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.items.INativeMethodItem`

Description: Retrieve the routine starting at an address.
parameter: address: routine start address
return: routine, or null

## Method: getRoutineByName
- parameter: `name`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.items.INativeMethodItem`

Description: Retrieve a routine by name.
parameter: name: routine name
return: matching routine, or null

## Method: getRoutineOver
- parameter: `address`, type: `long`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.items.INativeMethodItem`

Description: Retrieve the routine containing an address.
parameter: address: address to test
return: containing routine, or null

## Method: getRoutines
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.items.INativeMethodItem>`

Description: Retrieve all known routines.
return: routine list

## Method: getSubsystemType
- return type: `com.pnfsoftware.jeb.core.units.codeobject.SubsystemType`

Description: Retrieve the executable subsystem type.
return: subsystem type, or null if unknown

## Method: getTypeManager
- return type: `com.pnfsoftware.jeb.core.units.code.asm.type.ITypeManager`

Description: Retrieve the native type manager.
return: type manager

## Method: getVirtualImageBase
- return type: `long`

Description: Retrieve the virtual image base. This virtual address is the reference for every memory access.
return: the virtual image base

## Method: recordDynamicBranchTarget
- parameter: `instructionAddress`, type: `long`
- parameter: `resolved`, type: `boolean`
- parameter: `target`, type: `com.pnfsoftware.jeb.core.units.code.asm.analyzer.IBranchTarget`
- return type: `boolean`

Description: Record a dynamic branch target.
parameter: instructionAddress: branch instruction address
parameter: resolved: true if the target was resolved
parameter: target: resolved target, or null
return: true if the target was recorded

## Method: requestRoutineReanalysis
- parameter: `routine`, type: `com.pnfsoftware.jeb.core.units.code.asm.items.INativeMethodItem`

Description: Request reanalysis of a routine.
parameter: routine: routine to reanalyze

## Method: trackNativeItem
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.type.INativeType`
- parameter: `listener`, type: `com.pnfsoftware.jeb.util.events.IEventListener`

Description: Register a listener for updates to a native type or item.
parameter: type: native type to track
parameter: listener: event listener

