public class io.dropwizard.views.ViewMessageBodyWriter implements javax.ws.rs.ext.MessageBodyWriter<io.dropwizard.views.View>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.dropwizard.views.ViewMessageBodyWriter
super_class: java.lang.Object
{
private javax.ws.rs.core.HttpHeaders headers;
descriptor: Ljavax/ws/rs/core/HttpHeaders;
flags: (0x0002) ACC_PRIVATE
RuntimeVisibleAnnotations:
javax.ws.rs.core.Context()
javax.annotation.Nullable()
private final java.lang.Iterable<io.dropwizard.views.ViewRenderer> renderers;
descriptor: Ljava/lang/Iterable;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/lang/Iterable<Lio/dropwizard/views/ViewRenderer;>;
private final com.codahale.metrics.MetricRegistry metricRegistry;
descriptor: Lcom/codahale/metrics/MetricRegistry;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
void setHeaders(javax.ws.rs.core.HttpHeaders);
descriptor: (Ljavax/ws/rs/core/HttpHeaders;)V
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield io.dropwizard.views.ViewMessageBodyWriter.headers:Ljavax/ws/rs/core/HttpHeaders;
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/dropwizard/views/ViewMessageBodyWriter;
0 2 1 headers Ljavax/ws/rs/core/HttpHeaders;
MethodParameters:
Name Flags
headers
public void <init>(com.codahale.metrics.MetricRegistry);
descriptor: (Lcom/codahale/metrics/MetricRegistry;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
ldc Lio/dropwizard/views/ViewRenderer;
invokestatic java.util.ServiceLoader.load:(Ljava/lang/Class;)Ljava/util/ServiceLoader;
invokespecial io.dropwizard.views.ViewMessageBodyWriter.<init>:(Lcom/codahale/metrics/MetricRegistry;Ljava/lang/Iterable;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/dropwizard/views/ViewMessageBodyWriter;
0 2 1 metricRegistry Lcom/codahale/metrics/MetricRegistry;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
metricRegistry
public void <init>(com.codahale.metrics.MetricRegistry, java.lang.Iterable<io.dropwizard.views.ViewRenderer>);
descriptor: (Lcom/codahale/metrics/MetricRegistry;Ljava/lang/Iterable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield io.dropwizard.views.ViewMessageBodyWriter.metricRegistry:Lcom/codahale/metrics/MetricRegistry;
2: aload 0
aload 2
putfield io.dropwizard.views.ViewMessageBodyWriter.renderers:Ljava/lang/Iterable;
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lio/dropwizard/views/ViewMessageBodyWriter;
0 4 1 metricRegistry Lcom/codahale/metrics/MetricRegistry;
0 4 2 viewRenderers Ljava/lang/Iterable<Lio/dropwizard/views/ViewRenderer;>;
Signature: (Lcom/codahale/metrics/MetricRegistry;Ljava/lang/Iterable<Lio/dropwizard/views/ViewRenderer;>;)V
MethodParameters:
Name Flags
metricRegistry
viewRenderers
public boolean isWriteable(java.lang.Class<?>, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType);
descriptor: (Ljava/lang/Class;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;Ljavax/ws/rs/core/MediaType;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: ldc Lio/dropwizard/views/View;
aload 1
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ireturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/dropwizard/views/ViewMessageBodyWriter;
0 1 1 type Ljava/lang/Class<*>;
0 1 2 genericType Ljava/lang/reflect/Type;
0 1 3 annotations [Ljava/lang/annotation/Annotation;
0 1 4 mediaType Ljavax/ws/rs/core/MediaType;
Signature: (Ljava/lang/Class<*>;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;Ljavax/ws/rs/core/MediaType;)Z
MethodParameters:
Name Flags
type
genericType
annotations
mediaType
public long getSize(io.dropwizard.views.View, java.lang.Class<?>, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType);
descriptor: (Lio/dropwizard/views/View;Ljava/lang/Class;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;Ljavax/ws/rs/core/MediaType;)J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=6, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: ldc -1
lreturn
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 1 0 this Lio/dropwizard/views/ViewMessageBodyWriter;
0 1 1 t Lio/dropwizard/views/View;
0 1 2 type Ljava/lang/Class<*>;
0 1 3 genericType Ljava/lang/reflect/Type;
0 1 4 annotations [Ljava/lang/annotation/Annotation;
0 1 5 mediaType Ljavax/ws/rs/core/MediaType;
Signature: (Lio/dropwizard/views/View;Ljava/lang/Class<*>;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;Ljavax/ws/rs/core/MediaType;)J
MethodParameters:
Name Flags
t
type
genericType
annotations
mediaType
public void writeTo(io.dropwizard.views.View, java.lang.Class<?>, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>, java.io.OutputStream);
descriptor: (Lio/dropwizard/views/View;Ljava/lang/Class;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;Ljavax/ws/rs/core/MediaType;Ljavax/ws/rs/core/MultivaluedMap;Ljava/io/OutputStream;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=12, args_size=8
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 start local 6 start local 7 0: aload 0
getfield io.dropwizard.views.ViewMessageBodyWriter.metricRegistry:Lcom/codahale/metrics/MetricRegistry;
aload 1
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
iconst_1
anewarray java.lang.String
dup
iconst_0
ldc "rendering"
aastore
invokestatic com.codahale.metrics.MetricRegistry.name:(Ljava/lang/Class;[Ljava/lang/String;)Ljava/lang/String;
invokevirtual com.codahale.metrics.MetricRegistry.timer:(Ljava/lang/String;)Lcom/codahale/metrics/Timer;
invokevirtual com.codahale.metrics.Timer.time:()Lcom/codahale/metrics/Timer$Context;
astore 8
start local 8 1: aload 0
getfield io.dropwizard.views.ViewMessageBodyWriter.renderers:Ljava/lang/Iterable;
invokeinterface java.lang.Iterable.iterator:()Ljava/util/Iterator;
astore 10
goto 7
StackMap locals: io.dropwizard.views.ViewMessageBodyWriter io.dropwizard.views.View java.lang.Class java.lang.reflect.Type java.lang.annotation.Annotation[] javax.ws.rs.core.MediaType javax.ws.rs.core.MultivaluedMap java.io.OutputStream com.codahale.metrics.Timer$Context top java.util.Iterator
StackMap stack:
2: aload 10
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast io.dropwizard.views.ViewRenderer
astore 9
start local 9 3: aload 9
aload 1
invokeinterface io.dropwizard.views.ViewRenderer.isRenderable:(Lio/dropwizard/views/View;)Z
ifeq 7
4: aload 9
aload 1
aload 0
aload 0
getfield io.dropwizard.views.ViewMessageBodyWriter.headers:Ljavax/ws/rs/core/HttpHeaders;
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast javax.ws.rs.core.HttpHeaders
invokevirtual io.dropwizard.views.ViewMessageBodyWriter.detectLocale:(Ljavax/ws/rs/core/HttpHeaders;)Ljava/util/Locale;
aload 7
invokeinterface io.dropwizard.views.ViewRenderer.render:(Lio/dropwizard/views/View;Ljava/util/Locale;Ljava/io/OutputStream;)V
5: aload 8
invokevirtual com.codahale.metrics.Timer$Context.stop:()J
pop2
6: return
end local 9 7: StackMap locals:
StackMap stack:
aload 10
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
8: new io.dropwizard.views.ViewRenderException
dup
new java.lang.StringBuilder
dup
ldc "Unable to find a renderer for "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual io.dropwizard.views.View.getTemplateName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial io.dropwizard.views.ViewRenderException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals: io.dropwizard.views.ViewMessageBodyWriter io.dropwizard.views.View java.lang.Class java.lang.reflect.Type java.lang.annotation.Annotation[] javax.ws.rs.core.MediaType javax.ws.rs.core.MultivaluedMap java.io.OutputStream com.codahale.metrics.Timer$Context
StackMap stack: io.dropwizard.views.ViewRenderException
astore 9
start local 9 10: new javax.ws.rs.WebApplicationException
dup
aload 9
invokespecial javax.ws.rs.WebApplicationException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 9 11: StackMap locals:
StackMap stack: java.lang.Throwable
astore 11
12: aload 8
invokevirtual com.codahale.metrics.Timer$Context.stop:()J
pop2
13: aload 11
athrow
end local 8 end local 7 end local 6 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 14 0 this Lio/dropwizard/views/ViewMessageBodyWriter;
0 14 1 t Lio/dropwizard/views/View;
0 14 2 type Ljava/lang/Class<*>;
0 14 3 genericType Ljava/lang/reflect/Type;
0 14 4 annotations [Ljava/lang/annotation/Annotation;
0 14 5 mediaType Ljavax/ws/rs/core/MediaType;
0 14 6 httpHeaders Ljavax/ws/rs/core/MultivaluedMap<Ljava/lang/String;Ljava/lang/Object;>;
0 14 7 entityStream Ljava/io/OutputStream;
1 14 8 context Lcom/codahale/metrics/Timer$Context;
3 7 9 renderer Lio/dropwizard/views/ViewRenderer;
10 11 9 e Lio/dropwizard/views/ViewRenderException;
Exception table:
from to target type
1 5 9 Class io.dropwizard.views.ViewRenderException
7 9 9 Class io.dropwizard.views.ViewRenderException
1 5 11 any
7 11 11 any
Exceptions:
throws java.io.IOException
Signature: (Lio/dropwizard/views/View;Ljava/lang/Class<*>;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;Ljavax/ws/rs/core/MediaType;Ljavax/ws/rs/core/MultivaluedMap<Ljava/lang/String;Ljava/lang/Object;>;Ljava/io/OutputStream;)V
MethodParameters:
Name Flags
t
type
genericType
annotations
mediaType
httpHeaders
entityStream
protected java.util.Locale detectLocale(javax.ws.rs.core.HttpHeaders);
descriptor: (Ljavax/ws/rs/core/HttpHeaders;)Ljava/util/Locale;
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=5, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface javax.ws.rs.core.HttpHeaders.getAcceptableLanguages:()Ljava/util/List;
astore 2
start local 2 1: goto 4
end local 2 StackMap locals:
StackMap stack: org.glassfish.jersey.message.internal.HeaderValueException
2: astore 3
start local 3 3: new javax.ws.rs.WebApplicationException
dup
aload 3
invokevirtual org.glassfish.jersey.message.internal.HeaderValueException.getMessage:()Ljava/lang/String;
getstatic javax.ws.rs.core.Response$Status.BAD_REQUEST:Ljavax/ws/rs/core/Response$Status;
invokespecial javax.ws.rs.WebApplicationException.<init>:(Ljava/lang/String;Ljavax/ws/rs/core/Response$Status;)V
athrow
end local 3 start local 2 4: StackMap locals: java.util.List
StackMap stack:
aload 2
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 4
goto 8
StackMap locals: io.dropwizard.views.ViewMessageBodyWriter javax.ws.rs.core.HttpHeaders java.util.List top java.util.Iterator
StackMap stack:
5: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.util.Locale
astore 3
start local 3 6: aload 3
invokevirtual java.util.Locale.toString:()Ljava/lang/String;
ldc "*"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifne 8
7: aload 3
areturn
end local 3 8: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 5
9: invokestatic java.util.Locale.getDefault:()Ljava/util/Locale;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lio/dropwizard/views/ViewMessageBodyWriter;
0 10 1 headers Ljavax/ws/rs/core/HttpHeaders;
1 2 2 languages Ljava/util/List<Ljava/util/Locale;>;
4 10 2 languages Ljava/util/List<Ljava/util/Locale;>;
3 4 3 e Lorg/glassfish/jersey/message/internal/HeaderValueException;
6 8 3 locale Ljava/util/Locale;
Exception table:
from to target type
0 1 2 Class org.glassfish.jersey.message.internal.HeaderValueException
MethodParameters:
Name Flags
headers
java.lang.Iterable<io.dropwizard.views.ViewRenderer> getRenderers();
descriptor: ()Ljava/lang/Iterable;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.dropwizard.views.ViewMessageBodyWriter.renderers:Ljava/lang/Iterable;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/dropwizard/views/ViewMessageBodyWriter;
Signature: ()Ljava/lang/Iterable<Lio/dropwizard/views/ViewRenderer;>;
public void writeTo(java.lang.Object, java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, java.io.OutputStream);
descriptor: (Ljava/lang/Object;Ljava/lang/Class;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;Ljavax/ws/rs/core/MediaType;Ljavax/ws/rs/core/MultivaluedMap;Ljava/io/OutputStream;)V
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=8, locals=8, args_size=8
0: aload 0
aload 1
checkcast io.dropwizard.views.View
aload 2
aload 3
aload 4
aload 5
aload 6
aload 7
invokevirtual io.dropwizard.views.ViewMessageBodyWriter.writeTo:(Lio/dropwizard/views/View;Ljava/lang/Class;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;Ljavax/ws/rs/core/MediaType;Ljavax/ws/rs/core/MultivaluedMap;Ljava/io/OutputStream;)V
return
LocalVariableTable:
Start End Slot Name Signature
Exceptions:
throws java.io.IOException, javax.ws.rs.WebApplicationException
public long getSize(java.lang.Object, java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType);
descriptor: (Ljava/lang/Object;Ljava/lang/Class;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;Ljavax/ws/rs/core/MediaType;)J
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=6, locals=6, args_size=6
0: aload 0
aload 1
checkcast io.dropwizard.views.View
aload 2
aload 3
aload 4
aload 5
invokevirtual io.dropwizard.views.ViewMessageBodyWriter.getSize:(Lio/dropwizard/views/View;Ljava/lang/Class;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;Ljavax/ws/rs/core/MediaType;)J
lreturn
LocalVariableTable:
Start End Slot Name Signature
}
Signature: Ljava/lang/Object;Ljavax/ws/rs/ext/MessageBodyWriter<Lio/dropwizard/views/View;>;
SourceFile: "ViewMessageBodyWriter.java"
InnerClasses:
public Context = com.codahale.metrics.Timer$Context of com.codahale.metrics.Timer
public final Status = javax.ws.rs.core.Response$Status of javax.ws.rs.core.Response
RuntimeVisibleAnnotations:
javax.ws.rs.ext.Provider()
javax.ws.rs.Produces(value = {"text/html", "application/xhtml+xml"})