Package edu.umd.cs.findbugs
Class FindBugsCommandLine
- java.lang.Object
-
- edu.umd.cs.findbugs.config.CommandLine
-
- edu.umd.cs.findbugs.FindBugsCommandLine
-
- Direct Known Subclasses:
TextUICommandLine
public abstract class FindBugsCommandLine extends CommandLine
Base class for FindBugs command line classes. Handles all shared switches/options.- Author:
- David Hovemeyer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.umd.cs.findbugs.config.CommandLine
CommandLine.HelpRequestedException
-
-
Field Summary
Fields Modifier and Type Field Description protected Project
project
Project to analyze.protected boolean
projectLoadedFromFile
True if project was initialized by loading a project file.protected AnalysisFeatureSetting[]
settingList
Analysis settings to configure the analysis effort.
-
Constructor Summary
Constructors Constructor Description FindBugsCommandLine()
Constructor.FindBugsCommandLine(boolean modernGui)
Additional constuctor just as hack for decoupling the core package from gui2 package
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Project
getProject()
AnalysisFeatureSetting[]
getSettingList()
protected void
handleOption(java.lang.String option, java.lang.String optionExtraPart)
Callback method for handling an option.protected void
handleOptionWithArgument(java.lang.String option, java.lang.String argument)
Callback method for handling an option with an argument.boolean
isProjectLoadedFromFile()
void
loadProject(java.lang.String arg)
Load given project file.-
Methods inherited from class edu.umd.cs.findbugs.config.CommandLine
addOption, addSwitch, addSwitchWithOptionalExtraPart, expandOptionFiles, getAnalysisOptionProperties, makeOptionUnlisted, parse, parse, printUsage, startOptionGroup
-
-
-
-
Field Detail
-
settingList
protected AnalysisFeatureSetting[] settingList
Analysis settings to configure the analysis effort.
-
project
protected Project project
Project to analyze.
-
projectLoadedFromFile
protected boolean projectLoadedFromFile
True if project was initialized by loading a project file.
-
-
Constructor Detail
-
FindBugsCommandLine
public FindBugsCommandLine()
Constructor. Adds shared options/switches.
-
FindBugsCommandLine
public FindBugsCommandLine(boolean modernGui)
Additional constuctor just as hack for decoupling the core package from gui2 package- Parameters:
modernGui
- ignored. In any case, gui2 options are added here.
-
-
Method Detail
-
getSettingList
public AnalysisFeatureSetting[] getSettingList()
-
getProject
@Nonnull public Project getProject()
-
isProjectLoadedFromFile
public boolean isProjectLoadedFromFile()
-
handleOption
protected void handleOption(java.lang.String option, java.lang.String optionExtraPart)
Description copied from class:CommandLine
Callback method for handling an option.- Specified by:
handleOption
in classCommandLine
- Parameters:
option
- the optionoptionExtraPart
- the "extra" part of the option (everything after the colon: e.g., "withMessages" in "-xml:withMessages"); the empty string if there was no extra part
-
handleOptionWithArgument
protected void handleOptionWithArgument(java.lang.String option, java.lang.String argument) throws java.io.IOException
Description copied from class:CommandLine
Callback method for handling an option with an argument.- Specified by:
handleOptionWithArgument
in classCommandLine
- Parameters:
option
- the optionargument
- the argument- Throws:
java.io.IOException
-
loadProject
public void loadProject(java.lang.String arg) throws java.io.IOException
Load given project file.- Parameters:
arg
- name of project file- Throws:
java.io.IOException
-
-