# Class: com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.emulator.LoopDetector

Detect loops during an emulation.

## Constructor: LoopDetector

Description: default settings: safely detect loops of up to 100 instructions

## Constructor: LoopDetector
- parameter: `collsize`, type: `int`
- parameter: `rndcnt`, type: `int`
- parameter: `detcnt`, type: `int`

Description: 
parameter: collsize: number of instructions to be collected in a run before checking for a loop
parameter: rndcnt: minimum number of loop iterations required; essentially, you will be able to            detect loops having collsize/rndcnt instructions; to minimize FPs, rndcnt needs to            be high, probably above 10
parameter: detcnt: 

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


## Method: getHitMap
- return type: `java.util.Map<java.lang.Long,java.lang.Integer>`


## Method: getLastLoopDetected
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.emulator.LoopDetector.Loop`


## Method: record
- parameter: `itercnt`, type: `long`
- parameter: `addr`, type: `long`
- return type: `int`

Description: 
parameter: itercnt: 
parameter: addr: 
return: 0: the instruction was recorded; 1: a loop may have been detected \(the next call to         [#record(int, long)](#record(int, long)) will clear the hitmap, so it must be examined by the         client first\); 2: an exact same loop was detected \`detcnt\` times

## Method: reset


