Interface IDynamicTargetPlugin
- All Superinterfaces:
IPlugin
- All Known Subinterfaces:
IUnitContribution
,IUnitInterpreter
External plugins implementing this interface must have a no-argument constructor.
Life-cycle information. Unlike standard JEB unit plugins, that decouple the identification
from the business logic, dynamic-target plugins specify the identification and processing details
within a single interface (the primary reason behind this design choice being ease of
development, in particular for contribution plugins written as Python scripts). Therefore,
multiple dynamic-target plugins can be (and generally, are) instantiated:
- One first instance serves as for identification purpose only: its isTarget(IUnit)
method is used to determine is a given unit is a candidate for the plugin;
- On a successful identification, a new plugin object is instantiated and registered with its
target unit; the primary target unit is set using setPrimaryTarget(IUnit)
.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the primary target for this plugin.boolean
Determine if a provided unit is an intended target for this plugin.void
setPrimaryTarget
(IUnit unit) Set the primary target for this plugin.Methods inherited from interface com.pnfsoftware.jeb.core.IPlugin
dispose, getData, getPluginInformation, setData
-
Method Details
-
isTarget
Determine if a provided unit is an intended target for this plugin.- Parameters:
unit
- the intended target- Returns:
- true if the provided unit is a target
-
setPrimaryTarget
Set the primary target for this plugin. This method should not be called by client code. The JEB back-end is calling this method when initializing a dynamic target plugin.- Parameters:
unit
- the primary target unit
-
getPrimaryTarget
IUnit getPrimaryTarget()Retrieve the primary target for this plugin. If called before the plugin has been initialized by the JEB back-end, this method should return null.- Returns:
- the primary target unit, or null if it has not been set yet
-