com.pnfsoftware.jeb.core.units.IUnitIdentifier |
![]() |
Unit identifiers are one of the two types of plugins supported by JEB engines. They are used to
determine if some input data can be processed by a corresponding unit. Unit plugins must have a
public no-argument constructor. Currently, unit plugins cannot be unloaded (and therefore, unlike
IEnginesPlugin
, do not offer a dispose() method).
Identifiers have a unique type identification string (eg, "dex") and a priority. For identifiers that successfully identify the same input data as processable, the tie can be broken by using the priority value.
Identifiers build (or rebuild) units and provide them to clients.
Identifiers are rarely used on their own. They are generally managed by a IUnitProcessor
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract boolean |
acceptAnyInputBytes()
Indicate that this identifier could return true for any input.
| ||||||||||
abstract boolean |
canIdentify(IInput input, IUnitCreator parent)
Perform input identification.
| ||||||||||
abstract IUnit |
prepare(String name, IInput input, IUnitProcessor unitProcessor, IUnitCreator parent)
This method is used to produce a unit of the corresponding identifier type.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Indicate that this identifier could return true for any input. The input data does not follow a specific format.
Perform input identification. Determine if a corresponding unit may be created out of the provided input.
input | input data, may be null only if the parent is not null |
---|---|
parent | the parent |
prepare
on successful
identification, although identification may be bypassed
This method is used to produce a unit of the corresponding identifier type. Typically, it is called by unit processors when input data has been identified by the unit identifier as a potential candidate for the corresponding unit.
Unit preparation may involve processing
the unit. Starting with JEB
2.2, we recommend that unit processing be left at the discretion of client code. Lazy
processing may avoid incurring unnecessary or untimely computational overheads.
name | the unit name |
---|---|
input | the input binary data for that unit |
unitProcessor | the processor |
parent | the parent |