ResourceDecoderRegistry.smali
.class public Lcom/bumptech/glide/provider/ResourceDecoderRegistry;
.super Ljava/lang/Object;
.source "ResourceDecoderRegistry.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/bumptech/glide/provider/ResourceDecoderRegistry$Entry;
}
.end annotation
# instance fields
.field private final decoders:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/bumptech/glide/provider/ResourceDecoderRegistry$Entry<",
"**>;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.registers 2
.line 13
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 14
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/bumptech/glide/provider/ResourceDecoderRegistry;->decoders:Ljava/util/List;
return-void
.end method
# virtual methods
.method public declared-synchronized append(Lcom/bumptech/glide/load/ResourceDecoder;Ljava/lang/Class;Ljava/lang/Class;)V
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
"R:",
"Ljava/lang/Object;",
">(",
"Lcom/bumptech/glide/load/ResourceDecoder<",
"TT;TR;>;",
"Ljava/lang/Class<",
"TT;>;",
"Ljava/lang/Class<",
"TR;>;)V"
}
.end annotation
monitor-enter p0
.line 44
:try_start_1
iget-object v0, p0, Lcom/bumptech/glide/provider/ResourceDecoderRegistry;->decoders:Ljava/util/List;
new-instance v1, Lcom/bumptech/glide/provider/ResourceDecoderRegistry$Entry;
invoke-direct {v1, p2, p3, p1}, Lcom/bumptech/glide/provider/ResourceDecoderRegistry$Entry;-><init>(Ljava/lang/Class;Ljava/lang/Class;Lcom/bumptech/glide/load/ResourceDecoder;)V
invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:try_end_b
.catchall {:try_start_1 .. :try_end_b} :catchall_d
.line 45
monitor-exit p0
return-void
:catchall_d
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized getDecoders(Ljava/lang/Class;Ljava/lang/Class;)Ljava/util/List;
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
"R:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Class<",
"TT;>;",
"Ljava/lang/Class<",
"TR;>;)",
"Ljava/util/List<",
"Lcom/bumptech/glide/load/ResourceDecoder<",
"TT;TR;>;>;"
}
.end annotation
monitor-enter p0
.line 19
:try_start_1
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 20
iget-object v1, p0, Lcom/bumptech/glide/provider/ResourceDecoderRegistry;->decoders:Ljava/util/List;
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v1
:cond_c
:goto_c
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_24
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/bumptech/glide/provider/ResourceDecoderRegistry$Entry;
.line 21
invoke-virtual {v2, p1, p2}, Lcom/bumptech/glide/provider/ResourceDecoderRegistry$Entry;->handles(Ljava/lang/Class;Ljava/lang/Class;)Z
move-result v3
if-eqz v3, :cond_c
.line 22
iget-object v2, v2, Lcom/bumptech/glide/provider/ResourceDecoderRegistry$Entry;->decoder:Lcom/bumptech/glide/load/ResourceDecoder;
invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:try_end_23
.catchall {:try_start_1 .. :try_end_23} :catchall_26
goto :goto_c
.line 27
:cond_24
monitor-exit p0
return-object v0
:catchall_26
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized getResourceClasses(Ljava/lang/Class;Ljava/lang/Class;)Ljava/util/List;
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
"R:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Class<",
"TT;>;",
"Ljava/lang/Class<",
"TR;>;)",
"Ljava/util/List<",
"Ljava/lang/Class<",
"TR;>;>;"
}
.end annotation
monitor-enter p0
.line 33
:try_start_1
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 34
iget-object v1, p0, Lcom/bumptech/glide/provider/ResourceDecoderRegistry;->decoders:Ljava/util/List;
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v1
:cond_c
:goto_c
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_24
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/bumptech/glide/provider/ResourceDecoderRegistry$Entry;
.line 35
invoke-virtual {v2, p1, p2}, Lcom/bumptech/glide/provider/ResourceDecoderRegistry$Entry;->handles(Ljava/lang/Class;Ljava/lang/Class;)Z
move-result v3
if-eqz v3, :cond_c
.line 36
iget-object v2, v2, Lcom/bumptech/glide/provider/ResourceDecoderRegistry$Entry;->resourceClass:Ljava/lang/Class;
invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:try_end_23
.catchall {:try_start_1 .. :try_end_23} :catchall_26
goto :goto_c
.line 39
:cond_24
monitor-exit p0
return-object v0
:catchall_26
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized prepend(Lcom/bumptech/glide/load/ResourceDecoder;Ljava/lang/Class;Ljava/lang/Class;)V
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
"R:",
"Ljava/lang/Object;",
">(",
"Lcom/bumptech/glide/load/ResourceDecoder<",
"TT;TR;>;",
"Ljava/lang/Class<",
"TT;>;",
"Ljava/lang/Class<",
"TR;>;)V"
}
.end annotation
monitor-enter p0
.line 49
:try_start_1
iget-object v0, p0, Lcom/bumptech/glide/provider/ResourceDecoderRegistry;->decoders:Ljava/util/List;
const/4 v1, 0x0
new-instance v2, Lcom/bumptech/glide/provider/ResourceDecoderRegistry$Entry;
invoke-direct {v2, p2, p3, p1}, Lcom/bumptech/glide/provider/ResourceDecoderRegistry$Entry;-><init>(Ljava/lang/Class;Ljava/lang/Class;Lcom/bumptech/glide/load/ResourceDecoder;)V
invoke-interface {v0, v1, v2}, Ljava/util/List;->add(ILjava/lang/Object;)V
:try_end_c
.catchall {:try_start_1 .. :try_end_c} :catchall_e
.line 50
monitor-exit p0
return-void
:catchall_e
move-exception p1
monitor-exit p0
throw p1
.end method