Package org.slf4j.helpers
Class Util
- java.lang.Object
-
- org.slf4j.helpers.Util
-
public final class Util extends java.lang.Object
An internal utility class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Util.ClassContextSecurityManager
In order to callSecurityManager.getClassContext()
, which is a protected method, we add this wrapper which allows the method to be visible inside this package.
-
Field Summary
Fields Modifier and Type Field Description private static Util.ClassContextSecurityManager
SECURITY_MANAGER
private static boolean
SECURITY_MANAGER_CREATION_ALREADY_ATTEMPTED
-
Constructor Summary
Constructors Modifier Constructor Description private
Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Class<?>
getCallingClass()
Returns the name of the class which called the invoking method.private static Util.ClassContextSecurityManager
getSecurityManager()
static void
report(java.lang.String msg)
static void
report(java.lang.String msg, java.lang.Throwable t)
private static Util.ClassContextSecurityManager
safeCreateSecurityManager()
static boolean
safeGetBooleanSystemProperty(java.lang.String key)
static java.lang.String
safeGetSystemProperty(java.lang.String key)
-
-
-
Field Detail
-
SECURITY_MANAGER
private static Util.ClassContextSecurityManager SECURITY_MANAGER
-
SECURITY_MANAGER_CREATION_ALREADY_ATTEMPTED
private static boolean SECURITY_MANAGER_CREATION_ALREADY_ATTEMPTED
-
-
Method Detail
-
safeGetSystemProperty
public static java.lang.String safeGetSystemProperty(java.lang.String key)
-
safeGetBooleanSystemProperty
public static boolean safeGetBooleanSystemProperty(java.lang.String key)
-
getSecurityManager
private static Util.ClassContextSecurityManager getSecurityManager()
-
safeCreateSecurityManager
private static Util.ClassContextSecurityManager safeCreateSecurityManager()
-
getCallingClass
public static java.lang.Class<?> getCallingClass()
Returns the name of the class which called the invoking method.- Returns:
- the name of the class which called the invoking method.
-
report
public static final void report(java.lang.String msg, java.lang.Throwable t)
-
report
public static final void report(java.lang.String msg)
-
-