/QingTingFanBianYi/src/com/alibaba/fastjson/parser/ParseContext.java

https://gitlab.com/qt-prometheus/qt-prometheus · Java · 62 lines · 47 code · 11 blank · 4 comment · 3 complexity · 10d4427b5b6df61e224a1595a5a3c744 MD5 · raw file

  1. package com.alibaba.fastjson.parser;
  2. import java.lang.reflect.Type;
  3. public class ParseContext
  4. {
  5. private final Object fieldName;
  6. private Object object;
  7. private final ParseContext parent;
  8. private Type type;
  9. public ParseContext(ParseContext paramParseContext, Object paramObject1, Object paramObject2)
  10. {
  11. this.parent = paramParseContext;
  12. this.object = paramObject1;
  13. this.fieldName = paramObject2;
  14. }
  15. public Object getObject()
  16. {
  17. return this.object;
  18. }
  19. public ParseContext getParentContext()
  20. {
  21. return this.parent;
  22. }
  23. public String getPath()
  24. {
  25. if (this.parent == null)
  26. return "$";
  27. if ((this.fieldName instanceof Integer))
  28. return this.parent.getPath() + "[" + this.fieldName + "]";
  29. return this.parent.getPath() + "." + this.fieldName;
  30. }
  31. public Type getType()
  32. {
  33. return this.type;
  34. }
  35. public void setObject(Object paramObject)
  36. {
  37. this.object = paramObject;
  38. }
  39. public void setType(Type paramType)
  40. {
  41. this.type = paramType;
  42. }
  43. public String toString()
  44. {
  45. return getPath();
  46. }
  47. }
  48. /* Location: C:\Users\User\dex2jar-2.0\dex\qting\classes-dex2jar.jar
  49. * Qualified Name: com.alibaba.fastjson.parser.ParseContext
  50. * JD-Core Version: 0.6.2
  51. */