final class org.springframework.boot.convert.DurationToNumberConverter implements org.springframework.core.convert.converter.GenericConverter
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: org.springframework.boot.convert.DurationToNumberConverter
super_class: java.lang.Object
{
void <init>();
descriptor: ()V
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/springframework/boot/convert/DurationToNumberConverter;
public java.util.Set<org.springframework.core.convert.converter.GenericConverter$ConvertiblePair> getConvertibleTypes();
descriptor: ()Ljava/util/Set;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: new org.springframework.core.convert.converter.GenericConverter$ConvertiblePair
dup
ldc Ljava/time/Duration;
ldc Ljava/lang/Number;
invokespecial org.springframework.core.convert.converter.GenericConverter$ConvertiblePair.<init>:(Ljava/lang/Class;Ljava/lang/Class;)V
invokestatic java.util.Collections.singleton:(Ljava/lang/Object;)Ljava/util/Set;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/springframework/boot/convert/DurationToNumberConverter;
Signature: ()Ljava/util/Set<Lorg/springframework/core/convert/converter/GenericConverter$ConvertiblePair;>;
public java.lang.Object convert(java.lang.Object, org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor);
descriptor: (Ljava/lang/Object;Lorg/springframework/core/convert/TypeDescriptor;Lorg/springframework/core/convert/TypeDescriptor;)Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
ifnonnull 2
1: aconst_null
areturn
2: StackMap locals:
StackMap stack:
aload 0
aload 1
checkcast java.time.Duration
aload 0
aload 2
invokevirtual org.springframework.boot.convert.DurationToNumberConverter.getDurationUnit:(Lorg/springframework/core/convert/TypeDescriptor;)Ljava/time/temporal/ChronoUnit;
aload 3
invokevirtual org.springframework.core.convert.TypeDescriptor.getObjectType:()Ljava/lang/Class;
invokevirtual org.springframework.boot.convert.DurationToNumberConverter.convert:(Ljava/time/Duration;Ljava/time/temporal/ChronoUnit;Ljava/lang/Class;)Ljava/lang/Object;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/springframework/boot/convert/DurationToNumberConverter;
0 3 1 source Ljava/lang/Object;
0 3 2 sourceType Lorg/springframework/core/convert/TypeDescriptor;
0 3 3 targetType Lorg/springframework/core/convert/TypeDescriptor;
MethodParameters:
Name Flags
source
sourceType
targetType
private java.time.temporal.ChronoUnit getDurationUnit(org.springframework.core.convert.TypeDescriptor);
descriptor: (Lorg/springframework/core/convert/TypeDescriptor;)Ljava/time/temporal/ChronoUnit;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 1
ldc Lorg/springframework/boot/convert/DurationUnit;
invokevirtual org.springframework.core.convert.TypeDescriptor.getAnnotation:(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;
checkcast org.springframework.boot.convert.DurationUnit
astore 2
start local 2 1: aload 2
ifnull 2
aload 2
invokeinterface org.springframework.boot.convert.DurationUnit.value:()Ljava/time/temporal/ChronoUnit;
goto 3
StackMap locals: org.springframework.boot.convert.DurationUnit
StackMap stack:
2: aconst_null
StackMap locals:
StackMap stack: java.time.temporal.ChronoUnit
3: areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/springframework/boot/convert/DurationToNumberConverter;
0 4 1 sourceType Lorg/springframework/core/convert/TypeDescriptor;
1 4 2 annotation Lorg/springframework/boot/convert/DurationUnit;
MethodParameters:
Name Flags
sourceType
private convert(java.time.Duration, java.time.temporal.ChronoUnit, java.lang.Class<?>);
descriptor: (Ljava/time/Duration;Ljava/time/temporal/ChronoUnit;Ljava/lang/Class;)Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 3
iconst_1
anewarray java.lang.Class
dup
iconst_0
ldc Ljava/lang/String;
aastore
invokevirtual java.lang.Class.getConstructor:([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
iconst_1
anewarray java.lang.Object
dup
iconst_0
1: aload 2
invokestatic org.springframework.boot.convert.DurationStyle$Unit.fromChronoUnit:(Ljava/time/temporal/ChronoUnit;)Lorg/springframework/boot/convert/DurationStyle$Unit;
aload 1
invokevirtual org.springframework.boot.convert.DurationStyle$Unit.longValue:(Ljava/time/Duration;)J
invokestatic java.lang.String.valueOf:(J)Ljava/lang/String;
aastore
invokevirtual java.lang.reflect.Constructor.newInstance:([Ljava/lang/Object;)Ljava/lang/Object;
2: areturn
3: StackMap locals:
StackMap stack: java.lang.Exception
astore 4
start local 4 4: aload 4
invokestatic org.springframework.util.ReflectionUtils.rethrowRuntimeException:(Ljava/lang/Throwable;)V
5: new java.lang.IllegalStateException
dup
aload 4
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/springframework/boot/convert/DurationToNumberConverter;
0 6 1 source Ljava/time/Duration;
0 6 2 unit Ljava/time/temporal/ChronoUnit;
0 6 3 type Ljava/lang/Class<*>;
4 6 4 ex Ljava/lang/Exception;
Exception table:
from to target type
0 2 3 Class java.lang.Exception
Signature: (Ljava/time/Duration;Ljava/time/temporal/ChronoUnit;Ljava/lang/Class<*>;)Ljava/lang/Object;
MethodParameters:
Name Flags
source
unit
type
}
SourceFile: "DurationToNumberConverter.java"
InnerClasses:
final Unit = org.springframework.boot.convert.DurationStyle$Unit of org.springframework.boot.convert.DurationStyle
public final ConvertiblePair = org.springframework.core.convert.converter.GenericConverter$ConvertiblePair of org.springframework.core.convert.converter.GenericConverter