MDC.smali
.class public Lorg/slf4j/MDC;
.super Ljava/lang/Object;
.source "MDC.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lorg/slf4j/MDC$MDCCloseable;
}
.end annotation
# static fields
.field static final NO_STATIC_MDC_BINDER_URL:Ljava/lang/String; = "http://www.slf4j.org/codes.html#no_static_mdc_binder"
.field static final NULL_MDCA_URL:Ljava/lang/String; = "http://www.slf4j.org/codes.html#null_MDCA"
.field static mdcAdapter:Lorg/slf4j/spi/MDCAdapter;
# direct methods
.method static constructor <clinit>()V
.registers 3
.line 108
:try_start_0
invoke-static {}, Lorg/slf4j/MDC;->bwCompatibleGetMDCAdapterFromBinder()Lorg/slf4j/spi/MDCAdapter;
move-result-object v0
sput-object v0, Lorg/slf4j/MDC;->mdcAdapter:Lorg/slf4j/spi/MDCAdapter;
:try_end_6
.catch Ljava/lang/NoClassDefFoundError; {:try_start_0 .. :try_end_6} :catch_e
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_6} :catch_7
.line 122
:goto_6
goto :goto_34
.line 119
:catch_7
move-exception v0
.line 121
.local v0, "e":Ljava/lang/Exception;
const-string v1, "MDC binding unsuccessful."
invoke-static {v1, v0}, Lorg/slf4j/helpers/Util;->report(Ljava/lang/String;Ljava/lang/Throwable;)V
goto :goto_34
.line 109
.end local v0 # "e":Ljava/lang/Exception;
:catch_e
move-exception v0
.line 110
.local v0, "ncde":Ljava/lang/NoClassDefFoundError;
new-instance v1, Lorg/slf4j/helpers/NOPMDCAdapter;
invoke-direct {v1}, Lorg/slf4j/helpers/NOPMDCAdapter;-><init>()V
sput-object v1, Lorg/slf4j/MDC;->mdcAdapter:Lorg/slf4j/spi/MDCAdapter;
.line 111
invoke-virtual {v0}, Ljava/lang/NoClassDefFoundError;->getMessage()Ljava/lang/String;
move-result-object v1
.line 112
.local v1, "msg":Ljava/lang/String;
if-eqz v1, :cond_35
const-string v2, "StaticMDCBinder"
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v2
if-eqz v2, :cond_35
.line 113
const-string v2, "Failed to load class \"org.slf4j.impl.StaticMDCBinder\"."
invoke-static {v2}, Lorg/slf4j/helpers/Util;->report(Ljava/lang/String;)V
.line 114
const-string v2, "Defaulting to no-operation MDCAdapter implementation."
invoke-static {v2}, Lorg/slf4j/helpers/Util;->report(Ljava/lang/String;)V
.line 115
const-string v2, "See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details."
invoke-static {v2}, Lorg/slf4j/helpers/Util;->report(Ljava/lang/String;)V
goto :goto_6
.line 123
.end local v0 # "ncde":Ljava/lang/NoClassDefFoundError;
.end local v1 # "msg":Ljava/lang/String;
:goto_34
return-void
.line 117
.restart local v0 # "ncde":Ljava/lang/NoClassDefFoundError;
.restart local v1 # "msg":Ljava/lang/String;
:cond_35
goto :goto_37
:goto_36
throw v0
:goto_37
goto :goto_36
.end method
.method private constructor <init>()V
.registers 1
.line 85
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 86
return-void
.end method
.method private static bwCompatibleGetMDCAdapterFromBinder()Lorg/slf4j/spi/MDCAdapter;
.registers 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/NoClassDefFoundError;
}
.end annotation
.line 99
:try_start_0
invoke-static {}, Lorg/slf4j/impl/StaticMDCBinder;->getSingleton()Lorg/slf4j/impl/StaticMDCBinder;
move-result-object v0
invoke-virtual {v0}, Lorg/slf4j/impl/StaticMDCBinder;->getMDCA()Lorg/slf4j/spi/MDCAdapter;
move-result-object v0
:try_end_8
.catch Ljava/lang/NoSuchMethodError; {:try_start_0 .. :try_end_8} :catch_9
return-object v0
.line 100
:catch_9
move-exception v0
.line 102
.local v0, "nsme":Ljava/lang/NoSuchMethodError;
sget-object v1, Lorg/slf4j/impl/StaticMDCBinder;->SINGLETON:Lorg/slf4j/impl/StaticMDCBinder;
invoke-virtual {v1}, Lorg/slf4j/impl/StaticMDCBinder;->getMDCA()Lorg/slf4j/spi/MDCAdapter;
move-result-object v1
return-object v1
.end method
.method public static clear()V
.registers 2
.line 231
sget-object v0, Lorg/slf4j/MDC;->mdcAdapter:Lorg/slf4j/spi/MDCAdapter;
if-eqz v0, :cond_8
.line 234
invoke-interface {v0}, Lorg/slf4j/spi/MDCAdapter;->clear()V
.line 235
return-void
.line 232
:cond_8
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "MDCAdapter cannot be null. See also http://www.slf4j.org/codes.html#null_MDCA"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static get(Ljava/lang/String;)Ljava/lang/String;
.registers 3
.param p0, "key" # Ljava/lang/String;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/IllegalArgumentException;
}
.end annotation
.line 196
if-eqz p0, :cond_13
.line 200
sget-object v0, Lorg/slf4j/MDC;->mdcAdapter:Lorg/slf4j/spi/MDCAdapter;
if-eqz v0, :cond_b
.line 203
invoke-interface {v0, p0}, Lorg/slf4j/spi/MDCAdapter;->get(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
return-object v0
.line 201
:cond_b
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "MDCAdapter cannot be null. See also http://www.slf4j.org/codes.html#null_MDCA"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.line 197
:cond_13
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "key parameter cannot be null"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static getCopyOfContextMap()Ljava/util/Map;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;"
}
.end annotation
.line 245
sget-object v0, Lorg/slf4j/MDC;->mdcAdapter:Lorg/slf4j/spi/MDCAdapter;
if-eqz v0, :cond_9
.line 248
invoke-interface {v0}, Lorg/slf4j/spi/MDCAdapter;->getCopyOfContextMap()Ljava/util/Map;
move-result-object v0
return-object v0
.line 246
:cond_9
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "MDCAdapter cannot be null. See also http://www.slf4j.org/codes.html#null_MDCA"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static getMDCAdapter()Lorg/slf4j/spi/MDCAdapter;
.registers 1
.line 274
sget-object v0, Lorg/slf4j/MDC;->mdcAdapter:Lorg/slf4j/spi/MDCAdapter;
return-object v0
.end method
.method public static put(Ljava/lang/String;Ljava/lang/String;)V
.registers 4
.param p0, "key" # Ljava/lang/String;
.param p1, "val" # Ljava/lang/String;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/IllegalArgumentException;
}
.end annotation
.line 141
if-eqz p0, :cond_12
.line 144
sget-object v0, Lorg/slf4j/MDC;->mdcAdapter:Lorg/slf4j/spi/MDCAdapter;
if-eqz v0, :cond_a
.line 147
invoke-interface {v0, p0, p1}, Lorg/slf4j/spi/MDCAdapter;->put(Ljava/lang/String;Ljava/lang/String;)V
.line 148
return-void
.line 145
:cond_a
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "MDCAdapter cannot be null. See also http://www.slf4j.org/codes.html#null_MDCA"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.line 142
:cond_12
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "key parameter cannot be null"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static putCloseable(Ljava/lang/String;Ljava/lang/String;)Lorg/slf4j/MDC$MDCCloseable;
.registers 4
.param p0, "key" # Ljava/lang/String;
.param p1, "val" # Ljava/lang/String;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/IllegalArgumentException;
}
.end annotation
.line 179
invoke-static {p0, p1}, Lorg/slf4j/MDC;->put(Ljava/lang/String;Ljava/lang/String;)V
.line 180
new-instance v0, Lorg/slf4j/MDC$MDCCloseable;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lorg/slf4j/MDC$MDCCloseable;-><init>(Ljava/lang/String;Lorg/slf4j/MDC$1;)V
return-object v0
.end method
.method public static remove(Ljava/lang/String;)V
.registers 3
.param p0, "key" # Ljava/lang/String;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/IllegalArgumentException;
}
.end annotation
.line 217
if-eqz p0, :cond_12
.line 221
sget-object v0, Lorg/slf4j/MDC;->mdcAdapter:Lorg/slf4j/spi/MDCAdapter;
if-eqz v0, :cond_a
.line 224
invoke-interface {v0, p0}, Lorg/slf4j/spi/MDCAdapter;->remove(Ljava/lang/String;)V
.line 225
return-void
.line 222
:cond_a
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "MDCAdapter cannot be null. See also http://www.slf4j.org/codes.html#null_MDCA"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.line 218
:cond_12
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "key parameter cannot be null"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static setContextMap(Ljava/util/Map;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;)V"
}
.end annotation
.line 261
.local p0, "contextMap":Ljava/util/Map;, "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
sget-object v0, Lorg/slf4j/MDC;->mdcAdapter:Lorg/slf4j/spi/MDCAdapter;
if-eqz v0, :cond_8
.line 264
invoke-interface {v0, p0}, Lorg/slf4j/spi/MDCAdapter;->setContextMap(Ljava/util/Map;)V
.line 265
return-void
.line 262
:cond_8
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "MDCAdapter cannot be null. See also http://www.slf4j.org/codes.html#null_MDCA"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method