public class io.dropwizard.jersey.validation.FuzzyEnumParamConverter<T> implements javax.ws.rs.ext.ParamConverter<T>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.dropwizard.jersey.validation.FuzzyEnumParamConverter
super_class: java.lang.Object
{
private static final org.slf4j.Logger LOGGER;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.lang.Class<T> rawType;
descriptor: Ljava/lang/Class;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/lang/Class<TT;>;
private final java.lang.reflect.Method fromStringMethod;
descriptor: Ljava/lang/reflect/Method;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.Enum<?>[] constants;
descriptor: [Ljava/lang/Enum;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: [Ljava/lang/Enum<*>;
private final java.lang.String parameterName;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lio/dropwizard/jersey/validation/FuzzyEnumParamConverter;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic io.dropwizard.jersey.validation.FuzzyEnumParamConverter.LOGGER:Lorg/slf4j/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
void <init>(java.lang.Class<T>, java.lang.reflect.Method, java.lang.Enum<?>[], java.lang.String);
descriptor: (Ljava/lang/Class;Ljava/lang/reflect/Method;[Ljava/lang/Enum;Ljava/lang/String;)V
flags: (0x0000)
Code:
stack=2, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.rawType:Ljava/lang/Class;
2: aload 0
aload 2
putfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.fromStringMethod:Ljava/lang/reflect/Method;
3: aload 0
aload 3
putfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.constants:[Ljava/lang/Enum;
4: aload 0
aload 4
putfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.parameterName:Ljava/lang/String;
5: return
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 Lio/dropwizard/jersey/validation/FuzzyEnumParamConverter<TT;>;
0 6 1 rawType Ljava/lang/Class<TT;>;
0 6 2 fromStringMethod Ljava/lang/reflect/Method;
0 6 3 constants [Ljava/lang/Enum;
0 6 4 parameterName Ljava/lang/String;
Signature: (Ljava/lang/Class<TT;>;Ljava/lang/reflect/Method;[Ljava/lang/Enum<*>;Ljava/lang/String;)V
MethodParameters:
Name Flags
rawType
fromStringMethod
constants
parameterName
public T fromString(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=5, args_size=2
start local 0 start local 1 0: aload 1
invokestatic io.dropwizard.util.Strings.isNullOrEmpty:(Ljava/lang/String;)Z
ifeq 2
1: aconst_null
areturn
2: StackMap locals:
StackMap stack:
aload 0
getfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.fromStringMethod:Ljava/lang/reflect/Method;
ifnull 18
3: aload 0
getfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.fromStringMethod:Ljava/lang/reflect/Method;
aconst_null
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
astore 2
start local 2 4: aload 2
ifnull 8
5: aload 2
astore 3
start local 3 6: aload 3
7: areturn
end local 3 8: StackMap locals: java.lang.Object
StackMap stack:
ldc "%s is not a valid %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.parameterName:Ljava/lang/String;
aastore
dup
iconst_1
aload 0
getfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.rawType:Ljava/lang/Class;
invokevirtual java.lang.Class.getSimpleName:()Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
astore 3
start local 3 9: new javax.ws.rs.WebApplicationException
dup
aload 0
aload 3
invokevirtual io.dropwizard.jersey.validation.FuzzyEnumParamConverter.getErrorResponse:(Ljava/lang/String;)Ljavax/ws/rs/core/Response;
invokespecial javax.ws.rs.WebApplicationException.<init>:(Ljavax/ws/rs/core/Response;)V
athrow
end local 3 end local 2 10: StackMap locals: io.dropwizard.jersey.validation.FuzzyEnumParamConverter java.lang.String
StackMap stack: java.lang.IllegalAccessException
astore 2
start local 2 11: getstatic io.dropwizard.jersey.validation.FuzzyEnumParamConverter.LOGGER:Lorg/slf4j/Logger;
ldc "Not permitted to call fromString on {}"
aload 0
getfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.rawType:Ljava/lang/Class;
invokevirtual java.lang.Class.getSimpleName:()Ljava/lang/String;
aload 2
invokeinterface org.slf4j.Logger.debug:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
12: new javax.ws.rs.WebApplicationException
dup
aload 0
new java.lang.StringBuilder
dup
ldc "Not permitted to call fromString on %s"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.rawType:Ljava/lang/Class;
invokevirtual java.lang.Class.getSimpleName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual io.dropwizard.jersey.validation.FuzzyEnumParamConverter.getErrorResponse:(Ljava/lang/String;)Ljavax/ws/rs/core/Response;
invokespecial javax.ws.rs.WebApplicationException.<init>:(Ljavax/ws/rs/core/Response;)V
athrow
end local 2 13: StackMap locals:
StackMap stack: java.lang.reflect.InvocationTargetException
astore 2
start local 2 14: aload 2
invokevirtual java.lang.reflect.InvocationTargetException.getCause:()Ljava/lang/Throwable;
instanceof javax.ws.rs.WebApplicationException
ifeq 16
15: aload 2
invokevirtual java.lang.reflect.InvocationTargetException.getCause:()Ljava/lang/Throwable;
checkcast javax.ws.rs.WebApplicationException
athrow
16: StackMap locals: java.lang.reflect.InvocationTargetException
StackMap stack:
getstatic io.dropwizard.jersey.validation.FuzzyEnumParamConverter.LOGGER:Lorg/slf4j/Logger;
ldc "Failed to convert {} to {}"
iconst_3
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.parameterName:Ljava/lang/String;
aastore
dup
iconst_1
aload 0
getfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.rawType:Ljava/lang/Class;
invokevirtual java.lang.Class.getSimpleName:()Ljava/lang/String;
aastore
dup
iconst_2
aload 2
aastore
invokeinterface org.slf4j.Logger.debug:(Ljava/lang/String;[Ljava/lang/Object;)V
17: new javax.ws.rs.WebApplicationException
dup
aload 0
new java.lang.StringBuilder
dup
ldc "Failed to convert "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.parameterName:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " to "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.rawType:Ljava/lang/Class;
invokevirtual java.lang.Class.getSimpleName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual io.dropwizard.jersey.validation.FuzzyEnumParamConverter.getErrorResponse:(Ljava/lang/String;)Ljavax/ws/rs/core/Response;
invokespecial javax.ws.rs.WebApplicationException.<init>:(Ljavax/ws/rs/core/Response;)V
athrow
end local 2 18: StackMap locals:
StackMap stack:
aload 1
aload 0
getfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.constants:[Ljava/lang/Enum;
invokestatic io.dropwizard.util.Enums.fromStringFuzzy:(Ljava/lang/String;[Ljava/lang/Enum;)Ljava/lang/Enum;
astore 2
start local 2 19: aload 2
ifnull 22
20: aload 2
astore 3
start local 3 21: aload 3
areturn
end local 3 22: StackMap locals: java.lang.Object
StackMap stack:
aload 0
getfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.constants:[Ljava/lang/Enum;
invokestatic java.util.Arrays.stream:([Ljava/lang/Object;)Ljava/util/stream/Stream;
23: invokedynamic apply()Ljava/util/function/Function;
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;
java/lang/Enum.toString()Ljava/lang/String; (5)
(Ljava/lang/Enum;)Ljava/lang/String;
invokeinterface java.util.stream.Stream.map:(Ljava/util/function/Function;)Ljava/util/stream/Stream;
24: ldc ", "
invokestatic java.util.stream.Collectors.joining:(Ljava/lang/CharSequence;)Ljava/util/stream/Collector;
invokeinterface java.util.stream.Stream.collect:(Ljava/util/stream/Collector;)Ljava/lang/Object;
checkcast java.lang.String
25: astore 3
start local 3 26: ldc "%s must be one of [%s]"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield io.dropwizard.jersey.validation.FuzzyEnumParamConverter.parameterName:Ljava/lang/String;
aastore
dup
iconst_1
aload 3
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
astore 4
start local 4 27: new javax.ws.rs.WebApplicationException
dup
aload 0
aload 4
invokevirtual io.dropwizard.jersey.validation.FuzzyEnumParamConverter.getErrorResponse:(Ljava/lang/String;)Ljavax/ws/rs/core/Response;
invokespecial javax.ws.rs.WebApplicationException.<init>:(Ljavax/ws/rs/core/Response;)V
athrow
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 this Lio/dropwizard/jersey/validation/FuzzyEnumParamConverter<TT;>;
0 28 1 value Ljava/lang/String;
4 10 2 constant Ljava/lang/Object;
6 8 3 returnValue TT;
9 10 3 errMsg Ljava/lang/String;
11 13 2 e Ljava/lang/IllegalAccessException;
14 18 2 e Ljava/lang/reflect/InvocationTargetException;
19 28 2 constant Ljava/lang/Object;
21 22 3 returnValue TT;
26 28 3 constantsList Ljava/lang/String;
27 28 4 errMsg Ljava/lang/String;
Exception table:
from to target type
3 7 10 Class java.lang.IllegalAccessException
8 10 10 Class java.lang.IllegalAccessException
3 7 13 Class java.lang.reflect.InvocationTargetException
8 10 13 Class java.lang.reflect.InvocationTargetException
Signature: (Ljava/lang/String;)TT;
RuntimeVisibleAnnotations:
javax.annotation.Nullable()
RuntimeVisibleTypeAnnotations:
METHOD_RETURN
javax.annotation.Nullable()
MethodParameters:
Name Flags
value
public java.lang.String toString(T);
descriptor: (Ljava/lang/Object;)Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.lang.Object.toString:()Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/dropwizard/jersey/validation/FuzzyEnumParamConverter<TT;>;
0 1 1 value TT;
Signature: (TT;)Ljava/lang/String;
MethodParameters:
Name Flags
value
private javax.ws.rs.core.Response getErrorResponse(java.lang.String);
descriptor: (Ljava/lang/String;)Ljavax/ws/rs/core/Response;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: sipush 400
invokestatic javax.ws.rs.core.Response.status:(I)Ljavax/ws/rs/core/Response$ResponseBuilder;
1: new io.dropwizard.jersey.errors.ErrorMessage
dup
sipush 400
aload 1
invokespecial io.dropwizard.jersey.errors.ErrorMessage.<init>:(ILjava/lang/String;)V
invokevirtual javax.ws.rs.core.Response$ResponseBuilder.entity:(Ljava/lang/Object;)Ljavax/ws/rs/core/Response$ResponseBuilder;
2: getstatic javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE:Ljavax/ws/rs/core/MediaType;
invokevirtual javax.ws.rs.core.Response$ResponseBuilder.type:(Ljavax/ws/rs/core/MediaType;)Ljavax/ws/rs/core/Response$ResponseBuilder;
3: invokevirtual javax.ws.rs.core.Response$ResponseBuilder.build:()Ljavax/ws/rs/core/Response;
4: areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lio/dropwizard/jersey/validation/FuzzyEnumParamConverter<TT;>;
0 5 1 message Ljava/lang/String;
MethodParameters:
Name Flags
message
}
Signature: <T:Ljava/lang/Object;>Ljava/lang/Object;Ljavax/ws/rs/ext/ParamConverter<TT;>;
SourceFile: "FuzzyEnumParamConverter.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public abstract ResponseBuilder = javax.ws.rs.core.Response$ResponseBuilder of javax.ws.rs.core.Response
RuntimeVisibleAnnotations:
javax.ws.rs.ext.Provider()