# Interface: com.pnfsoftware.jeb.core.IDynamicTargetPlugin

A dynamic target plugin is a special type of plugin that takes one or more units as input and provide augmentation for those units. Currently, the JEB back\-end supports two types of dynamic target plugins: 
 
- [contributions](IUnitContribution)
-  
- [interpreters](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)](#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)](#setPrimaryTarget(IUnit)).

## Method: getPrimaryTarget
- return type: `com.pnfsoftware.jeb.core.units.IUnit`

Description: 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.
return: the primary target unit, or null if it has not been set yet

## Method: isTarget
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.IUnit`
- return type: `boolean`

Description: Determine if a provided unit is an intended target for this plugin.
parameter: unit: the intended target
return: true if the provided unit is a target

## Method: setPrimaryTarget
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.IUnit`

Description: 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.
parameter: unit: the primary target unit

