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

Utility routines for code units.

## Constructor: CodeUtil


## Static Method: collectClasses
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.code.ICodeUnit`
- parameter: `internal`, type: `boolean`
- parameter: `topLevel`, type: `boolean`
- parameter: `addressFilter`, type: `java.util.regex.Pattern`
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.ICodeClass>`

Description: 
deprecated: Kept for legacy

## Static Method: collectClasses
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.code.ICodeUnit`
- parameter: `internal`, type: `boolean`
- parameter: `topLevel`, type: `boolean`
- parameter: `addressFilter`, type: `java.util.regex.Pattern`
- parameter: `fullMatch`, type: `boolean`
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.ICodeClass>`

Description: Collect classes.
parameter: unit: [ICodeUnit](ICodeUnit) containing classes \(see [ICodeUnit#getClasses()](ICodeUnit#getClasses())
parameter: internal: true to collect internal classes only
parameter: topLevel: true to collect non\-inner classes only
parameter: addressFilter: optional filter on [ICodeClass#getAddress()](ICodeClass#getAddress())
parameter: fullMatch: true if pattern must match the entire addresses. false if we only intend a            search into the address.
return: 

## Static Method: collectMethods
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.code.ICodeUnit`
- parameter: `internal`, type: `boolean`
- parameter: `topLevel`, type: `boolean`
- parameter: `addressFilter`, type: `java.util.regex.Pattern`
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.ICodeMethod>`

Description: 
deprecated: Kept for legacy

## Static Method: collectMethods
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.code.ICodeUnit`
- parameter: `internal`, type: `boolean`
- parameter: `topLevel`, type: `boolean`
- parameter: `addressFilter`, type: `java.util.regex.Pattern`
- parameter: `fullMatch`, type: `boolean`
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.ICodeMethod>`

Description: Collect methods.
parameter: unit: [ICodeUnit](ICodeUnit) containing methods \(see [ICodeUnit#getMethods()](ICodeUnit#getMethods())
parameter: internal: true to collect internal methods only
parameter: topLevel: true to collect orphaned methods only \(not belonging to any class\)
parameter: addressFilter: optional filter on [ICodeMethod#getAddress()](ICodeMethod#getAddress())
parameter: fullMatch: true if pattern must match the entire addresses. false if we only intend a            search into the address.
return: 

## Static Method: createCallgraphBuilder
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.code.ICodeUnit`
- return type: `com.pnfsoftware.jeb.util.graph.IAddressableDigraphBuilder`

Description: 
parameter: unit: 
return: 

## Static Method: findCodeItemReference
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.code.ICodeUnit`
- parameter: `item`, type: `com.pnfsoftware.jeb.core.units.code.ICodeItem`
- parameter: `pos`, type: `int`
- return type: `java.lang.String`

Description: 
parameter: unit: 
parameter: item: 
parameter: pos: 
return: 

## Static Method: getFieldByName
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.code.ICodeUnit`
- parameter: `partialName`, type: `java.lang.String`
- parameter: `failIfAmbiguous`, type: `boolean`
- return type: `com.pnfsoftware.jeb.core.units.code.ICodeField`

Description: Get a field by name.
parameter: unit: 
parameter: partialName: 
parameter: failIfAmbiguous: 
return: 

## Static Method: getMethodByName
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.code.ICodeUnit`
- parameter: `partialName`, type: `java.lang.String`
- parameter: `failIfAmbiguous`, type: `boolean`
- return type: `com.pnfsoftware.jeb.core.units.code.ICodeMethod`

Description: Get a method/routine by name.
parameter: unit: 
parameter: partialName: 
parameter: failIfAmbiguous: 
return: 

