public class UserPreferences
extends java.lang.Object
implements java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EFFORT_DEFAULT |
static java.lang.String |
EFFORT_MAX |
static java.lang.String |
EFFORT_MIN |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
static UserPreferences |
createDefaultUserPreferences()
Create default UserPreferences.
|
void |
enableAllDetectors(boolean enable)
Enable or disable all known Detectors.
|
void |
enableDetector(DetectorFactory factory,
boolean enable)
Set the enabled/disabled status of given Detector.
|
boolean |
equals(java.lang.Object obj) |
AnalysisFeatureSetting[] |
getAnalysisFeatureSettings()
Returns the effort level as an array of feature settings as expected by
FindBugs.
|
java.lang.String |
getEffort() |
java.util.Collection<java.lang.String> |
getExcludeBugsFiles() |
java.util.Collection<java.lang.String> |
getExcludeFilterFiles() |
ProjectFilterSettings |
getFilterSettings()
Get ProjectFilterSettings.
|
java.util.Collection<java.lang.String> |
getIncludeFilterFiles() |
java.util.List<java.lang.String> |
getRecentProjects()
Get List of recent project filenames.
|
int |
getUserDetectorThreshold()
Get the detector threshold (min severity to report a warning).
|
static UserPreferences |
getUserPreferences()
Get UserPreferences singleton.
|
int |
hashCode() |
boolean |
isDetectorEnabled(DetectorFactory factory)
Get the enabled/disabled status of given Detector.
|
boolean |
isRunAtFullBuild()
Get the enabled/disabled status of runAtFullBuild
|
void |
read()
Read persistent global UserPreferences from file in
the user's home directory.
|
void |
read(java.io.InputStream in)
Read user preferences from given input stream.
|
void |
removeProject(java.lang.String projectName)
Remove project filename from the recently-used project list.
|
void |
setEffort(java.lang.String effort) |
void |
setExcludeBugsFiles(java.util.Collection<java.lang.String> excludeBugsFiles) |
void |
setExcludeFilterFiles(java.util.Collection<java.lang.String> excludeFilterFiles) |
void |
setIncludeFilterFiles(java.util.Collection<java.lang.String> includeFilterFiles) |
void |
setProjectFilterSettings(ProjectFilterSettings filterSettings)
Set the ProjectFilterSettings.
|
void |
setRunAtFullBuild(boolean enable)
Set the enabled/disabled status of running findbugs automatically
for full builds.
|
void |
setUserDetectorThreshold(int threshold)
Set the detector threshold (min severity to report a warning).
|
void |
setUserDetectorThreshold(java.lang.String threshold)
Set the detector threshold (min severity to report a warning).
|
void |
useProject(java.lang.String projectName)
Add given project filename to the front of the recently-used
project list.
|
void |
write()
Write persistent global UserPreferences to file
in user's home directory.
|
void |
write(java.io.OutputStream out)
Write UserPreferences to given OutputStream.
|
public static final java.lang.String EFFORT_MIN
public static final java.lang.String EFFORT_DEFAULT
public static final java.lang.String EFFORT_MAX
public static UserPreferences createDefaultUserPreferences()
public static UserPreferences getUserPreferences()
public void read()
public void read(@WillClose
java.io.InputStream in)
throws java.io.IOException
in - the InputStreamjava.io.IOExceptionpublic void write()
public void write(@WillClose
java.io.OutputStream out)
throws java.io.IOException
out - the OutputStreamjava.io.IOExceptionpublic java.util.List<java.lang.String> getRecentProjects()
public void useProject(java.lang.String projectName)
projectName - project filenamepublic void removeProject(java.lang.String projectName)
projectName - project filenamepublic void enableDetector(DetectorFactory factory, boolean enable)
factory - the DetectorFactory for the Detector to be enabled/disabledenable - true if the Detector should be enabled,
false if it should be Disabledpublic boolean isDetectorEnabled(DetectorFactory factory)
factory - the DetectorFactory of the Detectorpublic void enableAllDetectors(boolean enable)
enable - true if all detectors should be enabled,
false if they should all be disabledpublic void setProjectFilterSettings(ProjectFilterSettings filterSettings)
filterSettings - the ProjectFilterSettingspublic ProjectFilterSettings getFilterSettings()
public int getUserDetectorThreshold()
public void setUserDetectorThreshold(int threshold)
threshold - the detector thresholdpublic void setRunAtFullBuild(boolean enable)
enable - true if running FindBugs at full builds should be enabled,
false if it should be Disabledpublic boolean isRunAtFullBuild()
public void setUserDetectorThreshold(java.lang.String threshold)
threshold - the detector thresholdpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String getEffort()
public void setEffort(java.lang.String effort)
public java.util.Collection<java.lang.String> getIncludeFilterFiles()
public void setIncludeFilterFiles(java.util.Collection<java.lang.String> includeFilterFiles)
public java.util.Collection<java.lang.String> getExcludeBugsFiles()
public void setExcludeBugsFiles(java.util.Collection<java.lang.String> excludeBugsFiles)
public void setExcludeFilterFiles(java.util.Collection<java.lang.String> excludeFilterFiles)
public java.util.Collection<java.lang.String> getExcludeFilterFiles()
public AnalysisFeatureSetting[] getAnalysisFeatureSettings()
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.