granularity level: instruction
.class public final Lcom/google/android/datatransport/runtime/dagger/internal/Preconditions;
.super Ljava/lang/Object;
.source "Preconditions.java"
.method private constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static checkBuilderRequirement(Ljava/lang/Object;Ljava/lang/Class;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;",
"Ljava/lang/Class<",
"TT;>;)V"
}
.end annotation
if-eqz p0, :cond_0
return-void
:cond_0
new-instance p0, Ljava/lang/IllegalStateException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {p1}, Ljava/lang/Class;->getCanonicalName()Ljava/lang/String;
move-result-object p1
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, " must be set"
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;)TT;"
}
.end annotation
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
return-object p0
.end method
.method public static checkNotNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;",
"Ljava/lang/String;",
")TT;"
}
.end annotation
if-eqz p0, :cond_0
return-object p0
:cond_0
new-instance p0, Ljava/lang/NullPointerException;
invoke-direct {p0, p1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static checkNotNull(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;",
"Ljava/lang/String;",
"Ljava/lang/Object;",
")TT;"
}
.end annotation
if-nez p0, :cond_3
const-string p0, "%s"
invoke-virtual {p1, p0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_2
invoke-virtual {p1, p0}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I
move-result v0
invoke-virtual {p1, p0}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I
move-result v1
if-ne v0, v1, :cond_1
instance-of v0, p2, Ljava/lang/Class;
if-eqz v0, :cond_0
check-cast p2, Ljava/lang/Class;
invoke-virtual {p2}, Ljava/lang/Class;->getCanonicalName()Ljava/lang/String;
move-result-object p2
goto :goto_0
:cond_0
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p2
:goto_0
new-instance v0, Ljava/lang/NullPointerException;
invoke-virtual {p1, p0, p2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v0
:cond_1
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "errorMessageTemplate has more than one format specifier"
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
:cond_2
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "errorMessageTemplate has no format specifiers"
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
:cond_3
return-object p0
.end method