# Interface: com.pnfsoftware.jeb.core.units.code.android.IDexDecompilerUnit

Specialized interface representing Dex \(Dalvik\) decompiler Units.

## Static Field: propnameEmulatorConfigPath
Type: `java.lang.String`

Constant value: `EmulatorConfigPath`

## Method: addSpecialComment
- parameter: `address`, type: `java.lang.String`
- parameter: `value`, type: `java.lang.String`


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

Description: Apply the currently un\-applied code matches. When applying matches, matched methods may be renamed, classes may be renamed and/or moved to existing or newly\-created packages. Related types may be renamed as well. 

 Note: if the `.CodeMatchSetting` unit property is set to 2 or above, this method is automatically called after [#decompileToUnit](#decompileToUnit).
return: a number indicating the number of modifications performed \(e.g. renames, moves, etc.\)

## Method: clearCachedIRs

Description: Forcefully clear the cache of IRs for decompiled methods.

## Method: clearCodeMatches

Description: Clear the map of currently un\-applied code matches.

## Method: clearSpecialComments
- parameter: `address`, type: `java.lang.String`


## Method: createEmulatedAndroid
- return type: `com.pnfsoftware.jeb.core.units.code.android.IEmulatedAndroid`

Description: Create a limited environment to emulate dex code and native code. Currently, the emulated environment is a simple Arm 64\-bit \(aarch64\) Android 13 system \(API level 33\). This dex decompiler must be the descendant of an APK unit.
return: an emulated Android environment

## Method: createGenericUnpacker
- return type: `com.pnfsoftware.jeb.core.units.code.android.IGenericUnpacker`

Description: Create a generic unpacker, backed by an [emulated\-android](IEmulatedAndroid) object, that can be used to attempt to retrieve resources unpacked at runtime. This dex decompiler must be the descendant of an APK unit.
return: an emulated Android environment

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

Description: Generate a user\-friendly text buffer of the decompilations currently being performed by this unit.
return: 

## Method: getClass
- parameter: `csig`, type: `java.lang.String`
- parameter: `createIfNotExist`, type: `boolean`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaClass`

Description: Retrieve a previously decompiled AST class object or create an empty AST class element.
parameter: csig: 
parameter: createIfNotExist: 
return: 

## Method: getCodeMatchingOverride
- return type: `java.lang.Boolean`

Description: Retrieve the code matching behavior override. Refer to [#setCodeMatchingOverride(Boolean)](#setCodeMatchingOverride(Boolean)) for details.
return: null if there is no override; else, a boolean value

## Method: getCodeUnit
- return type: `com.pnfsoftware.jeb.core.units.code.android.IDexUnit`


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

Description: Retrieve the number of cached IRs for decompiled methods.
return: 

## Method: getDynamicContentManager
- return type: `com.pnfsoftware.jeb.core.units.code.java.IDynamicContentManager`

Description: Retrieve a DCR used during AST generation.
return: 

## Method: getField
- parameter: `fsig`, type: `java.lang.String`
- parameter: `createIfNotExist`, type: `boolean`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaField`

Description: Retrieve a previously decompiled AST field object or create an empty AST field element.
parameter: fsig: 
parameter: createIfNotExist: 
return: 

## Method: getGlobalDecompilationEvents
- return type: `java.util.Collection<com.pnfsoftware.jeb.core.units.code.android.DexDecompilerEvent<?>>`

Description: Retrieve the list decompilation events, without duplicates. Note that this queue is managed separately than [user\-controlled event queues](#registerEventQueue(DexDecompilerEventQueue)).
return: 

## Method: getGlobalDecompilationEvents
- parameter: `keepDuplicates`, type: `boolean`
- return type: `java.util.Collection<com.pnfsoftware.jeb.core.units.code.android.DexDecompilerEvent<?>>`

Description: Retrieve a copy of the decompilation events. Note that this queue is managed separately than [user\-controlled event queues](#registerEventQueue(DexDecompilerEventQueue)).
parameter: keepDuplicates: if true, duplicate events will be present in the returned collection
return: 

## Method: getHighLevelContext
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaGlobalContext`

Description: Retrieve the global AST context.
return: 

## Method: getIdentifierName
- parameter: `ident`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaIdentifier`
- return type: `java.lang.String`

Description: Retrieve the effective \(renamed\) name of an identifier in this method's AST.
parameter: ident: 
return: 

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

Description: Retrieve the global IR context.
return: 

## Method: getMethod
- parameter: `msig`, type: `java.lang.String`
- parameter: `createIfNotExist`, type: `boolean`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaMethod`

Description: Retrieve a previously decompiled AST method object or create an empty AST method element.
parameter: msig: 
parameter: createIfNotExist: 
return: 

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

Description: Retrieve the currently un\-applied code matches.
return: a map of original internal method signature to its current best code match

## Method: recordDecompilationEvent
- parameter: `event`, type: `com.pnfsoftware.jeb.core.units.code.android.DexDecompilerEvent<?>`


## Method: registerEventQueue
- parameter: `queue`, type: `com.pnfsoftware.jeb.core.units.code.android.DexDecompilerEventQueue`

Description: Register a user\-controlled event queue that will receive decompilation events.
parameter: queue: 

## Method: resetClassElement
- parameter: `c`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaClass`
- return type: `boolean`

Description: Remove an AST class object.
parameter: c: 
return: 

## Method: resetDecompilation
- parameter: `identifier`, type: `java.lang.String`

Description: Remove a decompiled object \(i.e., same as [#removeDecompilation(String)](#removeDecompilation(String)).\) For a dex decompiler, reset and removal actions are equivalent.

## Method: resetFieldElement
- parameter: `f`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaField`
- return type: `boolean`

Description: Remove an AST field object.
parameter: f: 
return: 

## Method: resetGlobalDecompilationEvents

Description: Reset the global decompilation events list. This operation is not reversible.

## Method: resetMethodElement
- parameter: `m`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaMethod`
- return type: `boolean`

Description: Remove an AST method object.
parameter: m: 
return: 

## Method: retrieveCachedIR
- parameter: `msig`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDMethodContext`

Description: Attempt to retrieve the *Intermediate Representation* \(IR\) of a previously decompiled method.
parameter: msig: original method signature \(internal format, e.g.            `Lcom/xyz/Object;->foo(I)V`\)
return: an IR object or null if it was not found in the cache

## Method: setCachePolicy
- parameter: `maxCount`, type: `int`
- parameter: `maxSeconds`, type: `int`

Description: Set the policy for the cache of decompiled IRs.
parameter: maxCount: maximum number of entries in the cache \(\-1 means no cap, which is not            recommended; 0 can be used to disable caching entirely\)
parameter: maxSeconds: starting from the last access to an entry, this value is a timeout in            seconds after which the entry is auto\-removed from the cache \(\-1 means no            time\-based removal\)

## Method: setCodeMatchingOverride
- parameter: `enabled`, type: `java.lang.Boolean`
- return type: `java.lang.Boolean`

Description: Override the `.CodeMatchSetting` unit property. 

 Note: this flag does not override [#FLAG_ALLOW_EXTRA_WORK](#FLAG_ALLOW_EXTRA_WORK), which must a required condition to allow code matching
parameter: enabled: null to disable the override; true to force\-enable code matching; false to            force\-disable code matching
return: the previous setting for the override

## Method: setIdentifierName
- parameter: `msig`, type: `java.lang.String`
- parameter: `currentName`, type: `java.lang.String`
- parameter: `newName`, type: `java.lang.String`
- return type: `boolean`

Description: 
parameter: msig: 
parameter: currentName: 
parameter: newName: 
return: 

## Method: setIdentifierName
- parameter: `ident`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaIdentifier`
- parameter: `name`, type: `java.lang.String`
- return type: `boolean`

Description: Rename an identifier.
parameter: ident: 
parameter: name: 
return: 

## Method: setIdentifierName
- parameter: `ident`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaIdentifier`
- parameter: `name`, type: `java.lang.String`
- parameter: `failOnNameConflict`, type: `boolean`
- parameter: `notify`, type: `boolean`
- return type: `boolean`

Description: Rename an identifier.
parameter: ident: 
parameter: name: 
parameter: failOnNameConflict: 
parameter: notify: 
return: 

## Method: unregisterEventQueue
- parameter: `queue`, type: `com.pnfsoftware.jeb.core.units.code.android.DexDecompilerEventQueue`

Description: Unregister a previously registered user\-controlled decompilation event queue.
parameter: queue: 

