public class AddOnLoader extends URLClassLoader
Modifier and Type | Field and Description |
---|---|
static String |
ADDONS_BLOCK_LIST |
Constructor and Description |
---|
AddOnLoader(File[] dirs) |
Modifier and Type | Method and Description |
---|---|
void |
addAddon(AddOn ao) |
List<AbstractPlugin> |
getActiveScanRules()
Gets the active scan rules of all the loaded add-ons.
|
AddOnCollection |
getAddOnCollection() |
protected Object |
getClassLoadingLock(String className) |
List<Extension> |
getExtensions()
Returns all the
Extension s of all the installed add-ons. |
List<Extension> |
getExtensions(AddOn addOn)
Returns all
Extension s of the given addOn . |
List<String> |
getIdsAddOnsWithRunningIssuesSinceLastRun()
Returns a list with the IDs of add-ons that have running issues since last run, either Java
version was changed, or add-on dependencies are no longer met for the add-on or one of its
extensions.
|
<T> List<T> |
getImplementors(AddOn ao,
String packageName,
Class<T> classType)
Deprecated.
(2.8.0) The use of this method is discouraged (specially during ZAP startup, as
it's delayed), it's preferable to provide means to register/declare the required classes
instead of searching "everywhere".
|
<T> List<T> |
getImplementors(String packageName,
Class<T> classType)
Deprecated.
(2.8.0) The use of this method is discouraged (specially during ZAP startup, as
it's delayed), it's preferable to provide means to register/declare the required classes
instead of searching "everywhere".
|
List<PluginPassiveScanner> |
getPassiveScanRules()
Gets the passive scan rules of all the loaded add-ons.
|
URL |
getResource(String name) |
Class<?> |
loadClass(String name) |
boolean |
removeAddOn(AddOn ao,
boolean upgrading,
AddOnUninstallationProgressCallback progressCallback) |
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
defineClass, defineClass
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public static final String ADDONS_BLOCK_LIST
public AddOnLoader(File[] dirs)
public List<String> getIdsAddOnsWithRunningIssuesSinceLastRun()
public Class<?> loadClass(String name) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
protected Object getClassLoadingLock(String className)
getClassLoadingLock
in class ClassLoader
public URL getResource(String name)
getResource
in class ClassLoader
public AddOnCollection getAddOnCollection()
public void addAddon(AddOn ao)
public boolean removeAddOn(AddOn ao, boolean upgrading, AddOnUninstallationProgressCallback progressCallback)
public List<Extension> getExtensions()
Extension
s of all the installed add-ons.
The discovery of Extension
s is done by resorting to the manifest file
bundled in the add-ons.
Extensions with unfulfilled dependencies are not be returned.
Extension
s of all installed add-onsExtension
,
getExtensions(AddOn)
public List<Extension> getExtensions(AddOn addOn)
Extension
s of the given addOn
.
The discovery of Extension
s is done by resorting to manifest file
bundled in the add-on.
Extensions with unfulfilled dependencies are not be returned.
Note: If the add-on is not installed the method returns an empty list.
addOn
- the add-on whose extensions will be returnedExtension
s of the given addOn
Extension
,
getExtensions()
public List<AbstractPlugin> getActiveScanRules()
The discovery of active scan rules is done by resorting to manifest file
bundled in the add-ons.
List
with all the active scan rules, never null
AbstractPlugin
public List<PluginPassiveScanner> getPassiveScanRules()
The discovery of passive scan rules is done by resorting to manifest file
bundled in the add-ons.
List
with all the passive scan rules, never null
PluginPassiveScanner
@Deprecated public <T> List<T> getImplementors(String packageName, Class<T> classType)
It searches in the dependencies, add-ons, and the ZAP JAR.
packageName
- the name of the package that the classes must be in.classType
- the type of the classes.null
.@Deprecated public <T> List<T> getImplementors(AddOn ao, String packageName, Class<T> classType)
It searches in the given add-on, if not null
, otherwise it searches in the
dependencies, add-ons, and the ZAP JAR.
ao
- the add-on to search in, might be null
.packageName
- the name of the package that the classes must be in.classType
- the type of the classes.null
.