UnsafeAllocator$2.smali 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. .class final Lcom/google/gson/internal/UnsafeAllocator$2;
  2. .super Lcom/google/gson/internal/UnsafeAllocator;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/EnclosingMethod;
  6. value = Lcom/google/gson/internal/UnsafeAllocator;->create()Lcom/google/gson/internal/UnsafeAllocator;
  7. .end annotation
  8. .annotation system Ldalvik/annotation/InnerClass;
  9. accessFlags = 0x8
  10. name = null
  11. .end annotation
  12. # instance fields
  13. .field final synthetic val$constructorId:I
  14. .field final synthetic val$newInstance:Ljava/lang/reflect/Method;
  15. # direct methods
  16. .method constructor <init>(Ljava/lang/reflect/Method;I)V
  17. .locals 0
  18. iput-object p1, p0, Lcom/google/gson/internal/UnsafeAllocator$2;->val$newInstance:Ljava/lang/reflect/Method;
  19. iput p2, p0, Lcom/google/gson/internal/UnsafeAllocator$2;->val$constructorId:I
  20. invoke-direct {p0}, Lcom/google/gson/internal/UnsafeAllocator;-><init>()V
  21. return-void
  22. .end method
  23. # virtual methods
  24. .method public newInstance(Ljava/lang/Class;)Ljava/lang/Object;
  25. .locals 3
  26. .annotation system Ldalvik/annotation/Signature;
  27. value = {
  28. "<T:",
  29. "Ljava/lang/Object;",
  30. ">(",
  31. "Ljava/lang/Class<",
  32. "TT;>;)TT;"
  33. }
  34. .end annotation
  35. .annotation system Ldalvik/annotation/Throws;
  36. value = {
  37. Ljava/lang/Exception;
  38. }
  39. .end annotation
  40. invoke-static {p1}, Lcom/google/gson/internal/UnsafeAllocator;->assertInstantiable(Ljava/lang/Class;)V
  41. iget-object v0, p0, Lcom/google/gson/internal/UnsafeAllocator$2;->val$newInstance:Ljava/lang/reflect/Method;
  42. const/4 v1, 0x2
  43. new-array v1, v1, [Ljava/lang/Object;
  44. const/4 v2, 0x0
  45. aput-object p1, v1, v2
  46. iget p1, p0, Lcom/google/gson/internal/UnsafeAllocator$2;->val$constructorId:I
  47. invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
  48. move-result-object p1
  49. const/4 v2, 0x1
  50. aput-object p1, v1, v2
  51. const/4 p1, 0x0
  52. invoke-virtual {v0, p1, v1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
  53. move-result-object p1
  54. return-object p1
  55. .end method