Top Description Inners Fields Constructors Methods
org.slf4j.helpers

public final Class Util

extends Object
Class Inheritance

An internal utility class.
Authors
Alexander Dorokhine, Ceki Gülcü

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
Util.ClassContextSecurityManager

References Deprecated SecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.
In order to call SecurityManager#getClassContext(), which is a protected method, we add this wrapper which allows the method to be visible inside this package.

Field Summary

Modifier and TypeField and Description
private static Util.ClassContextSecurityManager
SECURITY_MANAGER

References Deprecated Util.ClassContextSecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.
private static boolean

Constructor Summary

AccessConstructor and Description
private
Util()

Method Summary

Modifier and TypeMethod and Description
public static Class<?>

Returns:

the name of the class which called the invoking method.
getCallingClass
()

Returns the name of the class which called the invoking method.

private static Util.ClassContextSecurityManager
getSecurityManager()
References Deprecated Util.ClassContextSecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.

public static final void
report(String
message to print
msg
,
Throwable
throwable to print
t
)
Deprecated replaced by the Reporter#error(String, Throwable) method.

See Reporter#error(String, Throwable) class for alternative.

public static final void
report(String
message to print
msg
)
Deprecated replaced by one of Reporter#info(String), Reporter#warn(String) or Reporter#error(String) methods.

See Reporter class for alternatives.

private static Util.ClassContextSecurityManager
safeCreateSecurityManager()
References Deprecated Util.ClassContextSecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.

public static boolean
public static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

SECURITY_MANAGERback to summary
private static Util.ClassContextSecurityManager SECURITY_MANAGER

References Deprecated

Util.ClassContextSecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

SECURITY_MANAGER_CREATION_ALREADY_ATTEMPTEDback to summary
private static boolean SECURITY_MANAGER_CREATION_ALREADY_ATTEMPTED

Constructor Detail

Utilback to summary
private Util()

Method Detail

getCallingClassback to summary
public static Class<?> getCallingClass()

Returns the name of the class which called the invoking method.

Returns:Class<?>

the name of the class which called the invoking method.

getSecurityManagerback to summary
private static Util.ClassContextSecurityManager getSecurityManager()

References Deprecated

Util.ClassContextSecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

reportback to summary
public static final void report(String msg, Throwable t)

Deprecated

replaced by the Reporter#error(String, Throwable) method.

See Reporter#error(String, Throwable) class for alternative.

Parameters
msg:String

message to print

t:Throwable

throwable to print

reportback to summary
public static final void report(String msg)

Deprecated

replaced by one of Reporter#info(String), Reporter#warn(String) or Reporter#error(String) methods.

See Reporter class for alternatives.

Parameters
msg:String

message to print

safeCreateSecurityManagerback to summary
private static Util.ClassContextSecurityManager safeCreateSecurityManager()

References Deprecated

Util.ClassContextSecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

safeGetBooleanSystemPropertyback to summary
public static boolean safeGetBooleanSystemProperty(String key)
safeGetSystemPropertyback to summary
public static String safeGetSystemProperty(String key)
org.slf4j.helpers back to summary

private final Class Util.ClassContextSecurityManager

extends SecurityManager
Class Inheritance

References Deprecated

SecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

In order to call SecurityManager#getClassContext(), which is a protected method, we add this wrapper which allows the method to be visible inside this package.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected Class<?>[]
getClassContext()

Overrides java.lang.SecurityManager.getClassContext.

Returns the current execution stack as an array of classes.

Inherited from java.lang.SecurityManager:
checkAcceptcheckAccesscheckAccesscheckConnectcheckConnectcheckCreateClassLoadercheckDeletecheckExeccheckExitcheckLinkcheckListencheckMulticastcheckMulticastcheckPackageAccesscheckPackageDefinitioncheckPermissioncheckPermissioncheckPrintJobAccesscheckPropertiesAccesscheckPropertyAccesscheckReadcheckReadcheckReadcheckSecurityAccesscheckSetFactorycheckWritecheckWritegetSecurityContextgetThreadGroup

Constructor Detail

ClassContextSecurityManagerback to summary
private ClassContextSecurityManager()

Method Detail

getClassContextback to summary
protected Class<?>[] getClassContext()

Overrides java.lang.SecurityManager.getClassContext.

Doc from java.lang.SecurityManager.getClassContext.

Returns the current execution stack as an array of classes.

The length of the array is the number of methods on the execution stack. The element at index 0 is the class of the currently executing method, the element at index 1 is the class of that method's caller, and so on.