Package edu.umd.cs.findbugs
Class LaunchAppropriateUI
java.lang.Object
edu.umd.cs.findbugs.LaunchAppropriateUI
Class to launch the appropriate textUI or GUI. This class is the Main-Class
in the findbugs.jar manifest, and is responsible for running an appropriate
main() method.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String[]
Command line arguments.static final int
UI code for the old Swing GUI.static final int
UI code for the new Swing GUI.static final int
UI code for displaying command line help.static final int
UI code for displaying command line version information.static final int
UI code for the text (command line) UI.Map of UI name strings to integer UI codes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate int
Find out what UI should be launched.void
launch()
Launch the appropriate UI.static void
main() method.
-
Field Details
-
TEXTUI
public static final int TEXTUIUI code for the text (command line) UI.- See Also:
-
GUI1
public static final int GUI1UI code for the old Swing GUI. This is deprecated now.- See Also:
-
GUI2
public static final int GUI2UI code for the new Swing GUI.- See Also:
-
SHOW_HELP
public static final int SHOW_HELPUI code for displaying command line help.- See Also:
-
SHOW_VERSION
public static final int SHOW_VERSIONUI code for displaying command line version information.- See Also:
-
uiNameToCodeMap
Map of UI name strings to integer UI codes. -
args
Command line arguments.
-
-
Constructor Details
-
LaunchAppropriateUI
Constructor.- Parameters:
args
- command line arguments
-
-
Method Details
-
launch
Launch the appropriate UI.- Throws:
Exception
-
getLaunchProperty
private int getLaunchProperty()Find out what UI should be launched.First, we check the command line arguments to see if the first argument specifies the UI (e.g., "-textui", "-gui", etc.)
If the first command line argument does not specify the UI, then we check the
findbugs.launchUI
system property to one of the following values:- -Dfindbugs.launchUI=textui for textui,
- -Dfindbugs.launchUI=gui1 for the original swing gui,
- -Dfindbugs.launchUI=gui2 for the new swing gui,
- -Dfindbugs.launchUI=version for the ShowVersion main() method, or
- -Dfindbugs.launchUI=help for the ShowHelp main() method.
- Returns:
- an integer UI code: TEXTUI, GUI1, GUI2, SHOW_VERSION, SHOW_HELP, or possibly another user-set int value
-
main
main() method. This is where execution of FindBugs (any UI) starts.- Parameters:
args
- command line arguments- Throws:
Exception
-