tmap/smali_classes3/com/google/zxing/MultiFormatWriter.smali
2022-06-10 21:38:30 +09:00

492 lines
11 KiB
Smali

.class public final Lcom/google/zxing/MultiFormatWriter;
.super Ljava/lang/Object;
.source "MultiFormatWriter.java"
# interfaces
.implements Lcom/google/zxing/Writer;
# static fields
.field private static synthetic $SWITCH_TABLE$com$google$zxing$BarcodeFormat:[I
# direct methods
.method public static synthetic $SWITCH_TABLE$com$google$zxing$BarcodeFormat()[I
.locals 3
.line 1
sget-object v0, Lcom/google/zxing/MultiFormatWriter;->$SWITCH_TABLE$com$google$zxing$BarcodeFormat:[I
if-eqz v0, :cond_0
return-object v0
:cond_0
invoke-static {}, Lcom/google/zxing/BarcodeFormat;->values()[Lcom/google/zxing/BarcodeFormat;
move-result-object v0
array-length v0, v0
new-array v0, v0, [I
:try_start_0
sget-object v1, Lcom/google/zxing/BarcodeFormat;->AZTEC:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x1
aput v2, v0, v1
:try_end_0
.catch Ljava/lang/NoSuchFieldError; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
:try_start_1
sget-object v1, Lcom/google/zxing/BarcodeFormat;->CODABAR:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x2
aput v2, v0, v1
:try_end_1
.catch Ljava/lang/NoSuchFieldError; {:try_start_1 .. :try_end_1} :catch_1
:catch_1
:try_start_2
sget-object v1, Lcom/google/zxing/BarcodeFormat;->CODE_128:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x5
aput v2, v0, v1
:try_end_2
.catch Ljava/lang/NoSuchFieldError; {:try_start_2 .. :try_end_2} :catch_2
:catch_2
:try_start_3
sget-object v1, Lcom/google/zxing/BarcodeFormat;->CODE_39:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x3
aput v2, v0, v1
:try_end_3
.catch Ljava/lang/NoSuchFieldError; {:try_start_3 .. :try_end_3} :catch_3
:catch_3
:try_start_4
sget-object v1, Lcom/google/zxing/BarcodeFormat;->CODE_93:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x4
aput v2, v0, v1
:try_end_4
.catch Ljava/lang/NoSuchFieldError; {:try_start_4 .. :try_end_4} :catch_4
:catch_4
:try_start_5
sget-object v1, Lcom/google/zxing/BarcodeFormat;->DATA_MATRIX:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x6
aput v2, v0, v1
:try_end_5
.catch Ljava/lang/NoSuchFieldError; {:try_start_5 .. :try_end_5} :catch_5
:catch_5
:try_start_6
sget-object v1, Lcom/google/zxing/BarcodeFormat;->EAN_13:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/16 v2, 0x8
aput v2, v0, v1
:try_end_6
.catch Ljava/lang/NoSuchFieldError; {:try_start_6 .. :try_end_6} :catch_6
:catch_6
:try_start_7
sget-object v1, Lcom/google/zxing/BarcodeFormat;->EAN_8:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x7
aput v2, v0, v1
:try_end_7
.catch Ljava/lang/NoSuchFieldError; {:try_start_7 .. :try_end_7} :catch_7
:catch_7
:try_start_8
sget-object v1, Lcom/google/zxing/BarcodeFormat;->ITF:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/16 v2, 0x9
aput v2, v0, v1
:try_end_8
.catch Ljava/lang/NoSuchFieldError; {:try_start_8 .. :try_end_8} :catch_8
:catch_8
:try_start_9
sget-object v1, Lcom/google/zxing/BarcodeFormat;->MAXICODE:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/16 v2, 0xa
aput v2, v0, v1
:try_end_9
.catch Ljava/lang/NoSuchFieldError; {:try_start_9 .. :try_end_9} :catch_9
:catch_9
:try_start_a
sget-object v1, Lcom/google/zxing/BarcodeFormat;->PDF_417:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/16 v2, 0xb
aput v2, v0, v1
:try_end_a
.catch Ljava/lang/NoSuchFieldError; {:try_start_a .. :try_end_a} :catch_a
:catch_a
:try_start_b
sget-object v1, Lcom/google/zxing/BarcodeFormat;->QR_CODE:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/16 v2, 0xc
aput v2, v0, v1
:try_end_b
.catch Ljava/lang/NoSuchFieldError; {:try_start_b .. :try_end_b} :catch_b
:catch_b
:try_start_c
sget-object v1, Lcom/google/zxing/BarcodeFormat;->RSS_14:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/16 v2, 0xd
aput v2, v0, v1
:try_end_c
.catch Ljava/lang/NoSuchFieldError; {:try_start_c .. :try_end_c} :catch_c
:catch_c
:try_start_d
sget-object v1, Lcom/google/zxing/BarcodeFormat;->RSS_EXPANDED:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/16 v2, 0xe
aput v2, v0, v1
:try_end_d
.catch Ljava/lang/NoSuchFieldError; {:try_start_d .. :try_end_d} :catch_d
:catch_d
:try_start_e
sget-object v1, Lcom/google/zxing/BarcodeFormat;->UPC_A:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/16 v2, 0xf
aput v2, v0, v1
:try_end_e
.catch Ljava/lang/NoSuchFieldError; {:try_start_e .. :try_end_e} :catch_e
:catch_e
:try_start_f
sget-object v1, Lcom/google/zxing/BarcodeFormat;->UPC_E:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/16 v2, 0x10
aput v2, v0, v1
:try_end_f
.catch Ljava/lang/NoSuchFieldError; {:try_start_f .. :try_end_f} :catch_f
:catch_f
:try_start_10
sget-object v1, Lcom/google/zxing/BarcodeFormat;->UPC_EAN_EXTENSION:Lcom/google/zxing/BarcodeFormat;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/16 v2, 0x11
aput v2, v0, v1
:try_end_10
.catch Ljava/lang/NoSuchFieldError; {:try_start_10 .. :try_end_10} :catch_10
:catch_10
sput-object v0, Lcom/google/zxing/MultiFormatWriter;->$SWITCH_TABLE$com$google$zxing$BarcodeFormat:[I
return-object v0
.end method
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public encode(Ljava/lang/String;Lcom/google/zxing/BarcodeFormat;II)Lcom/google/zxing/common/BitMatrix;
.locals 6
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/WriterException;
}
.end annotation
const/4 v5, 0x0
move-object v0, p0
move-object v1, p1
move-object v2, p2
move v3, p3
move v4, p4
.line 1
invoke-virtual/range {v0 .. v5}, Lcom/google/zxing/MultiFormatWriter;->encode(Ljava/lang/String;Lcom/google/zxing/BarcodeFormat;IILjava/util/Map;)Lcom/google/zxing/common/BitMatrix;
move-result-object p1
return-object p1
.end method
.method public encode(Ljava/lang/String;Lcom/google/zxing/BarcodeFormat;IILjava/util/Map;)Lcom/google/zxing/common/BitMatrix;
.locals 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Lcom/google/zxing/BarcodeFormat;",
"II",
"Ljava/util/Map<",
"Lcom/google/zxing/EncodeHintType;",
"*>;)",
"Lcom/google/zxing/common/BitMatrix;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/WriterException;
}
.end annotation
.line 2
invoke-static {}, Lcom/google/zxing/MultiFormatWriter;->$SWITCH_TABLE$com$google$zxing$BarcodeFormat()[I
move-result-object v0
invoke-virtual {p2}, Ljava/lang/Enum;->ordinal()I
move-result v1
aget v0, v0, v1
const/4 v1, 0x2
if-eq v0, v1, :cond_8
const/4 v1, 0x3
if-eq v0, v1, :cond_7
const/4 v1, 0x5
if-eq v0, v1, :cond_6
const/16 v1, 0xf
if-eq v0, v1, :cond_5
const/4 v1, 0x7
if-eq v0, v1, :cond_4
const/16 v1, 0x8
if-eq v0, v1, :cond_3
const/16 v1, 0x9
if-eq v0, v1, :cond_2
const/16 v1, 0xb
if-eq v0, v1, :cond_1
const/16 v1, 0xc
if-ne v0, v1, :cond_0
.line 3
new-instance v0, Lcom/google/zxing/qrcode/QRCodeWriter;
invoke-direct {v0}, Lcom/google/zxing/qrcode/QRCodeWriter;-><init>()V
goto :goto_0
.line 4
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
new-instance p3, Ljava/lang/StringBuilder;
const-string p4, "No encoder available for format "
invoke-direct {p3, p4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.line 5
:cond_1
new-instance v0, Lcom/google/zxing/pdf417/encoder/PDF417Writer;
invoke-direct {v0}, Lcom/google/zxing/pdf417/encoder/PDF417Writer;-><init>()V
goto :goto_0
.line 6
:cond_2
new-instance v0, Lcom/google/zxing/oned/ITFWriter;
invoke-direct {v0}, Lcom/google/zxing/oned/ITFWriter;-><init>()V
goto :goto_0
.line 7
:cond_3
new-instance v0, Lcom/google/zxing/oned/EAN13Writer;
invoke-direct {v0}, Lcom/google/zxing/oned/EAN13Writer;-><init>()V
goto :goto_0
.line 8
:cond_4
new-instance v0, Lcom/google/zxing/oned/EAN8Writer;
invoke-direct {v0}, Lcom/google/zxing/oned/EAN8Writer;-><init>()V
goto :goto_0
.line 9
:cond_5
new-instance v0, Lcom/google/zxing/oned/UPCAWriter;
invoke-direct {v0}, Lcom/google/zxing/oned/UPCAWriter;-><init>()V
goto :goto_0
.line 10
:cond_6
new-instance v0, Lcom/google/zxing/oned/Code128Writer;
invoke-direct {v0}, Lcom/google/zxing/oned/Code128Writer;-><init>()V
goto :goto_0
.line 11
:cond_7
new-instance v0, Lcom/google/zxing/oned/Code39Writer;
invoke-direct {v0}, Lcom/google/zxing/oned/Code39Writer;-><init>()V
goto :goto_0
.line 12
:cond_8
new-instance v0, Lcom/google/zxing/oned/CodaBarWriter;
invoke-direct {v0}, Lcom/google/zxing/oned/CodaBarWriter;-><init>()V
:goto_0
move-object v1, v0
move-object v2, p1
move-object v3, p2
move v4, p3
move v5, p4
move-object v6, p5
.line 13
invoke-interface/range {v1 .. v6}, Lcom/google/zxing/Writer;->encode(Ljava/lang/String;Lcom/google/zxing/BarcodeFormat;IILjava/util/Map;)Lcom/google/zxing/common/BitMatrix;
move-result-object p1
return-object p1
.end method