# Class: com.pnfsoftware.jeb.core.units.code.asm.sig.codeless.CodelessSignatureManager

Manage a set of codeless signature models, such that an unknown binary can be matched against these models \(see [#match(INativeCodeUnit, CodelessSignaturePackageEntry)](#match(INativeCodeUnit, CodelessSignaturePackageEntry))\), or identified as containing code from the models \(see [#identifyLibraries(INativeCodeUnit)](#identifyLibraries(INativeCodeUnit))\). 

 This manager is intended to be used in post analysis 'one shot' style; in particular it does not keep any storage of already loaded/matched signatures.

## Static Field: CODELESS_FOLDER_DEFAULT_NAME
Type: `java.lang.String`

Constant value: `codeless`
Description: Default folder name for codeless signature packages.

## Static Field: CODELESS_SIGS_EXTENSION
Type: `java.lang.String`

Constant value: `.codeless-siglib`
Description: Extension of codeless signature package files.

## Method: addFolder
- parameter: `folder`, type: `java.io.File`
- parameter: `doRescan`, type: `boolean`

Description: Add a folder to scan for codeless signature packages.
parameter: folder: folder to add
parameter: doRescan: if true, scan folders immediately after adding the folder

## Method: getAvailablePackages
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.sig.codeless.CodelessSignaturePackageEntry>`

Description: Provides the list of available signature packages entries \(never null\). The corresponding packages are not necessarily loaded.
return: available package entries

## Method: getMatchableUnit
- return type: `com.pnfsoftware.jeb.core.units.INativeCodeUnit<com.pnfsoftware.jeb.core.units.code.IInstruction>`

Description: Search first suitable code unit that can be matched, in current project. 

 FIXME: replace by a proper search for all compatible units, and let client decides which ones should be matched.
return: first matchable code unit, or null

## Method: identifyLibraries
- parameter: `codeUnit`, type: `com.pnfsoftware.jeb.core.units.INativeCodeUnit<com.pnfsoftware.jeb.core.units.code.IInstruction>`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.sig.codeless.LibraryIdentificationResults`

Description: Identify libraries present in a code unit.
parameter: codeUnit: code unit to inspect
return: library identification results

## Method: importState
- parameter: `codeUnit`, type: `com.pnfsoftware.jeb.core.units.INativeCodeUnit<com.pnfsoftware.jeb.core.units.code.IInstruction>`
- parameter: `state`, type: `com.pnfsoftware.jeb.core.units.code.asm.sig.codeless.MatchingState`
- return type: `boolean`

Description: Import a matching state into a code unit.
parameter: codeUnit: target code unit
parameter: state: matching state to import
return: true if the state was imported

## Method: isMatched
- parameter: `codeUnit`, type: `com.pnfsoftware.jeb.core.units.INativeCodeUnit<com.pnfsoftware.jeb.core.units.code.IInstruction>`
- parameter: `entry`, type: `com.pnfsoftware.jeb.core.units.code.asm.sig.codeless.CodelessSignaturePackageEntry`
- return type: `boolean`

Description: Check if a signature package has been matched against given code unit.
parameter: codeUnit: code unit to query
parameter: entry: package entry to query
return: true if the package has been matched against the code unit

## Method: match
- parameter: `codeUnit`, type: `com.pnfsoftware.jeb.core.units.INativeCodeUnit<com.pnfsoftware.jeb.core.units.code.IInstruction>`
- parameter: `entry`, type: `com.pnfsoftware.jeb.core.units.code.asm.sig.codeless.CodelessSignaturePackageEntry`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.sig.codeless.MatchingState`

Description: Match given unit against given reference model. 

 Note that a new Matcher is instantiated each time.
parameter: codeUnit: code unit to match
parameter: entry: codeless signature package entry to match against
return: final matching state, null if matching failed

## Method: onEvent
- parameter: `event`, type: `com.pnfsoftware.jeb.util.events.IEvent`


## Method: rescan

Description: Rescan registered folders.

## Method: scan
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.sig.codeless.CodelessSignaturePackageEntry>`

Description: Scan default folder to provide list of available packages. 

 This method should be executed once at startup.
return: available package entries

## Static Method: getInstance
- parameter: `enginesContext`, type: `com.pnfsoftware.jeb.core.IEnginesContext`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.sig.codeless.CodelessSignatureManager`

Description: Get the singleton codeless signature manager.
parameter: enginesContext: engines context used by the manager
return: singleton manager

