ErrorCode.smali 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. .class public final enum Lokhttp3/internal/http2/ErrorCode;
  2. .super Ljava/lang/Enum;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/Signature;
  6. value = {
  7. "Ljava/lang/Enum<",
  8. "Lokhttp3/internal/http2/ErrorCode;",
  9. ">;"
  10. }
  11. .end annotation
  12. # static fields
  13. .field private static final synthetic $VALUES:[Lokhttp3/internal/http2/ErrorCode;
  14. .field public static final enum CANCEL:Lokhttp3/internal/http2/ErrorCode;
  15. .field public static final enum FLOW_CONTROL_ERROR:Lokhttp3/internal/http2/ErrorCode;
  16. .field public static final enum INTERNAL_ERROR:Lokhttp3/internal/http2/ErrorCode;
  17. .field public static final enum NO_ERROR:Lokhttp3/internal/http2/ErrorCode;
  18. .field public static final enum PROTOCOL_ERROR:Lokhttp3/internal/http2/ErrorCode;
  19. .field public static final enum REFUSED_STREAM:Lokhttp3/internal/http2/ErrorCode;
  20. # instance fields
  21. .field public final httpCode:I
  22. # direct methods
  23. .method static constructor <clinit>()V
  24. .locals 9
  25. new-instance v0, Lokhttp3/internal/http2/ErrorCode;
  26. const/4 v1, 0x0
  27. const-string v2, "NO_ERROR"
  28. invoke-direct {v0, v2, v1, v1}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
  29. sput-object v0, Lokhttp3/internal/http2/ErrorCode;->NO_ERROR:Lokhttp3/internal/http2/ErrorCode;
  30. new-instance v0, Lokhttp3/internal/http2/ErrorCode;
  31. const/4 v2, 0x1
  32. const-string v3, "PROTOCOL_ERROR"
  33. invoke-direct {v0, v3, v2, v2}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
  34. sput-object v0, Lokhttp3/internal/http2/ErrorCode;->PROTOCOL_ERROR:Lokhttp3/internal/http2/ErrorCode;
  35. new-instance v0, Lokhttp3/internal/http2/ErrorCode;
  36. const/4 v3, 0x2
  37. const-string v4, "INTERNAL_ERROR"
  38. invoke-direct {v0, v4, v3, v3}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
  39. sput-object v0, Lokhttp3/internal/http2/ErrorCode;->INTERNAL_ERROR:Lokhttp3/internal/http2/ErrorCode;
  40. new-instance v0, Lokhttp3/internal/http2/ErrorCode;
  41. const/4 v4, 0x3
  42. const-string v5, "FLOW_CONTROL_ERROR"
  43. invoke-direct {v0, v5, v4, v4}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
  44. sput-object v0, Lokhttp3/internal/http2/ErrorCode;->FLOW_CONTROL_ERROR:Lokhttp3/internal/http2/ErrorCode;
  45. new-instance v0, Lokhttp3/internal/http2/ErrorCode;
  46. const/4 v5, 0x4
  47. const-string v6, "REFUSED_STREAM"
  48. const/4 v7, 0x7
  49. invoke-direct {v0, v6, v5, v7}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
  50. sput-object v0, Lokhttp3/internal/http2/ErrorCode;->REFUSED_STREAM:Lokhttp3/internal/http2/ErrorCode;
  51. new-instance v0, Lokhttp3/internal/http2/ErrorCode;
  52. const/4 v6, 0x5
  53. const-string v7, "CANCEL"
  54. const/16 v8, 0x8
  55. invoke-direct {v0, v7, v6, v8}, Lokhttp3/internal/http2/ErrorCode;-><init>(Ljava/lang/String;II)V
  56. sput-object v0, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
  57. const/4 v0, 0x6
  58. new-array v0, v0, [Lokhttp3/internal/http2/ErrorCode;
  59. sget-object v7, Lokhttp3/internal/http2/ErrorCode;->NO_ERROR:Lokhttp3/internal/http2/ErrorCode;
  60. aput-object v7, v0, v1
  61. sget-object v1, Lokhttp3/internal/http2/ErrorCode;->PROTOCOL_ERROR:Lokhttp3/internal/http2/ErrorCode;
  62. aput-object v1, v0, v2
  63. sget-object v1, Lokhttp3/internal/http2/ErrorCode;->INTERNAL_ERROR:Lokhttp3/internal/http2/ErrorCode;
  64. aput-object v1, v0, v3
  65. sget-object v1, Lokhttp3/internal/http2/ErrorCode;->FLOW_CONTROL_ERROR:Lokhttp3/internal/http2/ErrorCode;
  66. aput-object v1, v0, v4
  67. sget-object v1, Lokhttp3/internal/http2/ErrorCode;->REFUSED_STREAM:Lokhttp3/internal/http2/ErrorCode;
  68. aput-object v1, v0, v5
  69. sget-object v1, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
  70. aput-object v1, v0, v6
  71. sput-object v0, Lokhttp3/internal/http2/ErrorCode;->$VALUES:[Lokhttp3/internal/http2/ErrorCode;
  72. return-void
  73. .end method
  74. .method private constructor <init>(Ljava/lang/String;II)V
  75. .locals 0
  76. .annotation system Ldalvik/annotation/Signature;
  77. value = {
  78. "(I)V"
  79. }
  80. .end annotation
  81. invoke-direct {p0, p1, p2}, Ljava/lang/Enum;-><init>(Ljava/lang/String;I)V
  82. iput p3, p0, Lokhttp3/internal/http2/ErrorCode;->httpCode:I
  83. return-void
  84. .end method
  85. .method public static fromHttp2(I)Lokhttp3/internal/http2/ErrorCode;
  86. .locals 5
  87. invoke-static {}, Lokhttp3/internal/http2/ErrorCode;->values()[Lokhttp3/internal/http2/ErrorCode;
  88. move-result-object v0
  89. array-length v1, v0
  90. const/4 v2, 0x0
  91. :goto_0
  92. if-ge v2, v1, :cond_1
  93. aget-object v3, v0, v2
  94. iget v4, v3, Lokhttp3/internal/http2/ErrorCode;->httpCode:I
  95. if-ne v4, p0, :cond_0
  96. return-object v3
  97. :cond_0
  98. add-int/lit8 v2, v2, 0x1
  99. goto :goto_0
  100. :cond_1
  101. const/4 p0, 0x0
  102. return-object p0
  103. .end method
  104. .method public static valueOf(Ljava/lang/String;)Lokhttp3/internal/http2/ErrorCode;
  105. .locals 1
  106. const-class v0, Lokhttp3/internal/http2/ErrorCode;
  107. invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
  108. move-result-object p0
  109. check-cast p0, Lokhttp3/internal/http2/ErrorCode;
  110. return-object p0
  111. .end method
  112. .method public static values()[Lokhttp3/internal/http2/ErrorCode;
  113. .locals 1
  114. sget-object v0, Lokhttp3/internal/http2/ErrorCode;->$VALUES:[Lokhttp3/internal/http2/ErrorCode;
  115. invoke-virtual {v0}, [Lokhttp3/internal/http2/ErrorCode;->clone()Ljava/lang/Object;
  116. move-result-object v0
  117. check-cast v0, [Lokhttp3/internal/http2/ErrorCode;
  118. return-object v0
  119. .end method