# Interface: com.pnfsoftware.jeb.core.units.code.ICodeUnit

Base interface for units representing disassembled binary code, such as bytecode, opcodes, object files, executable files, and so on. 

 Code units are interactive, in order to provide facility for code refactoring, modification, etc. 

 Code units generate [CodeDocument](CodeDocument), and as such, generate [AssemblyItem](AssemblyItem) objects. Implementors must implement [#getItemObject(long)](#getItemObject(long)) properly.

## Method: getAddressFromCodeCoordinates
- parameter: `coords`, type: `com.pnfsoftware.jeb.core.output.code.coordinates.ICodeCoordinates`
- return type: `java.lang.String`

Description: Convert code coordinates to a unit address.
parameter: coords: code coordinates
return: unit address, or null

## Method: getClass
- parameter: `fqname`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.ICodeClass`

Description: Convenience method used to retrieve a class by name.
parameter: fqname: fully\-qualified class name
return: matching class, or null

## Method: getClasses
- return type: `java.util.List<? extends com.pnfsoftware.jeb.core.units.code.ICodeClass>`

Description: Get the list of classes.
return: code classes

## Method: getCodeCoordinatesFromAddress
- parameter: `address`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.output.code.coordinates.ICodeCoordinates`

Description: Convert a unit address to code coordinates.
parameter: address: unit address
return: code coordinates, or null

## Method: getCodeItemByAddress
- parameter: `fqname`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.ICodeItem`

Description: Convenience method used to retrieve a code item by name.
parameter: fqname: fully\-qualified item name
return: a class, method field or other item

## Method: getCommentManager
- return type: `com.pnfsoftware.jeb.core.units.code.CodeCommentManager<?>`


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

Description: Convenience method used to generate the disassembly of this code unit using standard settings.
return: disassembly text

## Method: getDisassemblyDocument
- return type: `com.pnfsoftware.jeb.core.output.text.ITextDocument`

Description: Convenience method to retrieve the text document representing the disassembly of this code unit. 

 The caller is responsible for disposing the returned document after usage.
return: disassembly document

## Method: getField
- parameter: `fqname`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.ICodeField`

Description: Convenience method used to retrieve a field by name.
parameter: fqname: fully\-qualified field name
return: matching field, or null

## Method: getFields
- return type: `java.util.List<? extends com.pnfsoftware.jeb.core.units.code.ICodeField>`

Description: Get the list of fields.
return: code fields

## Method: getHierarchy
- return type: `com.pnfsoftware.jeb.core.units.code.ICodeHierarchy`

Description: Get the code hierarchy.
return: code hierarchy

## Method: getMethod
- parameter: `fqname`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.ICodeMethod`

Description: Convenience method used to retrieve a method by name.
parameter: fqname: fully\-qualified method name
return: matching method, or null

## Method: getMethods
- return type: `java.util.List<? extends com.pnfsoftware.jeb.core.units.code.ICodeMethod>`

Description: Get the list of methods.
return: code methods

## Method: getPackage
- parameter: `fqname`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.ICodePackage`

Description: Convenience method used to retrieve a package by name.
parameter: fqname: fully\-qualified package name
return: matching package, or null

## Method: getPackages
- return type: `java.util.List<? extends com.pnfsoftware.jeb.core.units.code.ICodePackage>`

Description: Get the list of code packages.
return: code packages

## Method: getStrings
- return type: `java.util.List<? extends com.pnfsoftware.jeb.core.units.code.ICodeString>`

Description: Get the list of code strings.
return: code strings

## Method: getTypes
- return type: `java.util.List<? extends com.pnfsoftware.jeb.core.units.code.ICodeType>`

Description: Get the list of types.
return: code types

