Class DebugMode
java.lang.Object
io.github.ajevans.dbcode.utilities.DebugMode
public class DebugMode extends Object
Utility class for getting the system property "debug" set at the command line.
This is pulled from the JVM System property "debug" which can be set at the command line:
jar -Ddebug="true" jarname.jar
- Author:
- Andy Evans
- Version: 1.0 01 Mar 2021
-
Field Summary
Fields Modifier and Type Field Description private static boolean
debugMode
Debug mode. -
Constructor Summary
Constructors Modifier Constructor Description private
DebugMode()
Default constructor set to private to prevent instantiation. -
Method Summary
Modifier and Type Method Description static boolean
getDebugMode()
Static method for getting the debug mode.static void
setDebugMode(boolean debug)
Mutator for debugMode.
-
Field Details
-
debugMode
private static boolean debugModeDebug mode.
-
-
Constructor Details
-
DebugMode
private DebugMode()Default constructor set to private to prevent instantiation.
-
-
Method Details
-
getDebugMode
public static boolean getDebugMode()Static method for getting the debug mode.i.e. call as:
DebugMode.getDebugMode()
- Returns:
- debugMode The debug mode. Defaults to false.
-
setDebugMode
public static void setDebugMode(boolean debug)Mutator for debugMode.Avoid setting this programmatically outside of testing. Turns on exception stack trace printing.
- Parameters:
debug
- Whether to turn on debugging mode or not.
-