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

The emulation policy for API methods relying or depending on the execution environment, the date and time, and random number generators.

## Constructor: DEmuExternalPolicy

Description: Create a safe execution policy object \(all restrictions are enabled\).

## Constructor: DEmuExternalPolicy
- parameter: `restrictRandom`, type: `boolean`
- parameter: `restrictTime`, type: `boolean`
- parameter: `restrictEnv`, type: `boolean`

Description: Create an execution policy object.
parameter: restrictRandom: true to restrict random\-value APIs
parameter: restrictTime: true to restrict time\-dependent APIs
parameter: restrictEnv: true to restrict environment\-dependent APIs

## Static Field: RESTRICT_ENV
Type: `int`

Constant value: `4`
Description: Restrict APIs that may expose execution\-environment data.

## Static Field: RESTRICT_RANDOM
Type: `int`

Constant value: `1`
Description: Restrict APIs that may produce random values.

## Static Field: RESTRICT_TIME
Type: `int`

Constant value: `2`
Description: Restrict APIs that may produce time\-dependent values.

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

Description: Add a class, method, or field signature to the blacklist.
parameter: sig: class, method, or field signature

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

Description: Add a class, method, or field signature to the restricted set.
parameter: sig: class, method, or field signature

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

Description: Add a class, method, or field signature to the whitelist.
parameter: sig: class, method, or field signature

## Method: canAccess
- parameter: `fsig`, type: `java.lang.String`
- return type: `boolean`

Description: Determine whether a field may be accessed.
parameter: fsig: field signature
return: true if access is allowed

## Method: canExecute
- parameter: `msig`, type: `java.lang.String`
- return type: `boolean`

Description: Determine whether a method may be executed.
parameter: msig: method signature
return: true if execution is allowed

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

Description: Retrieve the default decision for APIs not covered by explicit rules.
return: true if APIs are allowed by default

## Method: setDefaultAllow
- parameter: `defaultAllow`, type: `boolean`

Description: Set the default decision for APIs not covered by explicit rules.
parameter: defaultAllow: true to allow by default, false to deny by default

