@ThreadSafe public final class SingletonHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_DEBUG_CONSISTENCY |
static boolean |
DEFAULT_DEBUG_WITH_STACK_TRACE |
| Modifier and Type | Method and Description |
|---|---|
static Throwable |
getDebugStackTrace() |
static boolean |
isDebugConsistency() |
static boolean |
isDebugWithStackTrace() |
static void |
setDebugConsistency(boolean bDebugConsistency)
Enable or disable singleton consistency debugging.
|
static void |
setDebugWithStackTrace(boolean bDebugWithStackTrace)
Enable or disable stack traces when debugging singletons.
|
public static final boolean DEFAULT_DEBUG_CONSISTENCY
public static final boolean DEFAULT_DEBUG_WITH_STACK_TRACE
public static void setDebugConsistency(boolean bDebugConsistency)
bDebugConsistency - true if the singleton consistency should be debugged,
false to disable it.public static boolean isDebugConsistency()
true if singleton consistency debugging is enabled,
false if it is disabled. The default value is
GlobalDebug.isDebugMode().public static void setDebugWithStackTrace(boolean bDebugWithStackTrace)
bDebugWithStackTrace - true to enable stack traces, false to
disable them. By default is is disabled.public static boolean isDebugWithStackTrace()
true if stack traces should be logged,
false if not. The default value is disabled.@Nullable public static Throwable getDebugStackTrace()
null if
isDebugWithStackTrace() is falseisDebugWithStackTrace()Copyright © 2016–2019 Philip Helger. All rights reserved.