public class io.dropwizard.servlets.tasks.LogConfigurationTask extends io.dropwizard.servlets.tasks.Task
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.dropwizard.servlets.tasks.LogConfigurationTask
super_class: io.dropwizard.servlets.tasks.Task
{
private final org.slf4j.ILoggerFactory loggerContext;
descriptor: Lorg/slf4j/ILoggerFactory;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.atomic.AtomicReference<java.util.Timer> timerReference;
descriptor: Ljava/util/concurrent/atomic/AtomicReference;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/atomic/AtomicReference<Ljava/util/Timer;>;
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokestatic org.slf4j.LoggerFactory.getILoggerFactory:()Lorg/slf4j/ILoggerFactory;
invokespecial io.dropwizard.servlets.tasks.LogConfigurationTask.<init>:(Lorg/slf4j/ILoggerFactory;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/dropwizard/servlets/tasks/LogConfigurationTask;
public void <init>(org.slf4j.ILoggerFactory);
descriptor: (Lorg/slf4j/ILoggerFactory;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
ldc "log-level"
invokespecial io.dropwizard.servlets.tasks.Task.<init>:(Ljava/lang/String;)V
1: aload 0
new java.util.concurrent.atomic.AtomicReference
dup
invokespecial java.util.concurrent.atomic.AtomicReference.<init>:()V
putfield io.dropwizard.servlets.tasks.LogConfigurationTask.timerReference:Ljava/util/concurrent/atomic/AtomicReference;
2: aload 0
aload 1
putfield io.dropwizard.servlets.tasks.LogConfigurationTask.loggerContext:Lorg/slf4j/ILoggerFactory;
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lio/dropwizard/servlets/tasks/LogConfigurationTask;
0 4 1 loggerContext Lorg/slf4j/ILoggerFactory;
MethodParameters:
Name Flags
loggerContext
public void execute(java.util.Map<java.lang.String, java.util.List<java.lang.String>>, java.io.PrintWriter);
descriptor: (Ljava/util/Map;Ljava/io/PrintWriter;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=12, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
invokevirtual io.dropwizard.servlets.tasks.LogConfigurationTask.getLoggerNames:(Ljava/util/Map;)Ljava/util/List;
astore 3
start local 3 1: aload 0
aload 1
invokevirtual io.dropwizard.servlets.tasks.LogConfigurationTask.getLoggerLevel:(Ljava/util/Map;)Lch/qos/logback/classic/Level;
astore 4
start local 4 2: aload 0
aload 1
invokevirtual io.dropwizard.servlets.tasks.LogConfigurationTask.getDuration:(Ljava/util/Map;)Ljava/time/Duration;
astore 5
start local 5 3: aload 3
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 7
goto 16
StackMap locals: io.dropwizard.servlets.tasks.LogConfigurationTask java.util.Map java.io.PrintWriter java.util.List ch.qos.logback.classic.Level java.time.Duration top java.util.Iterator
StackMap stack:
4: aload 7
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 6
start local 6 5: aload 0
getfield io.dropwizard.servlets.tasks.LogConfigurationTask.loggerContext:Lorg/slf4j/ILoggerFactory;
checkcast ch.qos.logback.classic.LoggerContext
aload 6
invokevirtual ch.qos.logback.classic.LoggerContext.getLogger:(Ljava/lang/String;)Lch/qos/logback/classic/Logger;
astore 8
start local 8 6: ldc "Configured logging level for %s to %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 6
aastore
dup
iconst_1
aload 4
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
astore 9
start local 9 7: aload 4
ifnull 13
aload 5
ifnull 13
8: aload 5
invokevirtual java.time.Duration.toMillis:()J
lstore 10
start local 10 9: aload 0
invokevirtual io.dropwizard.servlets.tasks.LogConfigurationTask.getTimer:()Ljava/util/Timer;
new io.dropwizard.servlets.tasks.LogConfigurationTask$1
dup
aload 0
aload 8
invokespecial io.dropwizard.servlets.tasks.LogConfigurationTask$1.<init>:(Lio/dropwizard/servlets/tasks/LogConfigurationTask;Lch/qos/logback/classic/Logger;)V
10: lload 10
11: invokevirtual java.util.Timer.schedule:(Ljava/util/TimerTask;J)V
12: new java.lang.StringBuilder
dup
aload 9
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " for %s milliseconds"
iconst_1
anewarray java.lang.Object
dup
iconst_0
lload 10
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 9
end local 10 13: StackMap locals: io.dropwizard.servlets.tasks.LogConfigurationTask java.util.Map java.io.PrintWriter java.util.List ch.qos.logback.classic.Level java.time.Duration java.lang.String java.util.Iterator ch.qos.logback.classic.Logger java.lang.String
StackMap stack:
aload 8
aload 4
invokevirtual ch.qos.logback.classic.Logger.setLevel:(Lch/qos/logback/classic/Level;)V
14: aload 2
aload 9
invokevirtual java.io.PrintWriter.println:(Ljava/lang/String;)V
15: aload 2
invokevirtual java.io.PrintWriter.flush:()V
end local 9 end local 8 end local 6 16: StackMap locals: io.dropwizard.servlets.tasks.LogConfigurationTask java.util.Map java.io.PrintWriter java.util.List ch.qos.logback.classic.Level java.time.Duration top java.util.Iterator
StackMap stack:
aload 7
invokeinterface java.util.Iterator.hasNext:()Z
ifne 4
17: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 this Lio/dropwizard/servlets/tasks/LogConfigurationTask;
0 18 1 parameters Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;>;
0 18 2 output Ljava/io/PrintWriter;
1 18 3 loggerNames Ljava/util/List<Ljava/lang/String;>;
2 18 4 loggerLevel Lch/qos/logback/classic/Level;
3 18 5 duration Ljava/time/Duration;
5 16 6 loggerName Ljava/lang/String;
6 16 8 logger Lch/qos/logback/classic/Logger;
7 16 9 message Ljava/lang/String;
9 13 10 millis J
Exceptions:
throws java.lang.Exception
Signature: (Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;>;Ljava/io/PrintWriter;)V
MethodParameters:
Name Flags
parameters
output
private java.util.List<java.lang.String> getLoggerNames(java.util.Map<java.lang.String, java.util.List<java.lang.String>>);
descriptor: (Ljava/util/Map;)Ljava/util/List;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 1
ldc "logger"
invokestatic java.util.Collections.emptyList:()Ljava/util/List;
invokeinterface java.util.Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.List
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/dropwizard/servlets/tasks/LogConfigurationTask;
0 1 1 parameters Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;>;
Signature: (Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;>;)Ljava/util/List<Ljava/lang/String;>;
MethodParameters:
Name Flags
parameters
private ch.qos.logback.classic.Level getLoggerLevel(java.util.Map<java.lang.String, java.util.List<java.lang.String>>);
descriptor: (Ljava/util/Map;)Lch/qos/logback/classic/Level;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 1
ldc "level"
invokestatic java.util.Collections.emptyList:()Ljava/util/List;
invokeinterface java.util.Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.List
astore 2
start local 2 1: aload 2
invokeinterface java.util.List.isEmpty:()Z
ifeq 2
aconst_null
goto 3
StackMap locals: java.util.List
StackMap stack:
2: aload 2
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.lang.String
invokestatic ch.qos.logback.classic.Level.valueOf:(Ljava/lang/String;)Lch/qos/logback/classic/Level;
StackMap locals:
StackMap stack: ch.qos.logback.classic.Level
3: areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lio/dropwizard/servlets/tasks/LogConfigurationTask;
0 4 1 parameters Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;>;
1 4 2 loggerLevels Ljava/util/List<Ljava/lang/String;>;
Signature: (Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;>;)Lch/qos/logback/classic/Level;
RuntimeVisibleAnnotations:
javax.annotation.Nullable()
RuntimeVisibleTypeAnnotations:
METHOD_RETURN
javax.annotation.Nullable()
MethodParameters:
Name Flags
parameters
private java.time.Duration getDuration(java.util.Map<java.lang.String, java.util.List<java.lang.String>>);
descriptor: (Ljava/util/Map;)Ljava/time/Duration;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 1
ldc "duration"
invokestatic java.util.Collections.emptyList:()Ljava/util/List;
invokeinterface java.util.Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.List
astore 2
start local 2 1: aload 2
invokeinterface java.util.List.isEmpty:()Z
ifeq 2
aconst_null
goto 3
StackMap locals: java.util.List
StackMap stack:
2: aload 2
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.lang.CharSequence
invokestatic java.time.Duration.parse:(Ljava/lang/CharSequence;)Ljava/time/Duration;
StackMap locals:
StackMap stack: java.time.Duration
3: areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lio/dropwizard/servlets/tasks/LogConfigurationTask;
0 4 1 parameters Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;>;
1 4 2 durations Ljava/util/List<Ljava/lang/String;>;
Signature: (Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;>;)Ljava/time/Duration;
RuntimeVisibleAnnotations:
javax.annotation.Nullable()
RuntimeVisibleTypeAnnotations:
METHOD_RETURN
javax.annotation.Nullable()
MethodParameters:
Name Flags
parameters
private java.util.Timer getTimer();
descriptor: ()Ljava/util/Timer;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield io.dropwizard.servlets.tasks.LogConfigurationTask.timerReference:Ljava/util/concurrent/atomic/AtomicReference;
invokedynamic apply()Ljava/util/function/UnaryOperator;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
io/dropwizard/servlets/tasks/LogConfigurationTask.lambda$0(Ljava/util/Timer;)Ljava/util/Timer; (6)
(Ljava/util/Timer;)Ljava/util/Timer;
invokevirtual java.util.concurrent.atomic.AtomicReference.updateAndGet:(Ljava/util/function/UnaryOperator;)Ljava/lang/Object;
checkcast java.util.Timer
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/dropwizard/servlets/tasks/LogConfigurationTask;
RuntimeVisibleAnnotations:
javax.annotation.Nonnull()
RuntimeVisibleTypeAnnotations:
METHOD_RETURN
javax.annotation.Nonnull()
private static java.util.Timer lambda$0(java.util.Timer);
descriptor: (Ljava/util/Timer;)Ljava/util/Timer;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
ifnonnull 1
new java.util.Timer
dup
ldc Lio/dropwizard/servlets/tasks/LogConfigurationTask;
invokevirtual java.lang.Class.getSimpleName:()Ljava/lang/String;
iconst_1
invokespecial java.util.Timer.<init>:(Ljava/lang/String;Z)V
goto 2
StackMap locals:
StackMap stack:
1: aload 0
StackMap locals:
StackMap stack: java.util.Timer
2: areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 timer Ljava/util/Timer;
}
SourceFile: "LogConfigurationTask.java"
NestMembers:
io.dropwizard.servlets.tasks.LogConfigurationTask$1
InnerClasses:
io.dropwizard.servlets.tasks.LogConfigurationTask$1
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles