# Class: com.pnfsoftware.jeb.core.units.code.CodePointer

Standard implementation of a pointer to code.

## Constructor: CodePointer
- parameter: `address`, type: `long`
- parameter: `mode`, type: `int`

Description: Create an entry\-point address description.
parameter: address: address of the Entry point or \-1 for unknown address.
parameter: mode: optional processor mode, can be [IProcessor#MODE_DEFAULT](IProcessor#MODE_DEFAULT) \(0\) if            unknown/default

## Constructor: CodePointer
- parameter: `address`, type: `long`

Description: Create an entry\-point description using a default processor mode.
parameter: address: address of the entry point or \-1 for unknown address

## Constructor: CodePointer
- parameter: `src`, type: `com.pnfsoftware.jeb.core.units.code.ICodePointer`

Description: Create a code pointer from another pointer.
parameter: src: source pointer

## Method: almostEquals
- parameter: `obj`, type: `java.lang.Object`
- return type: `boolean`

Description: Equality that disregards the [processor mode](#getMode()).
parameter: obj: object to compare
return: true if the address and size match

## Method: equals
- parameter: `obj`, type: `java.lang.Object`
- return type: `boolean`


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

Description: Get the processor mode that should be used when parsing at the address.
return: processor mode

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


## Method: isUnknownAddress
- return type: `boolean`


## Method: setMode
- parameter: `mode`, type: `int`

Description: Set the processor mode.
parameter: mode: processor mode

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


## Static Method: createFrom
- parameter: `entryPointAsString`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.CodePointer`

Description: Create a code pointer from its string representation.
parameter: entryPointAsString: entry\-point string
return: code pointer

## Static Method: createFrom
- parameter: `internalAddress`, type: `long`
- parameter: `model`, type: `com.pnfsoftware.jeb.core.units.code.asm.analyzer.INativeCodeModel<?>`
- return type: `com.pnfsoftware.jeb.core.units.code.CodePointer`

Description: Create a code pointer from an internal address and native code model.
parameter: internalAddress: internal address
parameter: model: native code model
return: code pointer

## Static Method: createFrom
- parameter: `insn`, type: `com.pnfsoftware.jeb.core.units.code.ILocatedInstruction`
- return type: `com.pnfsoftware.jeb.core.units.code.CodePointer`

Description: Create a code pointer from a located instruction.
parameter: insn: located instruction
return: code pointer

## Static Method: createFrom
- parameter: `routineData`, type: `com.pnfsoftware.jeb.core.units.code.asm.items.INativeMethodDataItem`
- return type: `com.pnfsoftware.jeb.core.units.code.CodePointer`

Description: Create a code pointer from routine data.
parameter: routineData: routine data
return: code pointer

## Static Method: createFrom
- parameter: `routine`, type: `com.pnfsoftware.jeb.core.units.code.asm.items.INativeMethodItem`
- return type: `com.pnfsoftware.jeb.core.units.code.CodePointer`

Description: Create a code pointer from a routine item.
parameter: routine: routine item
return: code pointer

## Static Method: createUnknown
- return type: `com.pnfsoftware.jeb.core.units.code.CodePointer`

Description: Create an Entry Point Description pointing to an unknown address.
return: code pointer

## Static Method: createUnknown
- parameter: `mode`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.CodePointer`

Description: Create an Entry Point Description pointing to an unknown address.
parameter: mode: processor mode
return: code pointer

