UnsafeAllocator$1.smali 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. .class final Lcom/google/gson/internal/UnsafeAllocator$1;
  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$allocateInstance:Ljava/lang/reflect/Method;
  14. .field final synthetic val$unsafe:Ljava/lang/Object;
  15. # direct methods
  16. .method constructor <init>(Ljava/lang/reflect/Method;Ljava/lang/Object;)V
  17. .locals 0
  18. iput-object p1, p0, Lcom/google/gson/internal/UnsafeAllocator$1;->val$allocateInstance:Ljava/lang/reflect/Method;
  19. iput-object p2, p0, Lcom/google/gson/internal/UnsafeAllocator$1;->val$unsafe:Ljava/lang/Object;
  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 4
  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$1;->val$allocateInstance:Ljava/lang/reflect/Method;
  42. iget-object v1, p0, Lcom/google/gson/internal/UnsafeAllocator$1;->val$unsafe:Ljava/lang/Object;
  43. const/4 v2, 0x1
  44. new-array v2, v2, [Ljava/lang/Object;
  45. const/4 v3, 0x0
  46. aput-object p1, v2, v3
  47. invoke-virtual {v0, v1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
  48. move-result-object p1
  49. return-object p1
  50. .end method