Class 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 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

      • 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 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​(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 class CommandLine
        Parameters:
        option - the option
        argument - 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