public class DetectorFactoryCollection extends Object implements UpdateCheckCallback
DetectorFactory| Modifier and Type | Field and Description |
|---|---|
protected Map<String,BugCode> |
bugCodeMap |
protected Map<String,BugPattern> |
bugPatternMap |
protected Map<String,BugCategory> |
categoryDescriptionMap |
| Modifier | Constructor and Description |
|---|---|
protected |
DetectorFactoryCollection() |
protected |
DetectorFactoryCollection(Collection<Plugin> enabled) |
protected |
DetectorFactoryCollection(Plugin onlyPlugin) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPluginUpdateListener(PluginUpdateListener listener) |
Iterator<BugPattern> |
bugPatternIterator()
Get an Iterator over all registered bug patterns.
|
void |
checkForUpdates(boolean force) |
Iterator<DetectorFactory> |
factoryIterator()
Return an Iterator over the DetectorFactory objects for all registered
Detectors.
|
Collection<String> |
getBugCategories()
Get a Collection containing all known bug category keys.
|
BugCategory |
getBugCategory(String category)
Get the BugCategory object for a category key.
|
Collection<BugCategory> |
getBugCategoryObjects() |
BugCode |
getBugCode(String shortBugType)
Get a description for given "bug type".
|
Collection<BugCode> |
getBugCodes() |
Collection<BugPattern> |
getBugPatterns()
Get an Iterator over all registered bug patterns.
|
Plugin |
getCorePlugin() |
static URL |
getCoreResource(String name) |
Iterable<DetectorFactory> |
getFactories()
Return an Iterable over the DetectorFactory objects for all registered
Detectors.
|
DetectorFactory |
getFactory(String name)
Look up a DetectorFactory by its short name.
|
DetectorFactory |
getFactoryByClassName(String className)
Look up a DetectorFactory by its class name.
|
static String |
getFindBugsHome() |
String |
getGlobalOption(String key) |
Plugin |
getGlobalOptionSetter(String key) |
Plugin |
getPluginById(String pluginId)
Get a Plugin by its unique id.
|
Map<String,CloudPlugin> |
getRegisteredClouds() |
UpdateChecker |
getUpdateChecker() |
FutureValue<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(String bugPatternOrCode) |
static void |
jawsDebugMessage(String message) |
BugCode |
lookupBugCode(String shortBugType) |
BugPattern |
lookupBugPattern(String bugType)
Look up bug pattern.
|
Iterator<Plugin> |
pluginIterator()
Return an Iterator over all available Plugin objects.
|
Collection<Plugin> |
plugins()
Return an Collection of all available Plugin objects.
|
void |
pluginUpdateCheckComplete(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 Map<String,BugCategory> categoryDescriptionMap
protected final Map<String,BugPattern> bugPatternMap
protected DetectorFactoryCollection()
protected DetectorFactoryCollection(Plugin onlyPlugin)
protected DetectorFactoryCollection(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 String getGlobalOption(String key)
getGlobalOption in interface GlobalOptions@CheckForNull public Plugin getGlobalOptionSetter(String key)
getGlobalOptionSetter in interface GlobalOptionspublic Iterator<Plugin> pluginIterator()
public Collection<Plugin> plugins()
public Plugin getPluginById(String pluginId)
pluginId - the unique idpublic Iterator<DetectorFactory> factoryIterator()
public Iterable<DetectorFactory> getFactories()
public boolean isDisabledByDefault(String bugPatternOrCode)
public DetectorFactory getFactory(String name)
name - the short namepublic DetectorFactory getFactoryByClassName(String className)
className - the class namepublic static String getFindBugsHome()
@CheckForNull public static URL getCoreResource(String name)
public static void jawsDebugMessage(String message)
public void pluginUpdateCheckComplete(List<UpdateChecker.PluginUpdate> newUpdates, boolean force)
pluginUpdateCheckComplete in interface UpdateCheckCallbackpublic void addPluginUpdateListener(PluginUpdateListener listener)
public FutureValue<Collection<UpdateChecker.PluginUpdate>> getUpdates()
public Map<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 Iterator<BugPattern> bugPatternIterator()
public Collection<BugPattern> getBugPatterns()
@CheckForNull public BugPattern lookupBugPattern(String bugType)
bugType - the bug type for the bug patternpublic void registerBugCode(BugCode bugCode)
protected void unRegisterBugCode(BugCode bugCode)
public Collection<BugCode> getBugCodes()
@Nonnull public BugCode getBugCode(String shortBugType)
shortBugType - the short bug type code@CheckForNull public BugCode lookupBugCode(String shortBugType)
shortBugType - the short bug type codepublic BugCategory getBugCategory(String category)
category - the category keypublic Collection<String> getBugCategories()
public Collection<BugCategory> getBugCategoryObjects()
public UpdateChecker getUpdateChecker()
Copyright © 2003–2015. All rights reserved.