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

Result object provided by a [DPatternMatcher](DPatternMatcher).

## Method: getCfg
- return type: `com.pnfsoftware.jeb.core.units.code.android.controlflow.CFG<com.pnfsoftware.jeb.core.units.code.android.ir.IDInstruction>`

Description: Retrieve the input control\-flow graph.
return: the input CFG, or null for expression\-only matching

## Method: getContext
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDMethodContext`

Description: Retrieve the method context used for matching.
return: the method context

## Method: getInputExpression
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDExpression`

Description: Retrieve the input expression.
return: the input expression, or null for CFG matching

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

Description: Retrieve the matched input pattern index.
return: the input pattern index

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

Description: Retrieve the address of the match.
return: the match address, or 0 for expression\-only matching

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

Description: Retrieve the leaf match map.
return: the match map keyed by pattern leaf id

## Method: getMatchedExpression
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDExpression`

Description: Retrieve the matched expression.
return: the matched expression, or null if the match was statement\-only

## Method: getMatchedLeaf
- parameter: `index`, type: `int`
- parameter: `clazz`, type: `java.lang.Class<T>`
- return type: `T`

Description: Retrieve a matched leaf and cast it to the requested type.
parameter: T: expected leaf type
parameter: index: leaf id
parameter: clazz: expected leaf class
return: the matched leaf

## Method: getMatchedLeaf
- parameter: `index`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDExpression`

Description: Retrieve a matched expression leaf.
parameter: index: leaf id
return: the matched expression

## Method: getMatchedParent
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDExpression`

Description: Retrieve the parent of the matched expression.
return: the matched expression parent, or null if the matched expression was the root

## Method: getOptimizedExpression
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDExpression`

Description: Retrieve the optimized expression produced by a replacement.
return: the optimized expression, or null if none was produced

## Method: getPattern
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.compiler.DPatternCompiler.DPattern`

Description: Retrieve the pattern used for matching.
return: the pattern

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

Description: Determine whether this match was replaced.
return: true if replacement succeeded

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


