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

https://gitlab.com/qt-prometheus/qt-prometheus · Java · 60 lines · 51 code · 5 blank · 4 comment · 13 complexity · 159f19179c2b479169d3dd092457f04c 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.parser.ParserConfig;
  5. import com.alibaba.fastjson.util.FieldInfo;
  6. import com.alibaba.fastjson.util.TypeUtils;
  7. import java.lang.reflect.Type;
  8. import java.util.Map;
  9. public class IntegerFieldDeserializer extends FieldDeserializer
  10. {
  11. public IntegerFieldDeserializer(ParserConfig paramParserConfig, Class<?> paramClass, FieldInfo paramFieldInfo)
  12. {
  13. super(paramClass, paramFieldInfo);
  14. }
  15. public int getFastMatchToken()
  16. {
  17. return 2;
  18. }
  19. public void parseField(DefaultJSONParser paramDefaultJSONParser, Object paramObject, Type paramType, Map<String, Object> paramMap)
  20. {
  21. paramType = paramDefaultJSONParser.getLexer();
  22. int i;
  23. if (paramType.token() == 2)
  24. {
  25. i = paramType.intValue();
  26. paramType.nextToken(16);
  27. if (paramObject == null)
  28. paramMap.put(this.fieldInfo.getName(), Integer.valueOf(i));
  29. }
  30. while (true)
  31. {
  32. return;
  33. setValue(paramObject, i);
  34. return;
  35. if (paramType.token() == 8)
  36. {
  37. paramDefaultJSONParser = null;
  38. paramType.nextToken(16);
  39. }
  40. while ((paramDefaultJSONParser != null) || (getFieldClass() != Integer.TYPE))
  41. {
  42. if (paramObject != null)
  43. break label131;
  44. paramMap.put(this.fieldInfo.getName(), paramDefaultJSONParser);
  45. return;
  46. paramDefaultJSONParser = TypeUtils.castToInt(paramDefaultJSONParser.parse());
  47. }
  48. }
  49. label131: setValue(paramObject, paramDefaultJSONParser);
  50. }
  51. }
  52. /* Location: C:\Users\User\dex2jar-2.0\dex\qting\classes-dex2jar.jar
  53. * Qualified Name: com.alibaba.fastjson.parser.deserializer.IntegerFieldDeserializer
  54. * JD-Core Version: 0.6.2
  55. */