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

https://gitlab.com/qt-prometheus/qt-prometheus · Java · 44 lines · 35 code · 5 blank · 4 comment · 7 complexity · 9626e749f4d2dd676d7628a6bd6812fd MD5 · raw file

  1. package com.alibaba.fastjson.parser.deserializer;
  2. import com.alibaba.fastjson.parser.DefaultJSONParser;
  3. import com.alibaba.fastjson.parser.JSONLexer;
  4. import com.alibaba.fastjson.util.TypeUtils;
  5. import java.lang.reflect.Type;
  6. import java.util.concurrent.atomic.AtomicLong;
  7. public class LongDeserializer
  8. implements ObjectDeserializer
  9. {
  10. public static final LongDeserializer instance = new LongDeserializer();
  11. public <T> T deserialze(DefaultJSONParser paramDefaultJSONParser, Type paramType, Object paramObject)
  12. {
  13. paramObject = paramDefaultJSONParser.getLexer();
  14. long l;
  15. if (paramObject.token() == 2)
  16. {
  17. l = paramObject.longValue();
  18. paramObject.nextToken(16);
  19. }
  20. for (paramDefaultJSONParser = Long.valueOf(l); ; paramDefaultJSONParser = TypeUtils.castToLong(paramDefaultJSONParser))
  21. {
  22. paramObject = paramDefaultJSONParser;
  23. if (paramType == AtomicLong.class)
  24. paramObject = new AtomicLong(paramDefaultJSONParser.longValue());
  25. return paramObject;
  26. paramDefaultJSONParser = paramDefaultJSONParser.parse();
  27. if (paramDefaultJSONParser == null)
  28. return null;
  29. }
  30. }
  31. public int getFastMatchToken()
  32. {
  33. return 2;
  34. }
  35. }
  36. /* Location: C:\Users\User\dex2jar-2.0\dex\qting\classes-dex2jar.jar
  37. * Qualified Name: com.alibaba.fastjson.parser.deserializer.LongDeserializer
  38. * JD-Core Version: 0.6.2
  39. */