g.smali
.class public final Lep/g;
.super Ljava/lang/Object;
.source "JavaFile.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lep/g$b;
}
.end annotation
# static fields
.field public static final g:Ljava/lang/Appendable;
# instance fields
.field public final a:Lep/d;
.field public final b:Ljava/lang/String;
.field public final c:Lcom/squareup/javapoet/TypeSpec;
.field public final d:Z
.field public final e:Ljava/util/Set;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Set<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
.field public final f:Ljava/lang/String;
# direct methods
.method public static constructor <clinit>()V
.registers 1
new-instance v0, Lep/g$a;
invoke-direct {v0}, Lep/g$a;-><init>()V
sput-object v0, Lep/g;->g:Ljava/lang/Appendable;
return-void
.end method
.method public constructor <init>(Lep/g$b;)V
.registers 3
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
invoke-static {p1}, Lep/g$b;->a(Lep/g$b;)Lep/d$b;
move-result-object v0
invoke-virtual {v0}, Lep/d$b;->a()Lep/d;
move-result-object v0
iput-object v0, p0, Lep/g;->a:Lep/d;
invoke-static {p1}, Lep/g$b;->b(Lep/g$b;)Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lep/g;->b:Ljava/lang/String;
invoke-static {p1}, Lep/g$b;->c(Lep/g$b;)Lcom/squareup/javapoet/TypeSpec;
move-result-object v0
iput-object v0, p0, Lep/g;->c:Lcom/squareup/javapoet/TypeSpec;
invoke-static {p1}, Lep/g$b;->d(Lep/g$b;)Z
move-result v0
iput-boolean v0, p0, Lep/g;->d:Z
invoke-static {p1}, Lep/g$b;->e(Lep/g$b;)Ljava/util/Set;
move-result-object v0
invoke-static {v0}, Lep/m;->c(Ljava/util/Collection;)Ljava/util/Set;
move-result-object v0
iput-object v0, p0, Lep/g;->e:Ljava/util/Set;
invoke-static {p1}, Lep/g$b;->f(Lep/g$b;)Ljava/lang/String;
move-result-object p1
iput-object p1, p0, Lep/g;->f:Ljava/lang/String;
return-void
.end method
.method public synthetic constructor <init>(Lep/g$b;Lep/g$a;)V
.registers 3
invoke-direct {p0, p1}, Lep/g;-><init>(Lep/g$b;)V
return-void
.end method
.method public static a(Ljava/lang/String;Lcom/squareup/javapoet/TypeSpec;)Lep/g$b;
.registers 5
const/4 v0, 0x0
new-array v1, v0, [Ljava/lang/Object;
const-string v2, "packageName == null"
invoke-static {p0, v2, v1}, Lep/m;->a(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;
new-array v0, v0, [Ljava/lang/Object;
const-string v1, "typeSpec == null"
invoke-static {p1, v1, v0}, Lep/m;->a(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;
new-instance v0, Lep/g$b;
const/4 v1, 0x0
invoke-direct {v0, p0, p1, v1}, Lep/g$b;-><init>(Ljava/lang/String;Lcom/squareup/javapoet/TypeSpec;Lep/g$a;)V
return-object v0
.end method
# virtual methods
.method public final a(Lep/e;)V
.registers 10
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lep/g;->b:Ljava/lang/String;
invoke-virtual {p1, v0}, Lep/e;->c(Ljava/lang/String;)Lep/e;
iget-object v0, p0, Lep/g;->a:Lep/d;
invoke-virtual {v0}, Lep/d;->a()Z
move-result v0
if-nez v0, :cond_12
iget-object v0, p0, Lep/g;->a:Lep/d;
invoke-virtual {p1, v0}, Lep/e;->b(Lep/d;)V
:cond_12
iget-object v0, p0, Lep/g;->b:Ljava/lang/String;
invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z
move-result v0
const-string v1, "\n"
const/4 v2, 0x0
const/4 v3, 0x1
if-nez v0, :cond_2c
new-array v0, v3, [Ljava/lang/Object;
iget-object v4, p0, Lep/g;->b:Ljava/lang/String;
aput-object v4, v0, v2
const-string v4, "package $L;\n"
invoke-virtual {p1, v4, v0}, Lep/e;->a(Ljava/lang/String;[Ljava/lang/Object;)Lep/e;
invoke-virtual {p1, v1}, Lep/e;->a(Ljava/lang/String;)Lep/e;
:cond_2c
iget-object v0, p0, Lep/g;->e:Ljava/util/Set;
invoke-interface {v0}, Ljava/util/Set;->isEmpty()Z
move-result v0
if-nez v0, :cond_53
iget-object v0, p0, Lep/g;->e:Ljava/util/Set;
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_3a
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_50
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v4
check-cast v4, Ljava/lang/String;
new-array v5, v3, [Ljava/lang/Object;
aput-object v4, v5, v2
const-string v4, "import static $L;\n"
invoke-virtual {p1, v4, v5}, Lep/e;->a(Ljava/lang/String;[Ljava/lang/Object;)Lep/e;
goto :goto_3a
:cond_50
invoke-virtual {p1, v1}, Lep/e;->a(Ljava/lang/String;)Lep/e;
:cond_53
new-instance v0, Ljava/util/TreeSet;
invoke-virtual {p1}, Lep/e;->b()Ljava/util/Map;
move-result-object v4
invoke-interface {v4}, Ljava/util/Map;->values()Ljava/util/Collection;
move-result-object v4
invoke-direct {v0, v4}, Ljava/util/TreeSet;-><init>(Ljava/util/Collection;)V
invoke-virtual {v0}, Ljava/util/TreeSet;->iterator()Ljava/util/Iterator;
move-result-object v0
const/4 v4, 0x0
:goto_65
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v5
if-eqz v5, :cond_8e
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v5
check-cast v5, Lep/c;
iget-boolean v6, p0, Lep/g;->d:Z
if-eqz v6, :cond_82
invoke-virtual {v5}, Lep/c;->f()Ljava/lang/String;
move-result-object v6
const-string v7, "java.lang"
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_82
goto :goto_65
:cond_82
new-array v6, v3, [Ljava/lang/Object;
aput-object v5, v6, v2
const-string v5, "import $L;\n"
invoke-virtual {p1, v5, v6}, Lep/e;->a(Ljava/lang/String;[Ljava/lang/Object;)Lep/e;
add-int/lit8 v4, v4, 0x1
goto :goto_65
:cond_8e
if-lez v4, :cond_93
invoke-virtual {p1, v1}, Lep/e;->a(Ljava/lang/String;)Lep/e;
:cond_93
iget-object v0, p0, Lep/g;->c:Lcom/squareup/javapoet/TypeSpec;
const/4 v1, 0x0
invoke-static {}, Ljava/util/Collections;->emptySet()Ljava/util/Set;
move-result-object v2
invoke-virtual {v0, p1, v1, v2}, Lcom/squareup/javapoet/TypeSpec;->a(Lep/e;Ljava/lang/String;Ljava/util/Set;)V
invoke-virtual {p1}, Lep/e;->d()Lep/e;
return-void
.end method
.method public a(Ljava/lang/Appendable;)V
.registers 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
new-instance v0, Lep/e;
sget-object v1, Lep/g;->g:Ljava/lang/Appendable;
iget-object v2, p0, Lep/g;->f:Ljava/lang/String;
iget-object v3, p0, Lep/g;->e:Ljava/util/Set;
invoke-direct {v0, v1, v2, v3}, Lep/e;-><init>(Ljava/lang/Appendable;Ljava/lang/String;Ljava/util/Set;)V
invoke-virtual {p0, v0}, Lep/g;->a(Lep/e;)V
invoke-virtual {v0}, Lep/e;->f()Ljava/util/Map;
move-result-object v0
new-instance v1, Lep/e;
iget-object v2, p0, Lep/g;->f:Ljava/lang/String;
iget-object v3, p0, Lep/g;->e:Ljava/util/Set;
invoke-direct {v1, p1, v2, v0, v3}, Lep/e;-><init>(Ljava/lang/Appendable;Ljava/lang/String;Ljava/util/Map;Ljava/util/Set;)V
invoke-virtual {p0, v1}, Lep/g;->a(Lep/e;)V
return-void
.end method
.method public a(Ljavax/annotation/processing/Filer;)V
.registers 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lep/g;->b:Ljava/lang/String;
invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z
move-result v0
if-eqz v0, :cond_d
iget-object v0, p0, Lep/g;->c:Lcom/squareup/javapoet/TypeSpec;
iget-object v0, v0, Lcom/squareup/javapoet/TypeSpec;->b:Ljava/lang/String;
goto :goto_27
:cond_d
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
iget-object v1, p0, Lep/g;->b:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, "."
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lep/g;->c:Lcom/squareup/javapoet/TypeSpec;
iget-object v1, v1, Lcom/squareup/javapoet/TypeSpec;->b:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
:goto_27
iget-object v1, p0, Lep/g;->c:Lcom/squareup/javapoet/TypeSpec;
iget-object v1, v1, Lcom/squareup/javapoet/TypeSpec;->p:Ljava/util/List;
invoke-interface {v1}, Ljava/util/List;->size()I
move-result v2
new-array v2, v2, [Ljavax/lang/model/element/Element;
invoke-interface {v1, v2}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object v1
check-cast v1, [Ljavax/lang/model/element/Element;
invoke-interface {p1, v0, v1}, Ljavax/annotation/processing/Filer;->createSourceFile(Ljava/lang/CharSequence;[Ljavax/lang/model/element/Element;)Ljavax/tools/JavaFileObject;
move-result-object p1
:try_start_3b
invoke-interface {p1}, Ljavax/tools/JavaFileObject;->openWriter()Ljava/io/Writer;
move-result-object v0
:try_end_3f
.catch Ljava/lang/Exception; {:try_start_3b .. :try_end_3f} :catch_56
:try_start_3f
invoke-virtual {p0, v0}, Lep/g;->a(Ljava/lang/Appendable;)V
:try_end_42
.catchall {:try_start_3f .. :try_end_42} :catchall_48
if-eqz v0, :cond_47
:try_start_44
invoke-virtual {v0}, Ljava/io/Writer;->close()V
:try_end_47
.catch Ljava/lang/Exception; {:try_start_44 .. :try_end_47} :catch_56
:cond_47
return-void
:catchall_48
move-exception v1
:try_start_49
throw v1
:try_end_4a
.catchall {:try_start_49 .. :try_end_4a} :catchall_4a
:catchall_4a
move-exception v2
if-eqz v0, :cond_55
:try_start_4d
invoke-virtual {v0}, Ljava/io/Writer;->close()V
:try_end_50
.catchall {:try_start_4d .. :try_end_50} :catchall_51
goto :goto_55
:catchall_51
move-exception v0
:try_start_52
invoke-virtual {v1, v0}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V
:cond_55
:goto_55
throw v2
:try_end_56
.catch Ljava/lang/Exception; {:try_start_52 .. :try_end_56} :catch_56
:catch_56
move-exception v0
:try_start_57
invoke-interface {p1}, Ljavax/tools/JavaFileObject;->delete()Z
:try_end_5a
.catch Ljava/lang/Exception; {:try_start_57 .. :try_end_5a} :catch_5a
:catch_5a
throw v0
.end method
.method public equals(Ljava/lang/Object;)Z
.registers 5
if-ne p0, p1, :cond_4
const/4 p1, 0x1
return p1
:cond_4
const/4 v0, 0x0
if-nez p1, :cond_8
return v0
:cond_8
const-class v1, Lep/g;
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v2
if-eq v1, v2, :cond_11
return v0
:cond_11
invoke-virtual {p0}, Lep/g;->toString()Ljava/lang/String;
move-result-object v0
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p1
return p1
.end method
.method public hashCode()I
.registers 2
invoke-virtual {p0}, Lep/g;->toString()Ljava/lang/String;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
move-result v0
return v0
.end method
.method public toString()Ljava/lang/String;
.registers 2
:try_start_0
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {p0, v0}, Lep/g;->a(Ljava/lang/Appendable;)V
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
:try_end_c
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_c} :catch_d
return-object v0
:catch_d
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
throw v0
.end method