PageRenderTime 640ms CodeModel.GetById 37ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://gitlab.com/qt-prometheus/qt-prometheus
Java | 112 lines | 110 code | 2 blank | 0 comment | 21 complexity | d60239d282460cd818af47164f8bb995 MD5 | raw file
  1. package com.alibaba.fastjson.parser;
  2. public final class CharTypes
  3. {
  4. public static final char[] ASCII_CHARS = { 48, 48, 48, 49, 48, 50, 48, 51, 48, 52, 48, 53, 48, 54, 48, 55, 48, 56, 48, 57, 48, 65, 48, 66, 48, 67, 48, 68, 48, 69, 48, 70, 49, 48, 49, 49, 49, 50, 49, 51, 49, 52, 49, 53, 49, 54, 49, 55, 49, 56, 49, 57, 49, 65, 49, 66, 49, 67, 49, 68, 49, 69, 49, 70, 50, 48, 50, 49, 50, 50, 50, 51, 50, 52, 50, 53, 50, 54, 50, 55, 50, 56, 50, 57, 50, 65, 50, 66, 50, 67, 50, 68, 50, 69, 50, 70 };
  5. public static final char[] digits = { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70 };
  6. public static final boolean[] firstIdentifierFlags = new boolean[256];
  7. public static final boolean[] identifierFlags;
  8. public static final char[] replaceChars;
  9. public static final boolean[] specicalFlags_doubleQuotes;
  10. public static final boolean[] specicalFlags_singleQuotes;
  11. static
  12. {
  13. int i = 0;
  14. if (i < firstIdentifierFlags.length)
  15. {
  16. if ((i >= 65) && (i <= 90))
  17. firstIdentifierFlags[i] = true;
  18. while (true)
  19. {
  20. i = (char)(i + 1);
  21. break;
  22. if ((i >= 97) && (i <= 122))
  23. firstIdentifierFlags[i] = true;
  24. else if (i == 95)
  25. firstIdentifierFlags[i] = true;
  26. }
  27. }
  28. identifierFlags = new boolean[256];
  29. i = 0;
  30. if (i < identifierFlags.length)
  31. {
  32. if ((i >= 65) && (i <= 90))
  33. identifierFlags[i] = true;
  34. while (true)
  35. {
  36. i = (char)(i + 1);
  37. break;
  38. if ((i >= 97) && (i <= 122))
  39. identifierFlags[i] = true;
  40. else if (i == 95)
  41. identifierFlags[i] = true;
  42. else if ((i >= 48) && (i <= 57))
  43. identifierFlags[i] = true;
  44. }
  45. }
  46. specicalFlags_doubleQuotes = new boolean['€'];
  47. specicalFlags_singleQuotes = new boolean['€'];
  48. replaceChars = new char['€'];
  49. specicalFlags_doubleQuotes[0] = true;
  50. specicalFlags_doubleQuotes[1] = true;
  51. specicalFlags_doubleQuotes[2] = true;
  52. specicalFlags_doubleQuotes[3] = true;
  53. specicalFlags_doubleQuotes[4] = true;
  54. specicalFlags_doubleQuotes[5] = true;
  55. specicalFlags_doubleQuotes[6] = true;
  56. specicalFlags_doubleQuotes[7] = true;
  57. specicalFlags_doubleQuotes[8] = true;
  58. specicalFlags_doubleQuotes[9] = true;
  59. specicalFlags_doubleQuotes[10] = true;
  60. specicalFlags_doubleQuotes[11] = true;
  61. specicalFlags_doubleQuotes[12] = true;
  62. specicalFlags_doubleQuotes[13] = true;
  63. specicalFlags_doubleQuotes[34] = true;
  64. specicalFlags_doubleQuotes[92] = true;
  65. specicalFlags_singleQuotes[0] = true;
  66. specicalFlags_singleQuotes[1] = true;
  67. specicalFlags_singleQuotes[2] = true;
  68. specicalFlags_singleQuotes[3] = true;
  69. specicalFlags_singleQuotes[4] = true;
  70. specicalFlags_singleQuotes[5] = true;
  71. specicalFlags_singleQuotes[6] = true;
  72. specicalFlags_singleQuotes[7] = true;
  73. specicalFlags_singleQuotes[8] = true;
  74. specicalFlags_singleQuotes[9] = true;
  75. specicalFlags_singleQuotes[10] = true;
  76. specicalFlags_singleQuotes[11] = true;
  77. specicalFlags_singleQuotes[12] = true;
  78. specicalFlags_singleQuotes[13] = true;
  79. specicalFlags_singleQuotes[39] = true;
  80. specicalFlags_singleQuotes[92] = true;
  81. replaceChars[0] = '0';
  82. replaceChars[1] = '1';
  83. replaceChars[2] = '2';
  84. replaceChars[3] = '3';
  85. replaceChars[4] = '4';
  86. replaceChars[5] = '5';
  87. replaceChars[6] = '6';
  88. replaceChars[7] = '7';
  89. replaceChars[8] = 'b';
  90. replaceChars[9] = 't';
  91. replaceChars[10] = 'n';
  92. replaceChars[11] = 'v';
  93. replaceChars[12] = 'f';
  94. replaceChars[13] = 'r';
  95. replaceChars[34] = '"';
  96. replaceChars[39] = '\'';
  97. replaceChars[47] = '/';
  98. replaceChars[92] = '\\';
  99. }
  100. public static boolean isSpecial_doubleQuotes(char paramChar)
  101. {
  102. return (paramChar < specicalFlags_doubleQuotes.length) && (specicalFlags_doubleQuotes[paramChar] != 0);
  103. }
  104. }
  105. /* Location: C:\Users\User\dex2jar-2.0\dex\qting\classes-dex2jar.jar
  106. * Qualified Name: com.alibaba.fastjson.parser.CharTypes
  107. * JD-Core Version: 0.6.2
  108. */