# Class: com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.Leaf

IR template element. 

 A leaf node is never null. Examples: an immediate or variable \(atomic leaf, aka 'Terminal leaf'\) or memory access \(composed leaf, aka 'Non\-terminal leaf'\).

## Constructor: Leaf
- parameter: `id`, type: `int`
- parameter: `bitsize`, type: `int`
- parameter: `flags`, type: `int`
- parameter: `handler`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.INodeHandler`

Description: Create a wildcard leaf. Can be a terminal \(eg, EVar, EImm\) or non\-terminal \(eg, complex expression\). 

 Gotcha: When using `FLAG_LASTBIT_IMM`, the `id` refers to the target expression to be examined.
parameter: id: a value in \[0,1000\[
parameter: bitsize: 
parameter: flags: 
parameter: handler: custom optional handler to do custom processing \(custom checks\) on a matched            node

## Constructor: Leaf
- parameter: `id`, type: `int`
- parameter: `bitsize`, type: `int`
- parameter: `flags`, type: `int`

Description: Create a wildcard leaf. Can be a terminal \(eg, EVar, EImm\) or non\-terminal \(eg, complex expression\).
parameter: id: a value in \[0,1000\[
parameter: bitsize: 
parameter: flags: 

## Constructor: Leaf
- parameter: `value`, type: `long`
- parameter: `bitsize`, type: `int`
- parameter: `id`, type: `int`

Description: Create a fixed, pre\-determined immediate constant leaf.
parameter: value: mandatory immediate value
parameter: bitsize: optional, use 0 if unknown
parameter: id: optional, use \-1 if not needed, else an id in the \[0,1000\[ range; use if the leaf            needs to be used in a subsequent substitution step

## Field: flags
Type: `int`
Description: type of allowed leaf; must be set, because the default value \(0\) means none

## Field: handler
Type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.INodeHandler`

## Field: id
Type: `int`
Description: internal id assigned to this leaf; must be \>= 0

## Field: optionalBitsize
Type: `int`
Description: optional requested size of the leaf; leave to 0 for any size.

## Field: value
Type: `java.math.BigInteger`
Description: for Leaf representing [IEImm](IEImm).

## Static Field: FLAG_POSSIBLE_ALL
Type: `int`

Constant value: `15`

## Static Field: FLAG_POSSIBLE_IMM
Type: `int`

Constant value: `1`

## Static Field: FLAG_POSSIBLE_NON_TERMINAL
Type: `int`

Constant value: `8`

## Static Field: FLAG_POSSIBLE_RANGE
Type: `int`

Constant value: `4`

## Static Field: FLAG_POSSIBLE_TERMINAL
Type: `int`

Constant value: `7`

## Static Field: FLAG_POSSIBLE_VAR
Type: `int`

Constant value: `2`

## Method: setHandler
- parameter: `h`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.INodeHandler`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.Leaf`


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


