PageRenderTime 60ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/QingTingFanBianYi/src/com/alibaba/fastjson/parser/deserializer/ListResolveFieldDeserializer.java

https://gitlab.com/qt-prometheus/qt-prometheus
Java | 52 lines | 42 code | 6 blank | 4 comment | 7 complexity | 436ec98732b4aec3b052d2e7f71e2974 MD5 | raw file
  1. package com.alibaba.fastjson.parser.deserializer;
  2. import com.alibaba.fastjson.JSONArray;
  3. import com.alibaba.fastjson.parser.DefaultJSONParser;
  4. import com.alibaba.fastjson.util.TypeUtils;
  5. import java.lang.reflect.Array;
  6. import java.lang.reflect.Type;
  7. import java.util.List;
  8. import java.util.Map;
  9. public final class ListResolveFieldDeserializer extends FieldDeserializer
  10. {
  11. private final int index;
  12. private final List list;
  13. private final DefaultJSONParser parser;
  14. public ListResolveFieldDeserializer(DefaultJSONParser paramDefaultJSONParser, List paramList, int paramInt)
  15. {
  16. super(null, null);
  17. this.parser = paramDefaultJSONParser;
  18. this.index = paramInt;
  19. this.list = paramList;
  20. }
  21. public void parseField(DefaultJSONParser paramDefaultJSONParser, Object paramObject, Type paramType, Map<String, Object> paramMap)
  22. {
  23. }
  24. public void setValue(Object paramObject1, Object paramObject2)
  25. {
  26. this.list.set(this.index, paramObject2);
  27. Object localObject;
  28. if ((this.list instanceof JSONArray))
  29. {
  30. paramObject1 = (JSONArray)this.list;
  31. localObject = paramObject1.getRelatedArray();
  32. if ((localObject != null) && (Array.getLength(localObject) > this.index))
  33. if (paramObject1.getComponentType() == null)
  34. break label86;
  35. }
  36. label86: for (paramObject1 = TypeUtils.cast(paramObject2, paramObject1.getComponentType(), this.parser.getConfig()); ; paramObject1 = paramObject2)
  37. {
  38. Array.set(localObject, this.index, paramObject1);
  39. return;
  40. }
  41. }
  42. }
  43. /* Location: C:\Users\User\dex2jar-2.0\dex\qting\classes-dex2jar.jar
  44. * Qualified Name: com.alibaba.fastjson.parser.deserializer.ListResolveFieldDeserializer
  45. * JD-Core Version: 0.6.2
  46. */