# Class: com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock

This class represents a basic block of generic instructions.

## Constructor: BasicBlock

Description: Create a new empty basic block.

## Constructor: BasicBlock
- parameter: `insnlist`, type: `java.util.Collection<InsnType>`

Description: Create a new basic block with the provided instructions.

## Method: add
- parameter: `insn`, type: `InsnType`

Description: **DANGEROUS\!** Append an instruction to the block. 

 The instruction is appended to the block. The edges are not updated.
 The caller is responsible for maintaining the consistency of the block and of the CFG.
parameter: insn: the instruction to be appended

## Method: add
- parameter: `index`, type: `int`
- parameter: `insn`, type: `InsnType`

Description: **DANGEROUS\!** Add an instruction to the block. 

 The instruction is inserted in the block. The edges are not updated.
 The caller is responsible for maintaining the consistency of the block and of the CFG.
parameter: index: insertion index
parameter: insn: the instruction to be inserted

## Method: addAll
- parameter: `insnlist`, type: `java.util.Collection<InsnType>`

Description: **DANGEROUS\!** Append instructions to the block. 

 The instructions are appended to the block. The edges are not updated.
 The caller is responsible for maintaining the consistency of the block and of the CFG.
parameter: insnlist: the collection of instructions to be appended

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


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


## Method: canThrow
- return type: `boolean`


## Method: get
- parameter: `index`, type: `int`
- return type: `InsnType`


## Method: getAddress
- return type: `long`


## Method: getAddressOfInstruction
- parameter: `index`, type: `int`
- return type: `long`


## Method: getAllInputBlocks
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>>`


## Method: getAllInputs
- return type: `java.lang.Iterable<com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>>`


## Method: getAllOutputBlocks
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>>`


## Method: getAllOutputs
- return type: `java.lang.Iterable<com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>>`


## Method: getBase
- return type: `long`


## Method: getEndAddress
- return type: `long`


## Method: getFirstAddress
- return type: `long`


## Method: getIndexOfInstruction
- parameter: `address`, type: `long`
- return type: `int`


## Method: getIndexOfInstruction
- parameter: `address`, type: `long`
- parameter: `precise`, type: `boolean`
- return type: `int`


## Method: getInputBlock
- parameter: `index`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>`


## Method: getInputBlocks
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>>`


## Method: getInputOffsets
- return type: `java.util.List<java.lang.Long>`


## Method: getInputs
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>>`

Description: Retrieve a read\-only list of input blocks \(regular\). 

 NOTE: This method is faster than [#getInputBlocks()](#getInputBlocks()) since it does not provide a copy of the list.
return: 

## Method: getInstruction
- parameter: `address`, type: `long`
- return type: `InsnType`


## Method: getInstructions
- return type: `java.util.List<InsnType>`


## Method: getIrregularInputBlock
- parameter: `index`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>`


## Method: getIrregularInputBlocks
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>>`


## Method: getIrregularInputOffsets
- return type: `java.util.List<java.lang.Long>`


## Method: getIrregularInputs
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>>`

Description: Retrieve a read\-only list of irregular input blocks. 

 NOTE: This method is faster than [#getIrregularInputBlocks()](#getIrregularInputBlocks()) since it does not provide a copy of the list.
return: 

## Method: getIrregularOutputBlock
- parameter: `index`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>`


## Method: getIrregularOutputBlocks
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>>`


## Method: getIrregularOutputOffsets
- return type: `java.util.List<java.lang.Long>`


## Method: getIrregularOutputs
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>>`

Description: Retrieve a read\-only list of irregular output blocks. 

 NOTE: This method is faster than [#getIrregularOutputBlocks()](#getIrregularOutputBlocks()) since it does not provide a copy of the list.
return: 

## Method: getLast
- return type: `InsnType`


## Method: getLastAddress
- return type: `long`


## Method: getOutputBlock
- parameter: `index`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>`


## Method: getOutputBlocks
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>>`


## Method: getOutputOffsets
- return type: `java.util.List<java.lang.Long>`


## Method: getOutputs
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType>>`

Description: Retrieve a read\-only list of output blocks \(regular\). 

 NOTE: This method is faster than [#getOutputBlocks()](#getOutputBlocks()) since it does not provide a copy of the list.
return: 

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


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


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


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


## Method: isEmpty
- return type: `boolean`


## Method: iterator
- return type: `java.util.Iterator<InsnType>`


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


## Method: remove
- parameter: `index`, type: `int`
- return type: `InsnType`

Description: **DANGEROUS\!** Remove an instruction from the block. 

 The instruction is removed from the block. The edges are not updated. The block may end up empty.
parameter: index: 
return: true if the CFG need refreshing

## Method: removeAll

Description: **DANGEROUS\!** Remove all instructions from the block. 

 The edges are not updated. The block may end up empty.

## Method: set
- parameter: `index`, type: `int`
- parameter: `insn`, type: `InsnType`
- return type: `InsnType`

Description: Replace an instruction. The size is validated, the offset is not validated.
parameter: index: index in the block
parameter: insn: instruction to set at index
return: the instruction that was replaced

## Method: set
- parameter: `index`, type: `int`
- parameter: `insn`, type: `InsnType`
- parameter: `verifySize`, type: `boolean`
- parameter: `verifyOffset`, type: `boolean`
- return type: `InsnType`

Description: Replace an instruction. The size and offset may be validated.
parameter: index: index in the block
parameter: insn: instruction to set at index
parameter: verifySize: if false, validating and updating the instruction size is the            responsibility of the caller; else, the size is validated and must match the            replaced instruction's
parameter: verifyOffset: if false, validating and updating the instruction offset is the            responsibility of the caller; else, the offset is validated and must match the            replaced instruction's
return: the instruction that was replaced

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


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


