# Class: com.pnfsoftware.jeb.core.units.code.DecompilationContext

Decompilation context holding information about a decompilation and its results, as well as decompilation options. Immutable object, Thread\-safe.

## Constructor: DecompilationContext

Description: Construct a new context with no particular options \(defaults will be used\).

## Constructor: DecompilationContext
- parameter: `opt`, type: `com.pnfsoftware.jeb.core.units.code.DecompilationOptions`

Description: Construct a new context with the provided options.
parameter: opt: 

## Constructor: DecompilationContext
- parameter: `flags`, type: `int`
- parameter: `maxTimePerMethod`, type: `java.lang.Long`
- parameter: `maxTimeTotal`, type: `java.lang.Long`

Description: Convenience constructor.
parameter: flags: 
parameter: maxTimePerMethod: 
parameter: maxTimeTotal: 

## Constructor: DecompilationContext
- parameter: `flags`, type: `int`

Description: Convenience constructor.
parameter: flags: 

## Method: addFlags
- parameter: `flags`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.DecompilationOptions`

Description: Convenience method.
parameter: flags: option flags to be added
return: the previous options

## Method: fork
- return type: `com.pnfsoftware.jeb.core.units.code.DecompilationContext`

Description: Fork the context. The fork context reuses this context's objects. Forked contexts may be used hen performing concurrent decompilations.
return: a new context

## Method: getCallback
- return type: `com.pnfsoftware.jeb.util.base.IProgressCallback`


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

Description: Retrieve the value of custom counter 1. The counter is initialized with 0.
return: the counter value

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

Description: Retrieve the value of custom counter 2. The counter is initialized with 0.
return: the counter value

## Method: getData
- parameter: `key`, type: `java.lang.String`
- return type: `java.lang.Object`


## Method: getError
- parameter: `sig`, type: `java.lang.String`
- return type: `java.lang.String`


## Method: getErrorMap
- return type: `java.util.Map<java.lang.String,java.lang.String>`

Description: Convenience method. Map of key=object signature \(e.g., method jvm name\) to value= error string \(e.g., stacktrace\)
return: 

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

Description: Convenience method.
return: 

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

Description: Retrieve the custom map 1. A decompiler may use this concurrent map as they choose.
return: 

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

Description: Retrieve the custom map 2. A decompiler may use this concurrent map as they choose.
return: 

## Method: getMaxTimePerMethod
- return type: `java.lang.Long`

Description: Convenience method.
return: 

## Method: getMaxTimeTotal
- return type: `java.lang.Long`

Description: Convenience method.
return: 

## Method: getOptions
- return type: `com.pnfsoftware.jeb.core.units.code.DecompilationOptions`

Description: 
return: current options \(never null\)

## Method: getResultMap
- return type: `java.util.Map<java.lang.String,com.pnfsoftware.jeb.core.units.code.DecompilationResult>`


## Method: getResults
- parameter: `sig`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.DecompilationResult`


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


## Method: hasFlags
- parameter: `f`, type: `int`
- return type: `boolean`

Description: Convenience method.
parameter: f: 
return: 

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

Description: Increment the value of custom counter 1. A decompiler may use this counter as they choose.
return: the updated counter value

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

Description: Increment the value of custom counter 2. A decompiler may use this counter as they choose.
return: the updated counter value

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


## Method: putData
- parameter: `key`, type: `java.lang.String`
- parameter: `value`, type: `java.lang.Object`


## Method: recordAndCheckDeferredRequests
- parameter: `cnt`, type: `int`
- parameter: `cap`, type: `int`
- return type: `boolean`

Description: Record occurrences or future occurrences of deferred requests, and check them against a provided cap.
parameter: cnt: count of deferred requests to record
parameter: cap: current cap \(a negative number means no cap\)
return: true if the updated recorded count of deferred requests is within the cap; false if         it exceeds the cap

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

Description: Record the occurrence or future occurrence of a deferred request.
return: the updated recorded count of deferred requests

## Method: recordError
- parameter: `sig`, type: `java.lang.String`
- parameter: `error`, type: `java.lang.String`


## Method: recordResult
- parameter: `sig`, type: `java.lang.String`
- parameter: `r`, type: `com.pnfsoftware.jeb.core.units.code.DecompilationResult`


## Method: removeFlags
- parameter: `flags`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.DecompilationOptions`

Description: Convenience method.
parameter: flags: option flags to be removed
return: the previous options

## Method: requestInterruption


## Method: setCallback
- parameter: `callback`, type: `com.pnfsoftware.jeb.util.base.IProgressCallback`

Description: Set an optional callback object to receive progress information regarding a decompilation operation.
parameter: callback: 

## Method: setOptions
- parameter: `options`, type: `com.pnfsoftware.jeb.core.units.code.DecompilationOptions`
- return type: `com.pnfsoftware.jeb.core.units.code.DecompilationOptions`

Description: 
parameter: options: 
return: the previous options

## Static Method: safe
- parameter: `ctx`, type: `com.pnfsoftware.jeb.core.units.code.DecompilationContext`
- return type: `com.pnfsoftware.jeb.core.units.code.DecompilationContext`


