.class public final Lio/sentry/SentryEnvelopeItemHeader; .super Ljava/lang/Object; .source "SentryEnvelopeItemHeader.java" # interfaces .implements Lio/sentry/JsonSerializable; .implements Lio/sentry/JsonUnknown; # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lio/sentry/SentryEnvelopeItemHeader$JsonKeys;, Lio/sentry/SentryEnvelopeItemHeader$Deserializer; } .end annotation # instance fields .field private final attachmentType:Ljava/lang/String; .field private final contentType:Ljava/lang/String; .field private final fileName:Ljava/lang/String; .field private final getLength:Ljava/util/concurrent/Callable; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/concurrent/Callable<", "Ljava/lang/Integer;", ">;" } .end annotation .end field .field private final length:I .field private final type:Lio/sentry/SentryItemType; .field private unknown:Ljava/util/Map; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/Map<", "Ljava/lang/String;", "Ljava/lang/Object;", ">;" } .end annotation .end field # direct methods .method public constructor (Lio/sentry/SentryItemType;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V .locals 1 .line 55 invoke-direct {p0}, Ljava/lang/Object;->()V const-string v0, "type is required" .line 56 invoke-static {p1, v0}, Lio/sentry/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; move-result-object p1 check-cast p1, Lio/sentry/SentryItemType; iput-object p1, p0, Lio/sentry/SentryEnvelopeItemHeader;->type:Lio/sentry/SentryItemType; iput-object p3, p0, Lio/sentry/SentryEnvelopeItemHeader;->contentType:Ljava/lang/String; iput p2, p0, Lio/sentry/SentryEnvelopeItemHeader;->length:I iput-object p4, p0, Lio/sentry/SentryEnvelopeItemHeader;->fileName:Ljava/lang/String; const/4 p1, 0x0 iput-object p1, p0, Lio/sentry/SentryEnvelopeItemHeader;->getLength:Ljava/util/concurrent/Callable; iput-object p5, p0, Lio/sentry/SentryEnvelopeItemHeader;->attachmentType:Ljava/lang/String; return-void .end method .method constructor (Lio/sentry/SentryItemType;Ljava/util/concurrent/Callable;Ljava/lang/String;Ljava/lang/String;)V .locals 6 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lio/sentry/SentryItemType;", "Ljava/util/concurrent/Callable<", "Ljava/lang/Integer;", ">;", "Ljava/lang/String;", "Ljava/lang/String;", ")V" } .end annotation const/4 v5, 0x0 move-object v0, p0 move-object v1, p1 move-object v2, p2 move-object v3, p3 move-object v4, p4 .line 83 invoke-direct/range {v0 .. v5}, Lio/sentry/SentryEnvelopeItemHeader;->(Lio/sentry/SentryItemType;Ljava/util/concurrent/Callable;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V return-void .end method .method constructor (Lio/sentry/SentryItemType;Ljava/util/concurrent/Callable;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lio/sentry/SentryItemType;", "Ljava/util/concurrent/Callable<", "Ljava/lang/Integer;", ">;", "Ljava/lang/String;", "Ljava/lang/String;", "Ljava/lang/String;", ")V" } .end annotation .line 69 invoke-direct {p0}, Ljava/lang/Object;->()V const-string v0, "type is required" .line 70 invoke-static {p1, v0}, Lio/sentry/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; move-result-object p1 check-cast p1, Lio/sentry/SentryItemType; iput-object p1, p0, Lio/sentry/SentryEnvelopeItemHeader;->type:Lio/sentry/SentryItemType; iput-object p3, p0, Lio/sentry/SentryEnvelopeItemHeader;->contentType:Ljava/lang/String; const/4 p1, -0x1 iput p1, p0, Lio/sentry/SentryEnvelopeItemHeader;->length:I iput-object p4, p0, Lio/sentry/SentryEnvelopeItemHeader;->fileName:Ljava/lang/String; iput-object p2, p0, Lio/sentry/SentryEnvelopeItemHeader;->getLength:Ljava/util/concurrent/Callable; iput-object p5, p0, Lio/sentry/SentryEnvelopeItemHeader;->attachmentType:Ljava/lang/String; return-void .end method # virtual methods .method public getAttachmentType()Ljava/lang/String; .locals 0 iget-object p0, p0, Lio/sentry/SentryEnvelopeItemHeader;->attachmentType:Ljava/lang/String; return-object p0 .end method .method public getContentType()Ljava/lang/String; .locals 0 iget-object p0, p0, Lio/sentry/SentryEnvelopeItemHeader;->contentType:Ljava/lang/String; return-object p0 .end method .method public getFileName()Ljava/lang/String; .locals 0 iget-object p0, p0, Lio/sentry/SentryEnvelopeItemHeader;->fileName:Ljava/lang/String; return-object p0 .end method .method public getLength()I .locals 1 iget-object v0, p0, Lio/sentry/SentryEnvelopeItemHeader;->getLength:Ljava/util/concurrent/Callable; if-eqz v0, :cond_0 .line 32 :try_start_0 invoke-interface {v0}, Ljava/util/concurrent/Callable;->call()Ljava/lang/Object; move-result-object p0 check-cast p0, Ljava/lang/Integer; invoke-virtual {p0}, Ljava/lang/Integer;->intValue()I move-result p0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 return p0 :catchall_0 const/4 p0, -0x1 return p0 :cond_0 iget p0, p0, Lio/sentry/SentryEnvelopeItemHeader;->length:I return p0 .end method .method public getType()Lio/sentry/SentryItemType; .locals 0 iget-object p0, p0, Lio/sentry/SentryEnvelopeItemHeader;->type:Lio/sentry/SentryItemType; return-object p0 .end method .method public getUnknown()Ljava/util/Map; .locals 0 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/Map<", "Ljava/lang/String;", "Ljava/lang/Object;", ">;" } .end annotation iget-object p0, p0, Lio/sentry/SentryEnvelopeItemHeader;->unknown:Ljava/util/Map; return-object p0 .end method .method public serialize(Lio/sentry/ObjectWriter;Lio/sentry/ILogger;)V .locals 3 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 108 invoke-interface {p1}, Lio/sentry/ObjectWriter;->beginObject()Lio/sentry/ObjectWriter; iget-object v0, p0, Lio/sentry/SentryEnvelopeItemHeader;->contentType:Ljava/lang/String; if-eqz v0, :cond_0 const-string v0, "content_type" .line 110 invoke-interface {p1, v0}, Lio/sentry/ObjectWriter;->name(Ljava/lang/String;)Lio/sentry/ObjectWriter; move-result-object v0 iget-object v1, p0, Lio/sentry/SentryEnvelopeItemHeader;->contentType:Ljava/lang/String; invoke-interface {v0, v1}, Lio/sentry/ObjectWriter;->value(Ljava/lang/String;)Lio/sentry/ObjectWriter; :cond_0 iget-object v0, p0, Lio/sentry/SentryEnvelopeItemHeader;->fileName:Ljava/lang/String; if-eqz v0, :cond_1 const-string v0, "filename" .line 113 invoke-interface {p1, v0}, Lio/sentry/ObjectWriter;->name(Ljava/lang/String;)Lio/sentry/ObjectWriter; move-result-object v0 iget-object v1, p0, Lio/sentry/SentryEnvelopeItemHeader;->fileName:Ljava/lang/String; invoke-interface {v0, v1}, Lio/sentry/ObjectWriter;->value(Ljava/lang/String;)Lio/sentry/ObjectWriter; :cond_1 const-string v0, "type" .line 115 invoke-interface {p1, v0}, Lio/sentry/ObjectWriter;->name(Ljava/lang/String;)Lio/sentry/ObjectWriter; move-result-object v0 iget-object v1, p0, Lio/sentry/SentryEnvelopeItemHeader;->type:Lio/sentry/SentryItemType; invoke-interface {v0, p2, v1}, Lio/sentry/ObjectWriter;->value(Lio/sentry/ILogger;Ljava/lang/Object;)Lio/sentry/ObjectWriter; iget-object v0, p0, Lio/sentry/SentryEnvelopeItemHeader;->attachmentType:Ljava/lang/String; if-eqz v0, :cond_2 const-string v0, "attachment_type" .line 117 invoke-interface {p1, v0}, Lio/sentry/ObjectWriter;->name(Ljava/lang/String;)Lio/sentry/ObjectWriter; move-result-object v0 iget-object v1, p0, Lio/sentry/SentryEnvelopeItemHeader;->attachmentType:Ljava/lang/String; invoke-interface {v0, v1}, Lio/sentry/ObjectWriter;->value(Ljava/lang/String;)Lio/sentry/ObjectWriter; :cond_2 const-string v0, "length" .line 119 invoke-interface {p1, v0}, Lio/sentry/ObjectWriter;->name(Ljava/lang/String;)Lio/sentry/ObjectWriter; move-result-object v0 invoke-virtual {p0}, Lio/sentry/SentryEnvelopeItemHeader;->getLength()I move-result v1 int-to-long v1, v1 invoke-interface {v0, v1, v2}, Lio/sentry/ObjectWriter;->value(J)Lio/sentry/ObjectWriter; iget-object v0, p0, Lio/sentry/SentryEnvelopeItemHeader;->unknown:Ljava/util/Map; if-eqz v0, :cond_3 .line 121 invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set; move-result-object v0 invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object v0 :goto_0 invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_3 invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v1 check-cast v1, Ljava/lang/String; iget-object v2, p0, Lio/sentry/SentryEnvelopeItemHeader;->unknown:Ljava/util/Map; .line 122 invoke-interface {v2, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v2 .line 123 invoke-interface {p1, v1}, Lio/sentry/ObjectWriter;->name(Ljava/lang/String;)Lio/sentry/ObjectWriter; .line 124 invoke-interface {p1, p2, v2}, Lio/sentry/ObjectWriter;->value(Lio/sentry/ILogger;Ljava/lang/Object;)Lio/sentry/ObjectWriter; goto :goto_0 .line 127 :cond_3 invoke-interface {p1}, Lio/sentry/ObjectWriter;->endObject()Lio/sentry/ObjectWriter; return-void .end method .method public setUnknown(Ljava/util/Map;)V .locals 0 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Map<", "Ljava/lang/String;", "Ljava/lang/Object;", ">;)V" } .end annotation iput-object p1, p0, Lio/sentry/SentryEnvelopeItemHeader;->unknown:Ljava/util/Map; return-void .end method