Package edu.umd.cs.findbugs
Class DetectorFactoryCollection
- java.lang.Object
-
- edu.umd.cs.findbugs.DetectorFactoryCollection
-
public class DetectorFactoryCollection extends java.lang.Object
The DetectorFactoryCollection stores all of the DetectorFactory objects used to create the Detectors which implement the various analyses. It is a singleton class.- Author:
- David Hovemeyer
- See Also:
DetectorFactory
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
ensureLoaded()
java.util.Iterator<DetectorFactory>
factoryIterator()
Return an Iterator 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()
Plugin
getPluginById(java.lang.String pluginId)
Get a Plugin by its unique id.static DetectorFactoryCollection
instance()
Get the single instance of DetectorFactoryCollection.java.util.Iterator<Plugin>
pluginIterator()
Return an Iterator over all available Plugin objects.java.lang.Iterable<Plugin>
plugins()
Return an Iterable of all available Plugin objects.static DetectorFactoryCollection
rawInstance()
Get the single instance of DetectorFactoryCollection.void
setPluginList(java.net.URL[] pluginList)
Set the list of plugins to load explicitly.
-
-
-
Method Detail
-
setPluginList
public void setPluginList(java.net.URL[] pluginList)
Set the list of plugins to load explicitly. This must be done before the instance of DetectorFactoryCollection is created.- Parameters:
pluginList
- list of plugin Jar files to load
-
instance
public static DetectorFactoryCollection instance()
Get the single instance of DetectorFactoryCollection.
-
rawInstance
public static DetectorFactoryCollection rawInstance()
Get the single instance of DetectorFactoryCollection.
-
pluginIterator
public java.util.Iterator<Plugin> pluginIterator()
Return an Iterator over all available Plugin objects.
-
plugins
public java.lang.Iterable<Plugin> plugins()
Return an Iterable of all available Plugin objects.
-
getPluginById
public Plugin getPluginById(java.lang.String pluginId)
Get a Plugin by its unique id.- Parameters:
pluginId
- the unique id- Returns:
- the Plugin with that id, or null if no such Plugin is found
-
factoryIterator
public java.util.Iterator<DetectorFactory> factoryIterator()
Return an Iterator over the DetectorFactory objects for all registered Detectors.
-
getFactory
public DetectorFactory getFactory(java.lang.String name)
Look up a DetectorFactory by its short name.- Parameters:
name
- the short name- Returns:
- the DetectorFactory, or null if there is no factory with that short name
-
getFactoryByClassName
public DetectorFactory getFactoryByClassName(java.lang.String className)
Look up a DetectorFactory by its class name.- Parameters:
className
- the class name- Returns:
- the DetectoryFactory, or null if there is no factory with that class name
-
getFindBugsHome
public static java.lang.String getFindBugsHome()
-
ensureLoaded
public void ensureLoaded()
-
-