# Class: com.pnfsoftware.jeb.core.units.code.android.ir.compiler.Util

Utility routines to build IR templates.

## Static Method: L
- parameter: `id`, type: `int`
- parameter: `bitsize`, type: `int`
- parameter: `flags`, type: `int`
- parameter: `customHandler`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.INodeHandler`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.Leaf`

Description: Create a leaf node.
parameter: id: leaf id
parameter: bitsize: required bitsize, or 0 for any
parameter: flags: leaf matching flags
parameter: customHandler: optional custom matching handler
return: the created leaf

## Static Method: L
- parameter: `id`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.Leaf`

Description: Create a leaf node matching everything \(terminals and non\-terminals alike, of any bitsize\).
parameter: id: leaf id
return: the created leaf

## Static Method: L
- parameter: `id`, type: `int`
- parameter: `bitsize`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.Leaf`

Description: Create a leaf node matching terminals and non\-terminals of the provided bitsize.
parameter: id: leaf id
parameter: bitsize: required bitsize
return: the created leaf

## Static Method: LC
- parameter: `value`, type: `long`
- parameter: `bitsize`, type: `int`
- parameter: `id`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.Leaf`

Description: Create a leaf node matching a given immediate with an explicit bitsize.
parameter: value: immediate value
parameter: bitsize: required bitsize
parameter: id: leaf id
return: the created leaf

## Static Method: LC
- parameter: `value`, type: `long`
- parameter: `bitsize`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.Leaf`

Description: Create a leaf node matching a given immediate with an explicit bitsize.
parameter: value: immediate value
parameter: bitsize: required bitsize
return: the created leaf

## Static Method: LC
- parameter: `value`, type: `long`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.Leaf`

Description: Create a leaf node matching a given immediate, regardless of its bitsize.
parameter: value: immediate value
return: the created leaf

## Static Method: LI
- parameter: `id`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.Leaf`

Description: Create a leaf node matching immediates only.
parameter: id: leaf id
return: the created leaf

## Static Method: LIV
- parameter: `id`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.Leaf`

Description: Create a leaf node matching immediates and variables only.
parameter: id: leaf id
return: the created leaf

## Static Method: LT
- parameter: `id`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.Leaf`

Description: Create a leaf node matching all terminals, but terminals only.
parameter: id: leaf id
return: the created leaf

## Static Method: LV
- parameter: `id`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.Leaf`

Description: Create a leaf node matching variables only.
parameter: id: leaf id
return: the created leaf

## Static Method: N
- parameter: `operator`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.O`
- parameter: `operands`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.INode[]`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.Node`

Description: Create an operator node.
parameter: operator: operator to match
parameter: operands: child template nodes
return: the created node

## Static Method: N
- parameter: `opgrp`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.OGroup`
- parameter: `operands`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.INode[]`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.Node`

Description: Create an operator\-group node.
parameter: opgrp: operator group to match
parameter: operands: child template nodes
return: the created node

## Static Method: SD
- parameter: `pattern`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.INode`
- parameter: `replacement`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.INode`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.SubstitutionDefinition`

Description: Create a substitution definition.
parameter: pattern: source pattern
parameter: replacement: replacement pattern
return: the substitution definition

## Static Method: calculateProperties
- parameter: `root`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.INode`

Description: Calculate and cache derived properties for a template tree.
parameter: root: root node

