public class DetectorFactoryCollection extends java.lang.Object implements UpdateCheckCallback
DetectorFactory
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,BugCode> |
bugCodeMap |
protected java.util.Map<java.lang.String,BugPattern> |
bugPatternMap |
protected java.util.Map<java.lang.String,BugCategory> |
categoryDescriptionMap |
Modifier | Constructor and Description |
---|---|
protected |
DetectorFactoryCollection() |
protected |
DetectorFactoryCollection(java.util.Collection<Plugin> enabled) |
protected |
DetectorFactoryCollection(Plugin onlyPlugin) |
Modifier and Type | Method and Description |
---|---|
void |
addPluginUpdateListener(PluginUpdateListener listener) |
java.util.Iterator<BugPattern> |
bugPatternIterator()
Get an Iterator over all registered bug patterns.
|
void |
checkForUpdates(boolean force) |
java.util.Iterator<DetectorFactory> |
factoryIterator()
Return an Iterator over the DetectorFactory objects for all registered
Detectors.
|
java.util.Collection<java.lang.String> |
getBugCategories()
Get a Collection containing all known bug category keys.
|
BugCategory |
getBugCategory(java.lang.String category)
Get the BugCategory object for a category key.
|
java.util.Collection<BugCategory> |
getBugCategoryObjects() |
BugCode |
getBugCode(java.lang.String shortBugType)
Get a description for given "bug type".
|
java.util.Collection<BugCode> |
getBugCodes() |
java.util.Collection<BugPattern> |
getBugPatterns()
Get an Iterator over all registered bug patterns.
|
Plugin |
getCorePlugin() |
static java.net.URL |
getCoreResource(java.lang.String name) |
java.lang.Iterable<DetectorFactory> |
getFactories()
Return an Iterable over the DetectorFactory objects for all registered
Detectors.
|
DetectorFactory |
getFactory(java.lang.String name)
Look up a DetectorFactory by its short name.
|
DetectorFactory |
getFactoryByClassName(java.lang.String className)
Look up a DetectorFactory by its class name.
|
static java.lang.String |
getFindBugsHome() |
java.lang.String |
getGlobalOption(java.lang.String key) |
Plugin |
getGlobalOptionSetter(java.lang.String key) |
Plugin |
getPluginById(java.lang.String pluginId)
Get a Plugin by its unique id.
|
java.util.Map<java.lang.String,CloudPlugin> |
getRegisteredClouds() |
UpdateChecker |
getUpdateChecker() |
FutureValue<java.util.Collection<UpdateChecker.PluginUpdate>> |
getUpdates() |
static DetectorFactoryCollection |
instance()
Get the single instance of DetectorFactoryCollection, which knows each and every
loaded plugin, independently of it's enablement
|
boolean |
isDisabledByDefault(java.lang.String bugPatternOrCode) |
static void |
jawsDebugMessage(java.lang.String message) |
BugCode |
lookupBugCode(java.lang.String shortBugType) |
BugPattern |
lookupBugPattern(java.lang.String bugType)
Look up bug pattern.
|
java.util.Iterator<Plugin> |
pluginIterator()
Return an Iterator over all available Plugin objects.
|
java.util.Collection<Plugin> |
plugins()
Return an Collection of all available Plugin objects.
|
void |
pluginUpdateCheckComplete(java.util.List<UpdateChecker.PluginUpdate> newUpdates,
boolean force) |
boolean |
registerBugCategory(BugCategory bc)
Set the metadata for a bug category.
|
void |
registerBugCode(BugCode bugCode) |
void |
registerBugPattern(BugPattern bugPattern)
Register a BugPattern.
|
static void |
resetInstance(DetectorFactoryCollection instance)
Reset the factory singleton.
|
protected boolean |
unRegisterBugCategory(BugCategory bc) |
protected void |
unRegisterBugCode(BugCode bugCode) |
protected void |
unRegisterBugPattern(BugPattern bugPattern) |
protected final java.util.Map<java.lang.String,BugCategory> categoryDescriptionMap
protected final java.util.Map<java.lang.String,BugPattern> bugPatternMap
protected final java.util.Map<java.lang.String,BugCode> bugCodeMap
protected DetectorFactoryCollection()
protected DetectorFactoryCollection(Plugin onlyPlugin)
protected DetectorFactoryCollection(java.util.Collection<Plugin> enabled)
public void checkForUpdates(boolean force)
force
- whether the updates should be shown to the user no matter what - even if the updates have been
seen beforepublic static void resetInstance(@CheckForNull DetectorFactoryCollection instance)
Implementation note: This method is public for tests only!
instance
- use null to clear the instancepublic static DetectorFactoryCollection instance()
@CheckForNull public java.lang.String getGlobalOption(java.lang.String key)
getGlobalOption
in interface GlobalOptions
@CheckForNull public Plugin getGlobalOptionSetter(java.lang.String key)
getGlobalOptionSetter
in interface GlobalOptions
public java.util.Iterator<Plugin> pluginIterator()
public java.util.Collection<Plugin> plugins()
@Nonnull public Plugin getCorePlugin()
public Plugin getPluginById(java.lang.String pluginId)
pluginId
- the unique idpublic java.util.Iterator<DetectorFactory> factoryIterator()
public java.lang.Iterable<DetectorFactory> getFactories()
public boolean isDisabledByDefault(java.lang.String bugPatternOrCode)
public DetectorFactory getFactory(java.lang.String name)
name
- the short namepublic DetectorFactory getFactoryByClassName(java.lang.String className)
className
- the class namepublic static java.lang.String getFindBugsHome()
@CheckForNull public static java.net.URL getCoreResource(java.lang.String name)
public static void jawsDebugMessage(java.lang.String message)
public void pluginUpdateCheckComplete(java.util.List<UpdateChecker.PluginUpdate> newUpdates, boolean force)
pluginUpdateCheckComplete
in interface UpdateCheckCallback
public void addPluginUpdateListener(PluginUpdateListener listener)
public FutureValue<java.util.Collection<UpdateChecker.PluginUpdate>> getUpdates()
public java.util.Map<java.lang.String,CloudPlugin> getRegisteredClouds()
public boolean registerBugCategory(BugCategory bc)
bc
- the BugCategory object holding the metadata for the categoryprotected boolean unRegisterBugCategory(BugCategory bc)
public void registerBugPattern(BugPattern bugPattern)
bugPattern
- the BugPatternprotected void unRegisterBugPattern(BugPattern bugPattern)
public java.util.Iterator<BugPattern> bugPatternIterator()
public java.util.Collection<BugPattern> getBugPatterns()
@CheckForNull public BugPattern lookupBugPattern(java.lang.String bugType)
bugType
- the bug type for the bug patternpublic void registerBugCode(BugCode bugCode)
protected void unRegisterBugCode(BugCode bugCode)
public java.util.Collection<BugCode> getBugCodes()
@Nonnull public BugCode getBugCode(java.lang.String shortBugType)
shortBugType
- the short bug type code@CheckForNull public BugCode lookupBugCode(java.lang.String shortBugType)
shortBugType
- the short bug type codepublic BugCategory getBugCategory(java.lang.String category)
category
- the category keypublic java.util.Collection<java.lang.String> getBugCategories()
public java.util.Collection<BugCategory> getBugCategoryObjects()
public UpdateChecker getUpdateChecker()
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.