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
  • Field Details

    • 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 Details

    • 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 Details

    • getSettingList

      public AnalysisFeatureSetting[] getSettingList()
    • getProject

      @Nonnull public Project getProject()
    • isProjectLoadedFromFile

      public boolean isProjectLoadedFromFile()
    • handleOption

      protected void handleOption(String option, String optionExtraPart)
      Description copied from class: CommandLine
      Callback method for handling an option.
      Specified by:
      handleOption in class CommandLine
      Parameters:
      option - the option
      optionExtraPart - 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(String option, String argument) throws IOException
      Description copied from class: CommandLine
      Callback method for handling an option with an argument.
      Specified by:
      handleOptionWithArgument in class CommandLine
      Parameters:
      option - the option
      argument - the argument
      Throws:
      IOException
    • loadProject

      public void loadProject(String arg) throws IOException
      Load given project file.
      Parameters:
      arg - name of project file
      Throws:
      IOException