public class Plugin
extends java.lang.Object
PluginLoader
Constructor and Description |
---|
Plugin(java.lang.String pluginId,
java.lang.String version,
java.util.Date releaseDate,
PluginLoader pluginLoader,
boolean enabled,
boolean cannotDisable)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addBugCategory(BugCategory bugCategory)
Add a BugCategory reported by the Plugin.
|
void |
addBugCode(BugCode bugCode)
Add a BugCode reported by the Plugin.
|
void |
addBugPattern(BugPattern bugPattern)
Add a BugPattern reported by the Plugin.
|
void |
addCloudPlugin(CloudPlugin cloudPlugin) |
static Plugin |
addCustomPlugin(java.net.URI u) |
static Plugin |
addCustomPlugin(java.net.URI u,
java.lang.ClassLoader parent) |
static Plugin |
addCustomPlugin(java.net.URL u) |
static Plugin |
addCustomPlugin(java.net.URL u,
java.lang.ClassLoader parent) |
void |
addDetectorFactory(DetectorFactory factory)
Add a DetectorFactory for a Detector implemented by the Plugin.
|
void |
addInterPassOrderingConstraint(DetectorOrderingConstraint constraint)
Add an inter-pass Detector ordering constraint.
|
void |
addIntraPassOrderingConstraint(DetectorOrderingConstraint constraint)
Add an intra-pass Detector ordering constraint.
|
BugCategory |
addOrCreateBugCategory(java.lang.String id) |
boolean |
cannotDisable() |
java.util.Collection<FindBugsMain> |
getAllFindBugsMain() |
static java.util.Collection<java.lang.String> |
getAllPluginIds() |
static java.util.Collection<Plugin> |
getAllPlugins() |
static java.util.Map<java.net.URI,Plugin> |
getAllPluginsMap() |
static java.util.Set<java.net.URI> |
getAllPluginsURIs() |
java.util.Collection<BugCategory> |
getBugCategories()
Get Iterator over BugCategories objects in the Plugin.
|
BugCategory |
getBugCategory(java.lang.String id) |
java.util.Set<BugCode> |
getBugCodes()
Get Iterator over BugCode objects in the Plugin.
|
java.util.Set<BugPattern> |
getBugPatterns()
Get the set of BugPatterns
|
BugRanker |
getBugRanker() |
static Plugin |
getByPluginId(java.lang.String name) |
java.lang.ClassLoader |
getClassLoader() |
java.util.Set<CloudPlugin> |
getCloudPlugins() |
<T> ComponentPlugin<T> |
getComponentPlugin(java.lang.Class<T> componentClass,
java.lang.String name) |
<T> java.lang.Iterable<ComponentPlugin<T>> |
getComponentPlugins(java.lang.Class<T> componentClass) |
java.lang.String |
getDetailedDescription() |
java.util.Collection<DetectorFactory> |
getDetectorFactories()
Get Iterator over DetectorFactory objects in the Plugin.
|
java.lang.Class<? extends IAnalysisEngineRegistrar> |
getEngineRegistrarClass()
Get the analysis engine registrar class that, when instantiated, can be
used to register the plugin's analysis engines with the analysis cache.
|
DetectorFactory |
getFactoryByFullName(java.lang.String fullName)
Look up a DetectorFactory by full name.
|
DetectorFactory |
getFactoryByShortName(java.lang.String shortName)
Look up a DetectorFactory by short name.
|
FindBugsMain |
getFindBugsMain(java.lang.String cmd) |
Plugin |
getParentPlugin() |
java.lang.String |
getPluginId() |
PluginLoader |
getPluginLoader() |
java.lang.String |
getProvider()
Get the plugin provider.
|
java.util.Date |
getReleaseDate() |
java.net.URL |
getResource(java.lang.String name) |
java.lang.String |
getShortDescription() |
java.lang.String |
getShortPluginId() |
java.net.URI |
getUpdateUrl() |
java.lang.String |
getVersion() |
java.lang.String |
getWebsite()
Get the plugin website.
|
java.net.URI |
getWebsiteURI() |
java.util.Iterator<DetectorOrderingConstraint> |
interPassConstraintIterator()
Return an Iterator over the inter-pass Detector ordering constraints.
|
java.util.Iterator<DetectorOrderingConstraint> |
intraPassConstraintIterator()
Return an Iterator over the intra-pass Detector ordering constraints.
|
boolean |
isCorePlugin() |
boolean |
isEnabledByDefault()
Return whether or not the Plugin is enabled.
|
boolean |
isGloballyEnabled() |
boolean |
isInitialPlugin() |
static Plugin |
loadCustomPlugin(java.io.File f,
Project project)
Loads the given plugin and enables it for the given project.
|
static Plugin |
loadCustomPlugin(java.net.URL urlString,
Project project)
Loads the given plugin and enables it for the given project.
|
static void |
removeCustomPlugin(Plugin plugin) |
static void |
removePlugin(java.net.URI uri) |
void |
setBugRanker(BugRanker ranker) |
void |
setDetailedDescription(java.lang.String detailedDescription) |
void |
setEngineRegistrarClass(java.lang.Class<? extends IAnalysisEngineRegistrar> engineRegistrarClass)
Set the analysis engine registrar class that, when instantiated, can be
used to register the plugin's analysis engines with the analysis cache.
|
void |
setGloballyEnabled(boolean enabled) |
void |
setMyGlobalOption(java.lang.String key,
java.lang.String value) |
void |
setProvider(java.lang.String provider)
Set plugin provider.
|
void |
setShortDescription(java.lang.String shortDescription) |
void |
setUpdateUrl(java.lang.String url) |
void |
setWebsite(java.lang.String website)
Set plugin website.
|
java.lang.String |
toString() |
public Plugin(java.lang.String pluginId, java.lang.String version, java.util.Date releaseDate, @Nonnull PluginLoader pluginLoader, boolean enabled, boolean cannotDisable)
pluginId
- the plugin's unique identifierpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean isEnabledByDefault()
public void setProvider(java.lang.String provider)
provider
- the plugin provider@CheckForNull public java.lang.String getProvider()
public void setUpdateUrl(java.lang.String url) throws java.net.URISyntaxException
java.net.URISyntaxException
@CheckForNull public java.net.URI getUpdateUrl()
public void setMyGlobalOption(java.lang.String key, java.lang.String value)
public void setWebsite(java.lang.String website) throws java.net.URISyntaxException
website
- the plugin websitejava.net.URISyntaxException
@CheckForNull public java.lang.String getWebsite()
@CheckForNull public java.net.URI getWebsiteURI()
public java.lang.String getVersion()
public java.util.Date getReleaseDate()
public void setShortDescription(java.lang.String shortDescription)
public java.lang.String getShortDescription()
public java.lang.String getDetailedDescription()
public void setDetailedDescription(java.lang.String detailedDescription)
public void addDetectorFactory(DetectorFactory factory)
factory
- the DetectorFactorypublic void addCloudPlugin(CloudPlugin cloudPlugin)
public void addBugPattern(BugPattern bugPattern)
bugPattern
- public void addBugCode(BugCode bugCode)
bugCode
- public void addBugCategory(BugCategory bugCategory)
bugCategory
- public BugCategory addOrCreateBugCategory(java.lang.String id)
public void addInterPassOrderingConstraint(DetectorOrderingConstraint constraint)
constraint
- the inter-pass Detector ordering constraintpublic void addIntraPassOrderingConstraint(DetectorOrderingConstraint constraint)
constraint
- the intra-pass Detector ordering constraintpublic DetectorFactory getFactoryByShortName(java.lang.String shortName)
shortName
- the short namepublic DetectorFactory getFactoryByFullName(java.lang.String fullName)
fullName
- the full namepublic java.util.Collection<DetectorFactory> getDetectorFactories()
public java.util.Set<BugPattern> getBugPatterns()
public java.util.Set<BugCode> getBugCodes()
public java.util.Collection<BugCategory> getBugCategories()
@CheckForNull public BugCategory getBugCategory(java.lang.String id)
id
- may be nullpublic java.util.Set<CloudPlugin> getCloudPlugins()
public java.util.Iterator<DetectorOrderingConstraint> interPassConstraintIterator()
public java.util.Iterator<DetectorOrderingConstraint> intraPassConstraintIterator()
public java.lang.String getPluginId()
public java.lang.String getShortPluginId()
public void setEngineRegistrarClass(java.lang.Class<? extends IAnalysisEngineRegistrar> engineRegistrarClass)
engineRegistrarClass
- The engine registrar class to set.public java.lang.Class<? extends IAnalysisEngineRegistrar> getEngineRegistrarClass()
public PluginLoader getPluginLoader()
public void setBugRanker(BugRanker ranker)
public BugRanker getBugRanker()
@CheckForNull public FindBugsMain getFindBugsMain(java.lang.String cmd)
public java.util.Collection<FindBugsMain> getAllFindBugsMain()
public <T> java.lang.Iterable<ComponentPlugin<T>> getComponentPlugins(java.lang.Class<T> componentClass)
public <T> ComponentPlugin<T> getComponentPlugin(java.lang.Class<T> componentClass, java.lang.String name)
@CheckForNull public static Plugin getByPluginId(java.lang.String name)
public static void removePlugin(java.net.URI uri)
public static java.util.Collection<Plugin> getAllPlugins()
public static java.util.Collection<java.lang.String> getAllPluginIds()
public static java.util.Map<java.net.URI,Plugin> getAllPluginsMap()
public static java.util.Set<java.net.URI> getAllPluginsURIs()
public boolean isCorePlugin()
public boolean cannotDisable()
public boolean isGloballyEnabled()
public void setGloballyEnabled(boolean enabled)
public boolean isInitialPlugin()
public java.net.URL getResource(java.lang.String name)
public java.lang.ClassLoader getClassLoader()
@CheckForNull public Plugin getParentPlugin()
public static Plugin loadCustomPlugin(java.io.File f, @CheckForNull Project project) throws PluginException
PluginException
public static Plugin loadCustomPlugin(java.net.URL urlString, @CheckForNull Project project) throws PluginException
PluginException
@CheckForNull public static Plugin addCustomPlugin(java.net.URL u) throws PluginException
PluginException
@CheckForNull public static Plugin addCustomPlugin(java.net.URI u) throws PluginException
PluginException
@CheckForNull public static Plugin addCustomPlugin(java.net.URL u, java.lang.ClassLoader parent) throws PluginException
PluginException
@CheckForNull public static Plugin addCustomPlugin(java.net.URI u, java.lang.ClassLoader parent) throws PluginException
PluginException
public static void removeCustomPlugin(Plugin plugin)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.