MultiTransformation.smali
.class public Lcom/bumptech/glide/load/MultiTransformation;
.super Ljava/lang/Object;
.source "MultiTransformation.java"
# interfaces
.implements Lcom/bumptech/glide/load/Transformation;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Lcom/bumptech/glide/load/Transformation<",
"TT;>;"
}
.end annotation
# instance fields
.field private final transformations:Ljava/util/Collection;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Collection<",
"+",
"Lcom/bumptech/glide/load/Transformation<",
"TT;>;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Ljava/util/Collection;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Collection<",
"+",
"Lcom/bumptech/glide/load/Transformation<",
"TT;>;>;)V"
}
.end annotation
.line 28
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 29
invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z
move-result v0
if-nez v0, :cond_c
.line 33
iput-object p1, p0, Lcom/bumptech/glide/load/MultiTransformation;->transformations:Ljava/util/Collection;
return-void
.line 30
:cond_c
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "MultiTransformation must contain at least one Transformation"
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public varargs constructor <init>([Lcom/bumptech/glide/load/Transformation;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"([",
"Lcom/bumptech/glide/load/Transformation<",
"TT;>;)V"
}
.end annotation
.annotation runtime Ljava/lang/SafeVarargs;
.end annotation
.line 20
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 21
array-length v0, p1
if-eqz v0, :cond_d
.line 25
invoke-static {p1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
move-result-object p1
iput-object p1, p0, Lcom/bumptech/glide/load/MultiTransformation;->transformations:Ljava/util/Collection;
return-void
.line 22
:cond_d
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "MultiTransformation must contain at least one Transformation"
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
# virtual methods
.method public equals(Ljava/lang/Object;)Z
.registers 3
.line 54
instance-of v0, p1, Lcom/bumptech/glide/load/MultiTransformation;
if-eqz v0, :cond_f
.line 55
check-cast p1, Lcom/bumptech/glide/load/MultiTransformation;
.line 56
iget-object v0, p0, Lcom/bumptech/glide/load/MultiTransformation;->transformations:Ljava/util/Collection;
iget-object p1, p1, Lcom/bumptech/glide/load/MultiTransformation;->transformations:Ljava/util/Collection;
invoke-interface {v0, p1}, Ljava/util/Collection;->equals(Ljava/lang/Object;)Z
move-result p1
return p1
:cond_f
const/4 p1, 0x0
return p1
.end method
.method public hashCode()I
.registers 2
.line 63
iget-object v0, p0, Lcom/bumptech/glide/load/MultiTransformation;->transformations:Ljava/util/Collection;
invoke-interface {v0}, Ljava/util/Collection;->hashCode()I
move-result v0
return v0
.end method
.method public transform(Landroid/content/Context;Lcom/bumptech/glide/load/engine/Resource;II)Lcom/bumptech/glide/load/engine/Resource;
.registers 9
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/content/Context;",
"Lcom/bumptech/glide/load/engine/Resource<",
"TT;>;II)",
"Lcom/bumptech/glide/load/engine/Resource<",
"TT;>;"
}
.end annotation
.line 42
iget-object v0, p0, Lcom/bumptech/glide/load/MultiTransformation;->transformations:Ljava/util/Collection;
invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v0
move-object v1, p2
:goto_7
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_2a
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/bumptech/glide/load/Transformation;
.line 43
invoke-interface {v2, p1, v1, p3, p4}, Lcom/bumptech/glide/load/Transformation;->transform(Landroid/content/Context;Lcom/bumptech/glide/load/engine/Resource;II)Lcom/bumptech/glide/load/engine/Resource;
move-result-object v2
if-eqz v1, :cond_28
.line 44
invoke-virtual {v1, p2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v3
if-nez v3, :cond_28
invoke-virtual {v1, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v3
if-nez v3, :cond_28
.line 45
invoke-interface {v1}, Lcom/bumptech/glide/load/engine/Resource;->recycle()V
:cond_28
move-object v1, v2
goto :goto_7
:cond_2a
return-object v1
.end method
.method public updateDiskCacheKey(Ljava/security/MessageDigest;)V
.registers 4
.line 68
iget-object v0, p0, Lcom/bumptech/glide/load/MultiTransformation;->transformations:Ljava/util/Collection;
invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_6
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_16
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/bumptech/glide/load/Transformation;
.line 69
invoke-interface {v1, p1}, Lcom/bumptech/glide/load/Transformation;->updateDiskCacheKey(Ljava/security/MessageDigest;)V
goto :goto_6
:cond_16
return-void
.end method