.class public final Lcom/google/common/escape/Escapers; .super Ljava/lang/Object; .source "Escapers.java" # annotations .annotation build Lcom/google/common/annotations/Beta; .end annotation .annotation build Lcom/google/common/annotations/GwtCompatible; .end annotation .annotation system Ldalvik/annotation/MemberClasses; value = { Lcom/google/common/escape/Escapers$Builder; } .end annotation # static fields .field private static final NULL_ESCAPER:Lcom/google/common/escape/Escaper; # direct methods .method static constructor ()V .locals 1 .prologue .line 51 new-instance v0, Lcom/google/common/escape/Escapers$1; invoke-direct {v0}, Lcom/google/common/escape/Escapers$1;->()V sput-object v0, Lcom/google/common/escape/Escapers;->NULL_ESCAPER:Lcom/google/common/escape/Escaper; return-void .end method .method private constructor ()V .locals 0 .prologue .line 39 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method static asUnicodeEscaper(Lcom/google/common/escape/Escaper;)Lcom/google/common/escape/UnicodeEscaper; .locals 3 .prologue .line 183 invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 184 instance-of v0, p0, Lcom/google/common/escape/UnicodeEscaper; if-eqz v0, :cond_0 .line 185 check-cast p0, Lcom/google/common/escape/UnicodeEscaper; .line 187 :goto_0 return-object p0 .line 186 :cond_0 instance-of v0, p0, Lcom/google/common/escape/CharEscaper; if-eqz v0, :cond_1 .line 187 check-cast p0, Lcom/google/common/escape/CharEscaper; invoke-static {p0}, Lcom/google/common/escape/Escapers;->wrap(Lcom/google/common/escape/CharEscaper;)Lcom/google/common/escape/UnicodeEscaper; move-result-object p0 goto :goto_0 .line 191 :cond_1 new-instance v0, Ljava/lang/IllegalArgumentException; new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V const-string v2, "Cannot create a UnicodeEscaper from: " invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class; move-result-object v2 invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String; move-result-object v2 invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw v0 .end method .method public static builder()Lcom/google/common/escape/Escapers$Builder; .locals 2 .prologue .line 78 new-instance v0, Lcom/google/common/escape/Escapers$Builder; const/4 v1, 0x0 invoke-direct {v0, v1}, Lcom/google/common/escape/Escapers$Builder;->(Lcom/google/common/escape/Escapers$1;)V return-object v0 .end method .method public static computeReplacement(Lcom/google/common/escape/CharEscaper;C)Ljava/lang/String; .locals 1 .prologue .line 206 invoke-virtual {p0, p1}, Lcom/google/common/escape/CharEscaper;->escape(C)[C move-result-object v0 invoke-static {v0}, Lcom/google/common/escape/Escapers;->stringOrNull([C)Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public static computeReplacement(Lcom/google/common/escape/UnicodeEscaper;I)Ljava/lang/String; .locals 1 .prologue .line 220 invoke-virtual {p0, p1}, Lcom/google/common/escape/UnicodeEscaper;->escape(I)[C move-result-object v0 invoke-static {v0}, Lcom/google/common/escape/Escapers;->stringOrNull([C)Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public static nullEscaper()Lcom/google/common/escape/Escaper; .locals 1 .prologue .line 46 sget-object v0, Lcom/google/common/escape/Escapers;->NULL_ESCAPER:Lcom/google/common/escape/Escaper; return-object v0 .end method .method private static stringOrNull([C)Ljava/lang/String; .locals 1 .prologue .line 224 if-nez p0, :cond_0 const/4 v0, 0x0 :goto_0 return-object v0 :cond_0 new-instance v0, Ljava/lang/String; invoke-direct {v0, p0}, Ljava/lang/String;->([C)V goto :goto_0 .end method .method private static wrap(Lcom/google/common/escape/CharEscaper;)Lcom/google/common/escape/UnicodeEscaper; .locals 1 .prologue .line 229 new-instance v0, Lcom/google/common/escape/Escapers$2; invoke-direct {v0, p0}, Lcom/google/common/escape/Escapers$2;->(Lcom/google/common/escape/CharEscaper;)V return-object v0 .end method