# Class: com.pnfsoftware.jeb.core.units.code.asm.analyzer.BinaryPatternVerifier

A collection of binary patterns and a verifier for them. Determine if any one of the pattern matches a provided bytes buffer.

## Constructor: BinaryPatternVerifier

Description: Create an empty binary pattern verifier.

## Method: addPattern
- parameter: `pattern`, type: `com.pnfsoftware.jeb.core.units.code.asm.analyzer.IBinaryPattern`

Description: Add a binary pattern to this verifier.
parameter: pattern: pattern to add

## Method: addPatterns
- parameter: `patterns`, type: `java.util.Collection<com.pnfsoftware.jeb.core.units.code.asm.analyzer.IBinaryPattern>`

Description: Add binary patterns to this verifier.
parameter: patterns: patterns to add

## Method: addPatterns
- parameter: `patterns`, type: `com.pnfsoftware.jeb.core.units.code.asm.analyzer.IBinaryPattern[]`

Description: Add binary patterns to this verifier.
parameter: patterns: patterns to add

## Method: clear

Description: Remove all registered patterns.

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

Description: Get the longest registered pattern size.
return: longest pattern size in bytes

## Method: getPatterns
- return type: `java.util.Collection<com.pnfsoftware.jeb.core.units.code.asm.analyzer.IBinaryPattern>`

Description: Get the registered patterns.
return: unmodifiable pattern collection

## Method: verify
- parameter: `gca`, type: `com.pnfsoftware.jeb.core.units.code.asm.analyzer.INativeCodeAnalyzer<?>`
- parameter: `address`, type: `long`
- parameter: `buffer`, type: `byte[]`
- parameter: `offset`, type: `int`
- parameter: `offsetEnd`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.analyzer.IBinaryPattern`

Description: Verify a buffer against registered patterns.
parameter: gca: native code analyzer
parameter: address: address associated with the start of the buffer
parameter: buffer: bytes to verify
parameter: offset: start offset in the buffer
parameter: offsetEnd: end offset in the buffer
return: matching pattern, or null if none matched

## Method: verify
- parameter: `gca`, type: `com.pnfsoftware.jeb.core.units.code.asm.analyzer.INativeCodeAnalyzer<?>`
- parameter: `address`, type: `long`
- parameter: `buffer`, type: `byte[]`
- parameter: `offset`, type: `int`
- parameter: `offsetEnd`, type: `int`
- parameter: `patternSize`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.analyzer.IBinaryPattern`

Description: Verify a buffer against registered patterns of a given size.
parameter: gca: native code analyzer
parameter: address: address associated with the start of the buffer
parameter: buffer: bytes to verify
parameter: offset: start offset in the buffer
parameter: offsetEnd: end offset in the buffer
parameter: patternSize: if different from zero, only patterns of this byte size are tested
return: matching pattern, or null if none matched

## Method: verify
- parameter: `gca`, type: `com.pnfsoftware.jeb.core.units.code.asm.analyzer.INativeCodeAnalyzer<?>`
- parameter: `address`, type: `long`
- parameter: `buffer`, type: `byte[]`
- parameter: `offset`, type: `int`
- parameter: `offsetEnd`, type: `int`
- parameter: `patternSize`, type: `int`
- parameter: `processorMode`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.analyzer.IBinaryPattern`

Description: Verify a buffer against registered patterns.
parameter: gca: native code analyzer
parameter: address: address associated with the start of the buffer
parameter: buffer: bytes to verify
parameter: offset: start offset in the buffer
parameter: offsetEnd: end offset in the buffer
parameter: patternSize: if different from zero, the verification is only done with the patterns of            the given size in bytes
parameter: processorMode: restricted processor mode, matching            [IBinaryPattern#getProcessorMode()](IBinaryPattern#getProcessorMode()). Use [IProcessor#MODE_DEFAULT](IProcessor#MODE_DEFAULT) to            test all modes or pick one to restrict verification.
return: matching pattern, or null if none matched

