calabash-android 0.4.7.pre6 → 0.4.7.pre7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (423) hide show
  1. checksums.yaml +4 -4
  2. data/lib/calabash-android/helpers.rb +7 -15
  3. data/lib/calabash-android/lib/TestServer.apk +0 -0
  4. data/lib/calabash-android/version.rb +1 -1
  5. data/test-server/build.xml +2 -2
  6. data/test-server/instrumentation-backend/.classpath +0 -3
  7. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/HttpServer.java +1 -2
  8. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/wait/WaitForProgress.java +1 -1
  9. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/QueryHelper.java +1 -2
  10. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/json/JSONUtils.java +1 -1
  11. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/QueryResult.java +1 -1
  12. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/ast/UIQueryUtils.java +203 -222
  13. data/test-server/instrumentation-backend/src/sh/calaba/org/apache/http/entity/mime/version.properties +22 -0
  14. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Base64Variant.java +413 -0
  15. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Base64Variants.java +90 -0
  16. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/FormatSchema.java +29 -0
  17. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonEncoding.java +47 -0
  18. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonFactory.java +937 -0
  19. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonGenerationException.java +28 -0
  20. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonGenerator.java +1197 -0
  21. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonLocation.java +141 -0
  22. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonNode.java +879 -0
  23. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonParseException.java +23 -0
  24. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonParser.java +1434 -0
  25. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonProcessingException.java +80 -0
  26. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonStreamContext.java +122 -0
  27. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonToken.java +161 -0
  28. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/ObjectCodec.java +157 -0
  29. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/PrettyPrinter.java +166 -0
  30. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/SerializableString.java +54 -0
  31. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Version.java +90 -0
  32. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Versioned.java +20 -0
  33. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JacksonAnnotation.java +20 -0
  34. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonAnyGetter.java +25 -0
  35. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonAnySetter.java +24 -0
  36. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonAutoDetect.java +148 -0
  37. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonBackReference.java +41 -0
  38. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonCreator.java +19 -0
  39. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonGetter.java +35 -0
  40. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonIgnore.java +57 -0
  41. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonIgnoreProperties.java +48 -0
  42. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonIgnoreType.java +33 -0
  43. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonManagedReference.java +41 -0
  44. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonMethod.java +90 -0
  45. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonProperty.java +38 -0
  46. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonPropertyOrder.java +46 -0
  47. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonRawValue.java +33 -0
  48. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonSetter.java +33 -0
  49. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonSubTypes.java +44 -0
  50. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonTypeInfo.java +236 -0
  51. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonTypeName.java +28 -0
  52. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonUnwrapped.java +76 -0
  53. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonValue.java +46 -0
  54. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonWriteNullProperties.java +34 -0
  55. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/package-info.java +16 -0
  56. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/DataFormatDetector.java +176 -0
  57. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/DataFormatMatcher.java +117 -0
  58. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/InputAccessor.java +130 -0
  59. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/MatchStrength.java +64 -0
  60. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/package-info.java +8 -0
  61. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/ByteSourceBootstrapper.java +518 -0
  62. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/DefaultPrettyPrinter.java +13 -0
  63. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/Indenter.java +23 -0
  64. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonGeneratorBase.java +570 -0
  65. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonNumericParserBase.java +20 -0
  66. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonParserBase.java +1067 -0
  67. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonParserMinimalBase.java +539 -0
  68. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonReadContext.java +188 -0
  69. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonWriteContext.java +178 -0
  70. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/ReaderBasedParser.java +1815 -0
  71. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/ReaderBasedParserBase.java +228 -0
  72. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/StreamBasedParserBase.java +197 -0
  73. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/Utf8Generator.java +1757 -0
  74. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/Utf8StreamParser.java +2966 -0
  75. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/WriterBasedGenerator.java +1815 -0
  76. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/package-info.java +6 -0
  77. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/BaseReader.java +117 -0
  78. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/CharacterEscapes.java +73 -0
  79. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/IOContext.java +239 -0
  80. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/InputDecorator.java +67 -0
  81. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/JsonStringEncoder.java +408 -0
  82. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/MergedStream.java +145 -0
  83. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/NumberInput.java +303 -0
  84. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/NumberOutput.java +398 -0
  85. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/OutputDecorator.java +40 -0
  86. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/SegmentedStringWriter.java +104 -0
  87. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/SerializedString.java +114 -0
  88. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/UTF32Reader.java +214 -0
  89. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/UTF8Writer.java +387 -0
  90. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/package.html +4 -0
  91. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/AbstractTypeResolver.java +63 -0
  92. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/AnnotationIntrospector.java +1485 -0
  93. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/BeanDescription.java +171 -0
  94. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/BeanProperty.java +123 -0
  95. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/BeanPropertyDefinition.java +66 -0
  96. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ClassIntrospector.java +117 -0
  97. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ContextualDeserializer.java +38 -0
  98. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ContextualKeyDeserializer.java +33 -0
  99. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ContextualSerializer.java +38 -0
  100. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializationConfig.java +926 -0
  101. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializationContext.java +262 -0
  102. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializationProblemHandler.java +56 -0
  103. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializerFactory.java +356 -0
  104. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializerProvider.java +185 -0
  105. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/Deserializers.java +339 -0
  106. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/HandlerInstantiator.java +115 -0
  107. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/InjectableValues.java +85 -0
  108. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonDeserializer.java +166 -0
  109. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonMappingException.java +335 -0
  110. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonSerializable.java +34 -0
  111. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonSerializableWithType.java +22 -0
  112. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonSerializer.java +138 -0
  113. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/KeyDeserializer.java +31 -0
  114. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/KeyDeserializers.java +21 -0
  115. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/MapperConfig.java +1154 -0
  116. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/MappingIterator.java +190 -0
  117. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/MappingJsonFactory.java +81 -0
  118. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/Module.java +255 -0
  119. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ObjectMapper.java +2885 -0
  120. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ObjectReader.java +958 -0
  121. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ObjectWriter.java +554 -0
  122. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/PropertyNamingStrategy.java +258 -0
  123. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ResolvableDeserializer.java +23 -0
  124. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ResolvableSerializer.java +23 -0
  125. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/RuntimeJsonMappingException.java +21 -0
  126. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/SerializationConfig.java +1041 -0
  127. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/SerializerFactory.java +198 -0
  128. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/SerializerProvider.java +552 -0
  129. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/Serializers.java +137 -0
  130. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/TypeDeserializer.java +118 -0
  131. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/TypeSerializer.java +164 -0
  132. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JacksonInject.java +30 -0
  133. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JacksonStdImpl.java +25 -0
  134. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonCachable.java +32 -0
  135. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonDeserialize.java +109 -0
  136. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonFilter.java +31 -0
  137. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonRootName.java +29 -0
  138. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonSerialize.java +216 -0
  139. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonTypeIdResolver.java +35 -0
  140. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonTypeResolver.java +28 -0
  141. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonValueInstantiator.java +26 -0
  142. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonView.java +37 -0
  143. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/NoClass.java +19 -0
  144. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/package-info.java +5 -0
  145. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/AbstractDeserializer.java +102 -0
  146. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ArrayDeserializer.java +28 -0
  147. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ArrayDeserializers.java +11 -0
  148. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BasicDeserializerFactory.java +894 -0
  149. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializer.java +1537 -0
  150. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializerBuilder.java +277 -0
  151. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializerFactory.java +1474 -0
  152. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializerModifier.java +58 -0
  153. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/CollectionDeserializer.java +47 -0
  154. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ContainerDeserializer.java +14 -0
  155. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/CustomDeserializerFactory.java +227 -0
  156. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/DateDeserializer.java +9 -0
  157. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/EnumDeserializer.java +15 -0
  158. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/EnumResolver.java +17 -0
  159. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/FromStringDeserializer.java +13 -0
  160. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/JsonNodeDeserializer.java +54 -0
  161. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/MapDeserializer.java +44 -0
  162. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/SettableAnyProperty.java +177 -0
  163. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/SettableBeanProperty.java +827 -0
  164. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializationContext.java +326 -0
  165. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializer.java +94 -0
  166. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializerProvider.java +494 -0
  167. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializers.java +119 -0
  168. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdKeyDeserializer.java +12 -0
  169. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdKeyDeserializers.java +11 -0
  170. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdScalarDeserializer.java +13 -0
  171. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ThrowableDeserializer.java +13 -0
  172. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/UntypedObjectDeserializer.java +9 -0
  173. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ValueInstantiator.java +280 -0
  174. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ValueInstantiators.java +52 -0
  175. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/BeanPropertyMap.java +257 -0
  176. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/CreatorCollector.java +141 -0
  177. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/CreatorProperty.java +152 -0
  178. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/ExternalTypeHandler.java +173 -0
  179. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/PropertyBasedCreator.java +117 -0
  180. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/PropertyValue.java +117 -0
  181. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/PropertyValueBuffer.java +102 -0
  182. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/UnwrappedPropertyHandler.java +41 -0
  183. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/ValueInjector.java +45 -0
  184. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/package-info.java +9 -0
  185. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/package-info.java +5 -0
  186. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/AtomicBooleanDeserializer.java +22 -0
  187. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/AtomicReferenceDeserializer.java +47 -0
  188. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/CalendarDeserializer.java +47 -0
  189. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ClassDeserializer.java +49 -0
  190. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/CollectionDeserializer.java +265 -0
  191. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ContainerDeserializerBase.java +37 -0
  192. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/DateDeserializer.java +30 -0
  193. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/EnumDeserializer.java +139 -0
  194. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/EnumMapDeserializer.java +90 -0
  195. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/EnumSetDeserializer.java +89 -0
  196. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/FromStringDeserializer.java +265 -0
  197. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/JavaTypeDeserializer.java +38 -0
  198. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/JsonNodeDeserializer.java +314 -0
  199. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/MapDeserializer.java +412 -0
  200. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ObjectArrayDeserializer.java +201 -0
  201. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/PrimitiveArrayDeserializers.java +583 -0
  202. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdDeserializer.java +1136 -0
  203. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdKeyDeserializer.java +340 -0
  204. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdKeyDeserializers.java +108 -0
  205. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdScalarDeserializer.java +34 -0
  206. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdValueInstantiator.java +392 -0
  207. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StringCollectionDeserializer.java +227 -0
  208. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StringDeserializer.java +55 -0
  209. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ThrowableDeserializer.java +164 -0
  210. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/TimestampDeserializer.java +30 -0
  211. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/TokenBufferDeserializer.java +36 -0
  212. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/UntypedObjectDeserializer.java +248 -0
  213. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/package-info.java +15 -0
  214. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/exc/UnrecognizedPropertyException.java +75 -0
  215. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ext/DOMDeserializer.java +65 -0
  216. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ext/OptionalHandlerFactory.java +217 -0
  217. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ext/package-info.java +23 -0
  218. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/Annotated.java +85 -0
  219. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedClass.java +980 -0
  220. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedConstructor.java +143 -0
  221. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedField.java +119 -0
  222. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedMember.java +56 -0
  223. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedMethod.java +188 -0
  224. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedMethodMap.java +85 -0
  225. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedParameter.java +191 -0
  226. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedWithParams.java +195 -0
  227. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotationMap.java +101 -0
  228. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/BasicBeanDescription.java +615 -0
  229. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/BasicClassIntrospector.java +364 -0
  230. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/JacksonAnnotationIntrospector.java +813 -0
  231. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/MemberKey.java +83 -0
  232. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/MethodFilter.java +12 -0
  233. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/NopAnnotationIntrospector.java +209 -0
  234. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/POJOPropertiesCollector.java +713 -0
  235. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/POJOPropertyBuilder.java +648 -0
  236. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/VisibilityChecker.java +424 -0
  237. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/package-info.java +12 -0
  238. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/NamedType.java +53 -0
  239. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/SubtypeResolver.java +39 -0
  240. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/TypeIdResolver.java +74 -0
  241. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/TypeResolverBuilder.java +151 -0
  242. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsArrayTypeDeserializer.java +126 -0
  243. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsArrayTypeSerializer.java +110 -0
  244. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsExternalTypeDeserializer.java +37 -0
  245. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsExternalTypeSerializer.java +129 -0
  246. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsPropertyTypeDeserializer.java +191 -0
  247. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsPropertyTypeSerializer.java +69 -0
  248. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsWrapperTypeDeserializer.java +103 -0
  249. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsWrapperTypeSerializer.java +121 -0
  250. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/ClassNameIdResolver.java +138 -0
  251. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/MinimalClassNameIdResolver.java +66 -0
  252. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/StdSubtypeResolver.java +151 -0
  253. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/StdTypeResolverBuilder.java +202 -0
  254. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeDeserializerBase.java +154 -0
  255. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeIdResolverBase.java +37 -0
  256. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeNameIdResolver.java +154 -0
  257. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeSerializerBase.java +31 -0
  258. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/package-info.java +9 -0
  259. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/package-info.java +10 -0
  260. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleAbstractTypeResolver.java +86 -0
  261. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleDeserializers.java +130 -0
  262. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleKeyDeserializers.java +59 -0
  263. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleModule.java +265 -0
  264. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleSerializers.java +206 -0
  265. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java +45 -0
  266. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/package-info.java +16 -0
  267. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/package-info.java +34 -0
  268. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/AnyGetterWriter.java +48 -0
  269. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ArraySerializers.java +7 -0
  270. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BasicSerializerFactory.java +806 -0
  271. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanPropertyFilter.java +30 -0
  272. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanPropertyWriter.java +512 -0
  273. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializer.java +126 -0
  274. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializerBuilder.java +140 -0
  275. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializerFactory.java +780 -0
  276. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializerModifier.java +95 -0
  277. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ContainerSerializers.java +8 -0
  278. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/CustomSerializerFactory.java +293 -0
  279. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/EnumSerializer.java +17 -0
  280. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/FilterProvider.java +23 -0
  281. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/FilteredBeanPropertyWriter.java +96 -0
  282. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/JdkSerializers.java +11 -0
  283. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/MapSerializer.java +58 -0
  284. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/PropertyBuilder.java +372 -0
  285. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ScalarSerializerBase.java +18 -0
  286. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/SerializerBase.java +23 -0
  287. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/StdKeySerializer.java +10 -0
  288. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/StdSerializerProvider.java +852 -0
  289. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/StdSerializers.java +372 -0
  290. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ToStringSerializer.java +14 -0
  291. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/FailingSerializer.java +43 -0
  292. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/JsonSerializerMap.java +93 -0
  293. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/PropertySerializerMap.java +231 -0
  294. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/ReadOnlyClassToSerializerMap.java +73 -0
  295. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/SerializerCache.java +304 -0
  296. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/SimpleBeanPropertyFilter.java +109 -0
  297. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/SimpleFilterProvider.java +114 -0
  298. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/UnknownSerializer.java +54 -0
  299. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/UnwrappingBeanPropertyWriter.java +99 -0
  300. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/UnwrappingBeanSerializer.java +76 -0
  301. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/package-info.java +5 -0
  302. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/package-info.java +5 -0
  303. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/AsArraySerializerBase.java +185 -0
  304. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/BeanSerializerBase.java +340 -0
  305. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/CalendarSerializer.java +43 -0
  306. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/CollectionSerializer.java +113 -0
  307. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ContainerSerializerBase.java +51 -0
  308. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/DateSerializer.java +42 -0
  309. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/EnumMapSerializer.java +218 -0
  310. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/EnumSerializer.java +84 -0
  311. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/EnumSetSerializer.java +47 -0
  312. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/IndexedStringListSerializer.java +116 -0
  313. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/InetAddressSerializer.java +51 -0
  314. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/IterableSerializer.java +63 -0
  315. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/JsonValueSerializer.java +233 -0
  316. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/MapSerializer.java +422 -0
  317. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/NonTypedScalarSerializerBase.java +34 -0
  318. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/NullSerializer.java +38 -0
  319. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ObjectArraySerializer.java +281 -0
  320. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/RawSerializer.java +52 -0
  321. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ScalarSerializerBase.java +52 -0
  322. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/SerializableSerializer.java +99 -0
  323. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/SerializableWithTypeSerializer.java +90 -0
  324. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/SerializerBase.java +184 -0
  325. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StaticListSerializerBase.java +46 -0
  326. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdArraySerializers.java +476 -0
  327. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdContainerSerializers.java +249 -0
  328. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdJdkSerializers.java +195 -0
  329. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdKeySerializer.java +43 -0
  330. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdKeySerializers.java +95 -0
  331. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StringCollectionSerializer.java +119 -0
  332. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StringSerializer.java +36 -0
  333. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java +38 -0
  334. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ToStringSerializer.java +73 -0
  335. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TokenBufferSerializer.java +66 -0
  336. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/ArrayType.java +260 -0
  337. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/ClassKey.java +94 -0
  338. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/CollectionLikeType.java +204 -0
  339. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/CollectionType.java +94 -0
  340. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/HierarchicType.java +88 -0
  341. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/MapLikeType.java +265 -0
  342. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/MapType.java +146 -0
  343. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/SimpleType.java +250 -0
  344. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeBase.java +148 -0
  345. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeBindings.java +351 -0
  346. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeFactory.java +1165 -0
  347. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeModifier.java +38 -0
  348. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeParser.java +134 -0
  349. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/package-info.java +10 -0
  350. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Annotations.java +23 -0
  351. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ArrayBuilders.java +293 -0
  352. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/BeanUtil.java +260 -0
  353. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ClassUtil.java +645 -0
  354. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Comparators.java +48 -0
  355. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/EnumResolver.java +108 -0
  356. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/EnumValues.java +82 -0
  357. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ISO8601DateFormat.java +52 -0
  358. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ISO8601Utils.java +230 -0
  359. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/JSONPObject.java +105 -0
  360. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/JSONWrappedObject.java +117 -0
  361. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/LRUMap.java +28 -0
  362. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/LinkedNode.java +45 -0
  363. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Named.java +10 -0
  364. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ObjectBuffer.java +257 -0
  365. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/PrimitiveArrayBuilder.java +180 -0
  366. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Provider.java +21 -0
  367. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/RootNameLookup.java +54 -0
  368. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/StdDateFormat.java +348 -0
  369. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/package-info.java +4 -0
  370. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ArrayNode.java +758 -0
  371. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BaseJsonNode.java +122 -0
  372. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BigIntegerNode.java +104 -0
  373. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BinaryNode.java +136 -0
  374. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BooleanNode.java +84 -0
  375. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ContainerNode.java +185 -0
  376. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/DecimalNode.java +96 -0
  377. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/DoubleNode.java +106 -0
  378. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/IntNode.java +122 -0
  379. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/JsonNodeFactory.java +222 -0
  380. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/LongNode.java +99 -0
  381. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/MissingNode.java +97 -0
  382. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NodeCursor.java +222 -0
  383. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NullNode.java +58 -0
  384. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java +72 -0
  385. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ObjectNode.java +696 -0
  386. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/POJONode.java +145 -0
  387. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/TextNode.java +299 -0
  388. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/TreeTraversingParser.java +383 -0
  389. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ValueNode.java +58 -0
  390. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/package-info.java +8 -0
  391. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/package-info.java +30 -0
  392. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/JsonSchema.java +82 -0
  393. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/JsonSerializableSchema.java +46 -0
  394. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/SchemaAware.java +25 -0
  395. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/package-info.java +5 -0
  396. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/BytesToNameCanonicalizer.java +969 -0
  397. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/CharsToNameCanonicalizer.java +578 -0
  398. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name.java +50 -0
  399. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name1.java +44 -0
  400. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name2.java +40 -0
  401. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name3.java +39 -0
  402. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/NameN.java +68 -0
  403. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/package-info.java +5 -0
  404. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/type/JavaType.java +503 -0
  405. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/type/TypeReference.java +60 -0
  406. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/type/package-info.java +8 -0
  407. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/BufferRecycler.java +109 -0
  408. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/ByteArrayBuilder.java +294 -0
  409. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/CharTypes.java +237 -0
  410. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/DefaultPrettyPrinter.java +282 -0
  411. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/InternCache.java +49 -0
  412. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/JsonGeneratorDelegate.java +273 -0
  413. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/JsonParserDelegate.java +251 -0
  414. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/JsonParserSequence.java +150 -0
  415. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/MinimalPrettyPrinter.java +152 -0
  416. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/TextBuffer.java +707 -0
  417. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/TokenBuffer.java +1233 -0
  418. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/VersionUtil.java +79 -0
  419. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/package-info.java +4 -0
  420. metadata +409 -5
  421. data/test-server/instrumentation-backend/libs/jackson-annotations-2.2.0-rc2-20130418.042013-1.jar +0 -0
  422. data/test-server/instrumentation-backend/libs/jackson-core-2.2.0-rc2-20130420.041001-2.jar +0 -0
  423. data/test-server/instrumentation-backend/libs/jackson-databind-2.2.0-rc2-20130422.041053-3.jar +0 -0
@@ -0,0 +1,58 @@
1
+ package sh.calaba.org.codehaus.jackson.node;
2
+
3
+ import java.io.IOException;
4
+
5
+ import sh.calaba.org.codehaus.jackson.JsonGenerator;
6
+ import sh.calaba.org.codehaus.jackson.JsonNode;
7
+ import sh.calaba.org.codehaus.jackson.JsonProcessingException;
8
+ import sh.calaba.org.codehaus.jackson.JsonToken;
9
+ import sh.calaba.org.codehaus.jackson.map.SerializerProvider;
10
+ import sh.calaba.org.codehaus.jackson.map.TypeSerializer;
11
+
12
+ /**
13
+ * This intermediate base class is used for all leaf nodes, that is,
14
+ * all non-container (array or object) nodes, except for the
15
+ * "missing node".
16
+ */
17
+ public abstract class ValueNode
18
+ extends BaseJsonNode
19
+ {
20
+ protected ValueNode() { }
21
+
22
+ @Override
23
+ public boolean isValueNode() { return true; }
24
+
25
+ @Override
26
+ public abstract JsonToken asToken();
27
+
28
+ @Override
29
+ public void serializeWithType(JsonGenerator jg, SerializerProvider provider,
30
+ TypeSerializer typeSer)
31
+ throws IOException, JsonProcessingException
32
+ {
33
+ typeSer.writeTypePrefixForScalar(this, jg);
34
+ serialize(jg, provider);
35
+ typeSer.writeTypeSuffixForScalar(this, jg);
36
+ }
37
+
38
+ /*
39
+ /**********************************************************************
40
+ /* Public API, path handling
41
+ /**********************************************************************
42
+ */
43
+
44
+ @Override
45
+ public JsonNode path(String fieldName) { return MissingNode.getInstance(); }
46
+
47
+ @Override
48
+ public JsonNode path(int index) { return MissingNode.getInstance(); }
49
+
50
+ /*
51
+ /**********************************************************************
52
+ /* Base impls for standard methods
53
+ /**********************************************************************
54
+ */
55
+
56
+ @Override
57
+ public String toString() { return asText(); }
58
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Contains concrete {@link sh.calaba.org.codehaus.jackson.JsonNode} implementations
3
+ * Jackson uses for the Tree model.
4
+ * These classes are public since concrete type will be needed
5
+ * for most operations that modify node trees. For read-only access concrete
6
+ * types are usually not needed.
7
+ */
8
+ package sh.calaba.org.codehaus.jackson.node;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Main public API classes of the core streaming JSON
3
+ * processor: most importantly {@link sh.calaba.org.codehaus.jackson.JsonFactory}
4
+ * used for constructing
5
+ * JSON parser ({@link sh.calaba.org.codehaus.jackson.JsonParser})
6
+ * and generator
7
+ * ({@link sh.calaba.org.codehaus.jackson.JsonParser})
8
+ * instances.
9
+ * <p>
10
+ * Public API of the higher-level mapping interfaces ("Mapping API")
11
+ * is found from
12
+ * under {@link sh.calaba.org.codehaus.jackson.map} and not included here,
13
+ * except for following base interfaces:
14
+ * <ul>
15
+ *<li>{@link sh.calaba.org.codehaus.jackson.JsonNode} is included
16
+ *within Streaming API to support integration of the Tree Model
17
+ *(which is based on <code>JsonNode</code>) with the basic
18
+ *parsers and generators (iff using mapping-supporting factory: which
19
+ *is part of Mapping API, not core)
20
+ * </li>
21
+ *<li>{@link sh.calaba.org.codehaus.jackson.ObjectCodec} is included so that
22
+ * reference to the object capable of serializing/deserializing
23
+ * Objects to/from JSON (usually, {@link sh.calaba.org.codehaus.jackson.map.ObjectMapper})
24
+ * can be exposed, without adding direct dependency to implementation.
25
+ * </li>
26
+ *</ul>
27
+ * </ul>
28
+ */
29
+
30
+ package sh.calaba.org.codehaus.jackson;
@@ -0,0 +1,82 @@
1
+ package sh.calaba.org.codehaus.jackson.schema;
2
+
3
+ import sh.calaba.org.codehaus.jackson.JsonNode;
4
+ import sh.calaba.org.codehaus.jackson.annotate.JsonCreator;
5
+ import sh.calaba.org.codehaus.jackson.annotate.JsonValue;
6
+ import sh.calaba.org.codehaus.jackson.node.JsonNodeFactory;
7
+ import sh.calaba.org.codehaus.jackson.node.ObjectNode;
8
+
9
+ /**
10
+ * A {@link sh.calaba.org.codehaus.jackson.JsonNode} that represents a JSON-Schema instance.
11
+ *
12
+ * @author Ryan Heaton
13
+ * @see <a href="http://json-schema.org/">JSON Schema</a>
14
+ */
15
+ public class JsonSchema
16
+ {
17
+ private final ObjectNode schema;
18
+
19
+ /**
20
+ * Main constructor for schema instances.
21
+ *<p>
22
+ * This is the creator constructor used by Jackson itself when
23
+ * deserializing instances. It is so-called delegating creator,
24
+ * meaning that its argument will be bound by Jackson before
25
+ * constructor gets called.
26
+ */
27
+ @JsonCreator
28
+ public JsonSchema(ObjectNode schema)
29
+ {
30
+ this.schema = schema;
31
+ }
32
+
33
+ /**
34
+ * Method for accessing root JSON object of the contained schema.
35
+ *<p>
36
+ * Note: this method is specified with {@link JsonValue} annotation
37
+ * to represent serialization to use; same as if explicitly
38
+ * serializing returned object.
39
+ *
40
+ * @return Root node of the schema tree
41
+ */
42
+ @JsonValue
43
+ public ObjectNode getSchemaNode()
44
+ {
45
+ return schema;
46
+ }
47
+
48
+ @Override
49
+ public String toString()
50
+ {
51
+ return this.schema.toString();
52
+ }
53
+
54
+ @Override
55
+ public boolean equals(Object o)
56
+ {
57
+ if (o == this) return true;
58
+ if (o == null) return false;
59
+ if (!(o instanceof JsonSchema)) return false;
60
+
61
+ JsonSchema other = (JsonSchema) o;
62
+ if (schema == null) {
63
+ return other.schema == null;
64
+ }
65
+ return schema.equals(other.schema);
66
+ }
67
+
68
+ /**
69
+ * Get the default schema node.
70
+ *
71
+ * @return The default schema node.
72
+ */
73
+ public static JsonNode getDefaultSchemaNode()
74
+ {
75
+ ObjectNode objectNode = JsonNodeFactory.instance.objectNode();
76
+ objectNode.put("type", "any");
77
+ // "required" is false by default, no need to include
78
+ //objectNode.put("required", false);
79
+ return objectNode;
80
+ }
81
+
82
+ }
@@ -0,0 +1,46 @@
1
+ package sh.calaba.org.codehaus.jackson.schema;
2
+
3
+ import java.lang.annotation.RetentionPolicy;
4
+ import java.lang.annotation.Retention;
5
+ import java.lang.annotation.ElementType;
6
+ import java.lang.annotation.Target;
7
+
8
+ import sh.calaba.org.codehaus.jackson.annotate.JacksonAnnotation;
9
+
10
+ /**
11
+ * Annotation that can be used to define JSON Schema definition for
12
+ * the annotated class.
13
+ *<p>
14
+ * Note that annotation is often not needed: for example, regular
15
+ * Jackson beans that Jackson can introspect can be used without
16
+ * annotations, to produce JSON schema definition.
17
+ *
18
+ * @author Ryan Heaton
19
+ */
20
+ @Target(ElementType.TYPE)
21
+ @Retention(RetentionPolicy.RUNTIME)
22
+ @JacksonAnnotation
23
+ public @interface JsonSerializableSchema
24
+ {
25
+ /**
26
+ * The schema type for this JsonSerializable instance.
27
+ * Possible values: "string", "number", "boolean", "object", "array", "null", "any"
28
+ *
29
+ * @return The schema type for this JsonSerializable instance.
30
+ */
31
+ String schemaType() default "any";
32
+
33
+ /**
34
+ * If the schema type is "object", the node that defines the properties of the object.
35
+ *
36
+ * @return The node representing the schema properties, or "##irrelevant" if irrelevant.
37
+ */
38
+ String schemaObjectPropertiesDefinition() default "##irrelevant";
39
+
40
+ /**
41
+ * If the schema type if "array", the node that defines the schema for the items in the array.
42
+ *
43
+ * @return The schema for the items in the array, or "##irrelevant" if irrelevant.
44
+ */
45
+ String schemaItemDefinition() default "##irrelevant";
46
+ }
@@ -0,0 +1,25 @@
1
+ package sh.calaba.org.codehaus.jackson.schema;
2
+
3
+ import sh.calaba.org.codehaus.jackson.JsonNode;
4
+ import sh.calaba.org.codehaus.jackson.map.JsonMappingException;
5
+ import sh.calaba.org.codehaus.jackson.map.SerializerProvider;
6
+
7
+ import java.lang.reflect.Type;
8
+
9
+ /**
10
+ * Marker interface for schema-aware serializers.
11
+ *
12
+ * @author Ryan Heaton
13
+ */
14
+ public interface SchemaAware
15
+ {
16
+ /**
17
+ * Get the representation of the schema to which this serializer will conform.
18
+ *
19
+ * @param provider The serializer provider.
20
+ * @param typeHint A hint about the type.
21
+ * @return <a href="http://json-schema.org/">Json-schema</a> for this serializer.
22
+ */
23
+ JsonNode getSchema(SerializerProvider provider, Type typeHint)
24
+ throws JsonMappingException;
25
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Classes needed for JSON schema support (currently just ability
3
+ * to generate schemas using serialization part of data mapping)
4
+ */
5
+ package sh.calaba.org.codehaus.jackson.schema;
@@ -0,0 +1,969 @@
1
+ package sh.calaba.org.codehaus.jackson.sym;
2
+
3
+ import java.util.Arrays;
4
+
5
+ import sh.calaba.org.codehaus.jackson.util.InternCache;
6
+
7
+ /**
8
+ * This class is basically a caching symbol table implementation used for
9
+ * canonicalizing {@link Name}s, constructed directly from a byte-based
10
+ * input source.
11
+ *
12
+ * @author Tatu Saloranta
13
+ */
14
+ public final class BytesToNameCanonicalizer
15
+ {
16
+ protected static final int DEFAULT_TABLE_SIZE = 64;
17
+
18
+ /**
19
+ * Let's not expand symbol tables past some maximum size;
20
+ * this should protected against OOMEs caused by large documents
21
+ * with uniquer (~= random) names.
22
+ *
23
+ * @since 1.5
24
+ */
25
+ protected static final int MAX_TABLE_SIZE = 0x10000; // 64k entries == 256k mem
26
+
27
+ /**
28
+ * Let's only share reasonably sized symbol tables. Max size set to 3/4 of 16k;
29
+ * this corresponds to 64k main hash index. This should allow for enough distinct
30
+ * names for almost any case.
31
+ */
32
+ final static int MAX_ENTRIES_FOR_REUSE = 6000;
33
+
34
+ final static int MIN_HASH_SIZE = 16;
35
+
36
+ final static int INITIAL_COLLISION_LEN = 32;
37
+
38
+ /**
39
+ * Bucket index is 8 bits, and value 0 is reserved to represent
40
+ * 'empty' status.
41
+ */
42
+ final static int LAST_VALID_BUCKET = 0xFE;
43
+
44
+ /*
45
+ /**********************************************************
46
+ /* Linkage, needed for merging symbol tables
47
+ /**********************************************************
48
+ */
49
+
50
+ final BytesToNameCanonicalizer _parent;
51
+
52
+ /*
53
+ /**********************************************************
54
+ /* Main table state
55
+ /**********************************************************
56
+ */
57
+
58
+ /**
59
+ * Whether canonial symbol Strings are to be intern()ed before added
60
+ * to the table or not
61
+ */
62
+ final boolean _intern;
63
+
64
+ // // // First, global information
65
+
66
+ /**
67
+ * Total number of Names in the symbol table
68
+ */
69
+ private int _count;
70
+
71
+ // // // Then information regarding primary hash array and its
72
+ // // // matching Name array
73
+
74
+ /**
75
+ * Mask used to truncate 32-bit hash value to current hash array
76
+ * size; essentially, hash array size - 1 (since hash array sizes
77
+ * are 2^N).
78
+ */
79
+ private int _mainHashMask;
80
+
81
+ /**
82
+ * Array of 2^N size, which contains combination
83
+ * of 24-bits of hash (0 to indicate 'empty' slot),
84
+ * and 8-bit collision bucket index (0 to indicate empty
85
+ * collision bucket chain; otherwise subtract one from index)
86
+ */
87
+ private int[] _mainHash;
88
+
89
+ /**
90
+ * Array that contains <code>Name</code> instances matching
91
+ * entries in <code>_mainHash</code>. Contains nulls for unused
92
+ * entries.
93
+ */
94
+ private Name[] _mainNames;
95
+
96
+ // // // Then the collision/spill-over area info
97
+
98
+ /**
99
+ * Array of heads of collision bucket chains; size dynamically
100
+ */
101
+ private Bucket[] _collList;
102
+
103
+ /**
104
+ * Total number of Names in collision buckets (included in
105
+ * <code>_count</code> along with primary entries)
106
+ */
107
+ private int _collCount;
108
+
109
+ /**
110
+ * Index of the first unused collision bucket entry (== size of
111
+ * the used portion of collision list): less than
112
+ * or equal to 0xFF (255), since max number of entries is 255
113
+ * (8-bit, minus 0 used as 'empty' marker)
114
+ */
115
+ private int _collEnd;
116
+
117
+ // // // Info regarding pending rehashing...
118
+
119
+ /**
120
+ * This flag is set if, after adding a new entry, it is deemed
121
+ * that a rehash is warranted if any more entries are to be added.
122
+ */
123
+ private transient boolean _needRehash;
124
+
125
+ /*
126
+ /**********************************************************
127
+ /* Sharing, versioning
128
+ /**********************************************************
129
+ */
130
+
131
+ // // // Which of the buffers may be shared (and are copy-on-write)?
132
+
133
+ /**
134
+ * Flag that indicates whether underlying data structures for
135
+ * the main hash area are shared or not. If they are, then they
136
+ * need to be handled in copy-on-write way, i.e. if they need
137
+ * to be modified, a copy needs to be made first; at this point
138
+ * it will not be shared any more, and can be modified.
139
+ *<p>
140
+ * This flag needs to be checked both when adding new main entries,
141
+ * and when adding new collision list queues (i.e. creating a new
142
+ * collision list head entry)
143
+ */
144
+ private boolean _mainHashShared;
145
+
146
+ private boolean _mainNamesShared;
147
+
148
+ /**
149
+ * Flag that indicates whether underlying data structures for
150
+ * the collision list are shared or not. If they are, then they
151
+ * need to be handled in copy-on-write way, i.e. if they need
152
+ * to be modified, a copy needs to be made first; at this point
153
+ * it will not be shared any more, and can be modified.
154
+ *<p>
155
+ * This flag needs to be checked when adding new collision entries.
156
+ */
157
+ private boolean _collListShared;
158
+
159
+ /*
160
+ /**********************************************************
161
+ /* Construction, merging
162
+ /**********************************************************
163
+ */
164
+
165
+ public static BytesToNameCanonicalizer createRoot()
166
+ {
167
+ return new BytesToNameCanonicalizer(DEFAULT_TABLE_SIZE, true);
168
+ }
169
+
170
+ /**
171
+ * @param intern Whether canonical symbol Strings should be interned
172
+ * or not
173
+ */
174
+ public synchronized BytesToNameCanonicalizer makeChild(boolean canonicalize,
175
+ boolean intern)
176
+ {
177
+ return new BytesToNameCanonicalizer(this, intern);
178
+ }
179
+
180
+ /**
181
+ * Method called by the using code to indicate it is done
182
+ * with this instance. This lets instance merge accumulated
183
+ * changes into parent (if need be), safely and efficiently,
184
+ * and without calling code having to know about parent
185
+ * information
186
+ */
187
+ public void release()
188
+ {
189
+ if (maybeDirty() && _parent != null) {
190
+ _parent.mergeChild(this);
191
+ /* Let's also mark this instance as dirty, so that just in
192
+ * case release was too early, there's no corruption
193
+ * of possibly shared data.
194
+ */
195
+ markAsShared();
196
+ }
197
+ }
198
+
199
+ private BytesToNameCanonicalizer(int hashSize, boolean intern)
200
+ {
201
+ _parent = null;
202
+ _intern = intern;
203
+ /* Sanity check: let's now allow hash sizes below certain
204
+ * min. value
205
+ */
206
+ if (hashSize < MIN_HASH_SIZE) {
207
+ hashSize = MIN_HASH_SIZE;
208
+ } else {
209
+ /* Also; size must be 2^N; otherwise hash algorithm won't
210
+ * work... so let's just pad it up, if so
211
+ */
212
+ if ((hashSize & (hashSize - 1)) != 0) { // only true if it's 2^N
213
+ int curr = MIN_HASH_SIZE;
214
+ while (curr < hashSize) {
215
+ curr += curr;
216
+ }
217
+ hashSize = curr;
218
+ }
219
+ }
220
+ initTables(hashSize);
221
+ }
222
+
223
+ /**
224
+ * Constructor used when creating a child instance
225
+ */
226
+ private BytesToNameCanonicalizer(BytesToNameCanonicalizer parent, boolean intern)
227
+ {
228
+ _parent = parent;
229
+ _intern = intern;
230
+
231
+ // First, let's copy the state as is:
232
+ _count = parent._count;
233
+ _mainHashMask = parent._mainHashMask;
234
+ _mainHash = parent._mainHash;
235
+ _mainNames = parent._mainNames;
236
+ _collList = parent._collList;
237
+ _collCount = parent._collCount;
238
+ _collEnd = parent._collEnd;
239
+ _needRehash = false;
240
+ // And consider all shared, so far:
241
+ _mainHashShared = true;
242
+ _mainNamesShared = true;
243
+ _collListShared = true;
244
+ }
245
+
246
+ private void initTables(int hashSize)
247
+ {
248
+ _count = 0;
249
+ _mainHash = new int[hashSize];
250
+ _mainNames = new Name[hashSize];
251
+ _mainHashShared = false;
252
+ _mainNamesShared = false;
253
+ _mainHashMask = hashSize - 1;
254
+
255
+ _collListShared = true; // just since it'll need to be allocated
256
+ _collList = null;
257
+ _collEnd = 0;
258
+
259
+ _needRehash = false;
260
+ }
261
+
262
+ private synchronized void mergeChild(BytesToNameCanonicalizer child)
263
+ {
264
+ // Only makes sense if child has more entries
265
+ int childCount = child._count;
266
+ if (childCount <= _count) {
267
+ return;
268
+ }
269
+
270
+ /* One caveat: let's try to avoid problems with
271
+ * degenerate cases of documents with generated "random"
272
+ * names: for these, symbol tables would bloat indefinitely.
273
+ * One way to do this is to just purge tables if they grow
274
+ * too large, and that's what we'll do here.
275
+ */
276
+ if (child.size() > MAX_ENTRIES_FOR_REUSE) {
277
+ /* Should there be a way to get notified about this
278
+ * event, to log it or such? (as it's somewhat abnormal
279
+ * thing to happen)
280
+ */
281
+ // At any rate, need to clean up the tables, then:
282
+ initTables(DEFAULT_TABLE_SIZE);
283
+ } else {
284
+ _count = child._count;
285
+ _mainHash = child._mainHash;
286
+ _mainNames = child._mainNames;
287
+ _mainHashShared = true; // shouldn't matter for parent
288
+ _mainNamesShared = true; // - "" -
289
+ _mainHashMask = child._mainHashMask;
290
+ _collList = child._collList;
291
+ _collCount = child._collCount;
292
+ _collEnd = child._collEnd;
293
+ }
294
+ }
295
+
296
+ private void markAsShared()
297
+ {
298
+ _mainHashShared = true;
299
+ _mainNamesShared = true;
300
+ _collListShared = true;
301
+ }
302
+
303
+ /*
304
+ /**********************************************************
305
+ /* API, accessors
306
+ /**********************************************************
307
+ */
308
+
309
+ public int size() { return _count; }
310
+
311
+ /**
312
+ * Method called to check to quickly see if a child symbol table
313
+ * may have gotten additional entries. Used for checking to see
314
+ * if a child table should be merged into shared table.
315
+ */
316
+ public boolean maybeDirty()
317
+ {
318
+ return !_mainHashShared;
319
+ }
320
+
321
+ public static Name getEmptyName()
322
+ {
323
+ return Name1.getEmptyName();
324
+ }
325
+
326
+ /**
327
+ * Finds and returns name matching the specified symbol, if such
328
+ * name already exists in the table.
329
+ * If not, will return null.
330
+ *<p>
331
+ * Note: separate methods to optimize common case of
332
+ * short element/attribute names (4 or less ascii characters)
333
+ *
334
+ * @param firstQuad int32 containing first 4 bytes of the name;
335
+ * if the whole name less than 4 bytes, padded with zero bytes
336
+ * in front (zero MSBs, ie. right aligned)
337
+ *
338
+ * @return Name matching the symbol passed (or constructed for
339
+ * it)
340
+ */
341
+ public Name findName(int firstQuad)
342
+ {
343
+ int hash = calcHash(firstQuad);
344
+ int ix = (hash & _mainHashMask);
345
+ int val = _mainHash[ix];
346
+
347
+ /* High 24 bits of the value are low 24 bits of hash (low 8 bits
348
+ * are bucket index)... match?
349
+ */
350
+ if ((((val >> 8) ^ hash) << 8) == 0) { // match
351
+ // Ok, but do we have an actual match?
352
+ Name name = _mainNames[ix];
353
+ if (name == null) { // main slot empty; can't find
354
+ return null;
355
+ }
356
+ if (name.equals(firstQuad)) {
357
+ return name;
358
+ }
359
+ } else if (val == 0) { // empty slot? no match
360
+ return null;
361
+ }
362
+ // Maybe a spill-over?
363
+ val &= 0xFF;
364
+ if (val > 0) { // 0 means 'empty'
365
+ val -= 1; // to convert from 1-based to 0...
366
+ Bucket bucket = _collList[val];
367
+ if (bucket != null) {
368
+ return bucket.find(hash, firstQuad, 0);
369
+ }
370
+ }
371
+ // Nope, no match whatsoever
372
+ return null;
373
+ }
374
+
375
+ /**
376
+ * Finds and returns name matching the specified symbol, if such
377
+ * name already exists in the table.
378
+ * If not, will return null.
379
+ *<p>
380
+ * Note: separate methods to optimize common case of relatively
381
+ * short element/attribute names (8 or less ascii characters)
382
+ *
383
+ * @param firstQuad int32 containing first 4 bytes of the name.
384
+ * @param secondQuad int32 containing bytes 5 through 8 of the
385
+ * name; if less than 8 bytes, padded with up to 3 zero bytes
386
+ * in front (zero MSBs, ie. right aligned)
387
+ *
388
+ * @return Name matching the symbol passed (or constructed for
389
+ * it)
390
+ */
391
+ public Name findName(int firstQuad, int secondQuad)
392
+ {
393
+ int hash = calcHash(firstQuad, secondQuad);
394
+ int ix = (hash & _mainHashMask);
395
+ int val = _mainHash[ix];
396
+
397
+ /* High 24 bits of the value are low 24 bits of hash (low 8 bits
398
+ * are bucket index)... match?
399
+ */
400
+ if ((((val >> 8) ^ hash) << 8) == 0) { // match
401
+ // Ok, but do we have an actual match?
402
+ Name name = _mainNames[ix];
403
+ if (name == null) { // main slot empty; can't find
404
+ return null;
405
+ }
406
+ if (name.equals(firstQuad, secondQuad)) {
407
+ return name;
408
+ }
409
+ } else if (val == 0) { // empty slot? no match
410
+ return null;
411
+ }
412
+ // Maybe a spill-over?
413
+ val &= 0xFF;
414
+ if (val > 0) { // 0 means 'empty'
415
+ val -= 1; // to convert from 1-based to 0...
416
+ Bucket bucket = _collList[val];
417
+ if (bucket != null) {
418
+ return bucket.find(hash, firstQuad, secondQuad);
419
+ }
420
+ }
421
+ // Nope, no match whatsoever
422
+ return null;
423
+ }
424
+
425
+ /**
426
+ * Finds and returns name matching the specified symbol, if such
427
+ * name already exists in the table; or if not, creates name object,
428
+ * adds to the table, and returns it.
429
+ *<p>
430
+ * Note: this is the general purpose method that can be called for
431
+ * names of any length. However, if name is less than 9 bytes long,
432
+ * it is preferable to call the version optimized for short
433
+ * names.
434
+ *
435
+ * @param quads Array of int32s, each of which contain 4 bytes of
436
+ * encoded name
437
+ * @param qlen Number of int32s, starting from index 0, in quads
438
+ * parameter
439
+ *
440
+ * @return Name matching the symbol passed (or constructed for it)
441
+ */
442
+ public Name findName(int[] quads, int qlen)
443
+ {
444
+ /* // Not needed, never gets called
445
+ if (qlen < 3) { // another sanity check
446
+ return findName(quads[0], (qlen < 2) ? 0 : quads[1]);
447
+ }
448
+ */
449
+ int hash = calcHash(quads, qlen);
450
+ // (for rest of comments regarding logic, see method above)
451
+ int ix = (hash & _mainHashMask);
452
+ int val = _mainHash[ix];
453
+ if ((((val >> 8) ^ hash) << 8) == 0) {
454
+ Name name = _mainNames[ix];
455
+ if (name == null // main slot empty; no collision list then either
456
+ || name.equals(quads, qlen)) { // should be match, let's verify
457
+ return name;
458
+ }
459
+ } else if (val == 0) { // empty slot? no match
460
+ return null;
461
+ }
462
+ val &= 0xFF;
463
+ if (val > 0) { // 0 means 'empty'
464
+ val -= 1; // to convert from 1-based to 0...
465
+ Bucket bucket = _collList[val];
466
+ if (bucket != null) {
467
+ return bucket.find(hash, quads, qlen);
468
+ }
469
+ }
470
+ return null;
471
+ }
472
+
473
+ /*
474
+ /**********************************************************
475
+ /* API, mutators
476
+ /**********************************************************
477
+ */
478
+
479
+ /**
480
+ * @since 1.6.0
481
+ */
482
+ public Name addName(String symbolStr, int q1, int q2)
483
+ {
484
+ if (_intern) {
485
+ symbolStr = InternCache.instance.intern(symbolStr);
486
+ }
487
+ int hash = (q2 == 0) ? calcHash(q1) : calcHash(q1, q2);
488
+ Name symbol = constructName(hash, symbolStr, q1, q2);
489
+ _addSymbol(hash, symbol);
490
+ return symbol;
491
+ }
492
+
493
+ public Name addName(String symbolStr, int[] quads, int qlen)
494
+ {
495
+ if (_intern) {
496
+ symbolStr = InternCache.instance.intern(symbolStr);
497
+ }
498
+ int hash = calcHash(quads, qlen);
499
+ Name symbol = constructName(hash, symbolStr, quads, qlen);
500
+ _addSymbol(hash, symbol);
501
+ return symbol;
502
+ }
503
+
504
+ /*
505
+ /**********************************************************
506
+ /* Helper methods
507
+ /**********************************************************
508
+ */
509
+
510
+ public final static int calcHash(int firstQuad)
511
+ {
512
+ int hash = firstQuad;
513
+ hash ^= (hash >>> 16); // to xor hi- and low- 16-bits
514
+ hash ^= (hash >>> 8); // as well as lowest 2 bytes
515
+ return hash;
516
+ }
517
+
518
+ public final static int calcHash(int firstQuad, int secondQuad)
519
+ {
520
+ int hash = (firstQuad * 31) + secondQuad;
521
+
522
+ // If this was called for single-quad instance:
523
+ //int hash = (secondQuad == 0) ? firstQuad : ((firstQuad * 31) + secondQuad);
524
+
525
+ hash ^= (hash >>> 16); // to xor hi- and low- 16-bits
526
+ hash ^= (hash >>> 8); // as well as lowest 2 bytes
527
+ return hash;
528
+ }
529
+
530
+ public final static int calcHash(int[] quads, int qlen)
531
+ {
532
+ // Note: may be called for qlen < 3
533
+ int hash = quads[0];
534
+ for (int i = 1; i < qlen; ++i) {
535
+ hash = (hash * 31) + quads[i];
536
+ }
537
+
538
+ hash ^= (hash >>> 16); // to xor hi- and low- 16-bits
539
+ hash ^= (hash >>> 8); // as well as lowest 2 bytes
540
+
541
+ return hash;
542
+ }
543
+
544
+ /* 26-Nov-2008, tatu: not used currently; if not used in near future,
545
+ * let's just delete it.
546
+ */
547
+ /*
548
+ public static int[] calcQuads(byte[] wordBytes)
549
+ {
550
+ int blen = wordBytes.length;
551
+ int[] result = new int[(blen + 3) / 4];
552
+ for (int i = 0; i < blen; ++i) {
553
+ int x = wordBytes[i] & 0xFF;
554
+
555
+ if (++i < blen) {
556
+ x = (x << 8) | (wordBytes[i] & 0xFF);
557
+ if (++i < blen) {
558
+ x = (x << 8) | (wordBytes[i] & 0xFF);
559
+ if (++i < blen) {
560
+ x = (x << 8) | (wordBytes[i] & 0xFF);
561
+ }
562
+ }
563
+ }
564
+ result[i >> 2] = x;
565
+ }
566
+ return result;
567
+ }
568
+ */
569
+
570
+ /*
571
+ /**********************************************************
572
+ /* Standard methods
573
+ /**********************************************************
574
+ */
575
+
576
+ /*
577
+ @Override
578
+ public String toString()
579
+ {
580
+ StringBuilder sb = new StringBuilder();
581
+ sb.append("[BytesToNameCanonicalizer, size: ");
582
+ sb.append(_count);
583
+ sb.append('/');
584
+ sb.append(_mainHash.length);
585
+ sb.append(", ");
586
+ sb.append(_collCount);
587
+ sb.append(" coll; avg length: ");
588
+
589
+ // Average length: minimum of 1 for all (1 == primary hit);
590
+ // and then 1 per each traversal for collisions/buckets
591
+ //int maxDist = 1;
592
+ int pathCount = _count;
593
+ for (int i = 0; i < _collEnd; ++i) {
594
+ int spillLen = _collList[i].length();
595
+ for (int j = 1; j <= spillLen; ++j) {
596
+ pathCount += j;
597
+ }
598
+ }
599
+ double avgLength;
600
+
601
+ if (_count == 0) {
602
+ avgLength = 0.0;
603
+ } else {
604
+ avgLength = (double) pathCount / (double) _count;
605
+ }
606
+ // let's round up a bit (two 2 decimal places)
607
+ //avgLength -= (avgLength % 0.01);
608
+
609
+ sb.append(avgLength);
610
+ sb.append(']');
611
+ return sb.toString();
612
+ }
613
+ */
614
+
615
+ /*
616
+ /**********************************************************
617
+ /* Internal methods
618
+ /**********************************************************
619
+ */
620
+
621
+ private void _addSymbol(int hash, Name symbol)
622
+ {
623
+ if (_mainHashShared) { // always have to modify main entry
624
+ unshareMain();
625
+ }
626
+ // First, do we need to rehash?
627
+ if (_needRehash) {
628
+ rehash();
629
+ }
630
+
631
+ ++_count;
632
+
633
+ /* Ok, enough about set up: now we need to find the slot to add
634
+ * symbol in:
635
+ */
636
+ int ix = (hash & _mainHashMask);
637
+ if (_mainNames[ix] == null) { // primary empty?
638
+ _mainHash[ix] = (hash << 8);
639
+ if (_mainNamesShared) {
640
+ unshareNames();
641
+ }
642
+ _mainNames[ix] = symbol;
643
+ } else { // nope, it's a collision, need to spill over
644
+ /* How about spill-over area... do we already know the bucket
645
+ * (is the case if it's not the first collision)
646
+ */
647
+ if (_collListShared) {
648
+ unshareCollision(); // also allocates if list was null
649
+ }
650
+
651
+ ++_collCount;
652
+ int entryValue = _mainHash[ix];
653
+ int bucket = entryValue & 0xFF;
654
+ if (bucket == 0) { // first spill over?
655
+ if (_collEnd <= LAST_VALID_BUCKET) { // yup, still unshared bucket
656
+ bucket = _collEnd;
657
+ ++_collEnd;
658
+ // need to expand?
659
+ if (bucket >= _collList.length) {
660
+ expandCollision();
661
+ }
662
+ } else { // nope, have to share... let's find shortest?
663
+ bucket = findBestBucket();
664
+ }
665
+ // Need to mark the entry... and the spill index is 1-based
666
+ _mainHash[ix] = (entryValue & ~0xFF) | (bucket + 1);
667
+ } else {
668
+ --bucket; // 1-based index in value
669
+ }
670
+
671
+ // And then just need to link the new bucket entry in
672
+ _collList[bucket] = new Bucket(symbol, _collList[bucket]);
673
+ }
674
+
675
+ /* Ok. Now, do we need a rehash next time? Need to have at least
676
+ * 50% fill rate no matter what:
677
+ */
678
+ {
679
+ int hashSize = _mainHash.length;
680
+ if (_count > (hashSize >> 1)) {
681
+ int hashQuarter = (hashSize >> 2);
682
+ /* And either strictly above 75% (the usual) or
683
+ * just 50%, and collision count >= 25% of total hash size
684
+ */
685
+ if (_count > (hashSize - hashQuarter)) {
686
+ _needRehash = true;
687
+ } else if (_collCount >= hashQuarter) {
688
+ _needRehash = true;
689
+ }
690
+ }
691
+ }
692
+ }
693
+
694
+ private void rehash()
695
+ {
696
+ _needRehash = false;
697
+ // Note: since we'll make copies, no need to unshare, can just mark as such:
698
+ _mainNamesShared = false;
699
+
700
+ /* And then we can first deal with the main hash area. Since we
701
+ * are expanding linearly (double up), we know there'll be no
702
+ * collisions during this phase.
703
+ */
704
+ int[] oldMainHash = _mainHash;
705
+ int len = oldMainHash.length;
706
+ int newLen = len+len;
707
+
708
+ /* 13-Mar-2010, tatu: Let's guard against OOME that could be caused by
709
+ * large documents with unique (or mostly so) names
710
+ */
711
+ if (newLen > MAX_TABLE_SIZE) {
712
+ nukeSymbols();
713
+ return;
714
+ }
715
+
716
+ _mainHash = new int[newLen];
717
+ _mainHashMask = (newLen - 1);
718
+ Name[] oldNames = _mainNames;
719
+ _mainNames = new Name[newLen];
720
+ int symbolsSeen = 0; // let's do a sanity check
721
+ for (int i = 0; i < len; ++i) {
722
+ Name symbol = oldNames[i];
723
+ if (symbol != null) {
724
+ ++symbolsSeen;
725
+ int hash = symbol.hashCode();
726
+ int ix = (hash & _mainHashMask);
727
+ _mainNames[ix] = symbol;
728
+ _mainHash[ix] = hash << 8; // will clear spill index
729
+ }
730
+ }
731
+
732
+ /* And then the spill area. This may cause collisions, although
733
+ * not necessarily as many as there were earlier. Let's allocate
734
+ * same amount of space, however
735
+ */
736
+ int oldEnd = _collEnd;
737
+ if (oldEnd == 0) { // no prior collisions...
738
+ return;
739
+ }
740
+
741
+ _collCount = 0;
742
+ _collEnd = 0;
743
+ _collListShared = false;
744
+
745
+ Bucket[] oldBuckets = _collList;
746
+ _collList = new Bucket[oldBuckets.length];
747
+ for (int i = 0; i < oldEnd; ++i) {
748
+ for (Bucket curr = oldBuckets[i]; curr != null; curr = curr._next) {
749
+ ++symbolsSeen;
750
+ Name symbol = curr._name;
751
+ int hash = symbol.hashCode();
752
+ int ix = (hash & _mainHashMask);
753
+ int val = _mainHash[ix];
754
+ if (_mainNames[ix] == null) { // no primary entry?
755
+ _mainHash[ix] = (hash << 8);
756
+ _mainNames[ix] = symbol;
757
+ } else { // nope, it's a collision, need to spill over
758
+ ++_collCount;
759
+ int bucket = val & 0xFF;
760
+ if (bucket == 0) { // first spill over?
761
+ if (_collEnd <= LAST_VALID_BUCKET) { // yup, still unshared bucket
762
+ bucket = _collEnd;
763
+ ++_collEnd;
764
+ // need to expand?
765
+ if (bucket >= _collList.length) {
766
+ expandCollision();
767
+ }
768
+ } else { // nope, have to share... let's find shortest?
769
+ bucket = findBestBucket();
770
+ }
771
+ // Need to mark the entry... and the spill index is 1-based
772
+ _mainHash[ix] = (val & ~0xFF) | (bucket + 1);
773
+ } else {
774
+ --bucket; // 1-based index in value
775
+ }
776
+ // And then just need to link the new bucket entry in
777
+ _collList[bucket] = new Bucket(symbol, _collList[bucket]);
778
+ }
779
+ } // for (... buckets in the chain ...)
780
+ } // for (... list of bucket heads ... )
781
+
782
+ if (symbolsSeen != _count) { // sanity check
783
+ throw new RuntimeException("Internal error: count after rehash "+symbolsSeen+"; should be "+_count);
784
+ }
785
+ }
786
+
787
+ /**
788
+ * Helper method called to empty all shared symbols, but to leave
789
+ * arrays allocated
790
+ */
791
+ private void nukeSymbols()
792
+ {
793
+ _count = 0;
794
+ Arrays.fill(_mainHash, 0);
795
+ Arrays.fill(_mainNames, null);
796
+ Arrays.fill(_collList, null);
797
+ _collCount = 0;
798
+ _collEnd = 0;
799
+ }
800
+
801
+ /**
802
+ * Method called to find the best bucket to spill a Name over to:
803
+ * usually the first bucket that has only one entry, but in general
804
+ * first one of the buckets with least number of entries
805
+ */
806
+ private int findBestBucket()
807
+ {
808
+ Bucket[] buckets = _collList;
809
+ int bestCount = Integer.MAX_VALUE;
810
+ int bestIx = -1;
811
+
812
+ for (int i = 0, len = _collEnd; i < len; ++i) {
813
+ int count = buckets[i].length();
814
+ if (count < bestCount) {
815
+ if (count == 1) { // best possible
816
+ return i;
817
+ }
818
+ bestCount = count;
819
+ bestIx = i;
820
+ }
821
+ }
822
+ return bestIx;
823
+ }
824
+
825
+ /**
826
+ * Method that needs to be called, if the main hash structure
827
+ * is (may be) shared. This happens every time something is added,
828
+ * even if addition is to the collision list (since collision list
829
+ * index comes from lowest 8 bits of the primary hash entry)
830
+ */
831
+ private void unshareMain()
832
+ {
833
+ int[] old = _mainHash;
834
+ int len = _mainHash.length;
835
+
836
+ _mainHash = new int[len];
837
+ System.arraycopy(old, 0, _mainHash, 0, len);
838
+ _mainHashShared = false;
839
+ }
840
+
841
+ private void unshareCollision()
842
+ {
843
+ Bucket[] old = _collList;
844
+ if (old == null) {
845
+ _collList = new Bucket[INITIAL_COLLISION_LEN];
846
+ } else {
847
+ int len = old.length;
848
+ _collList = new Bucket[len];
849
+ System.arraycopy(old, 0, _collList, 0, len);
850
+ }
851
+ _collListShared = false;
852
+ }
853
+
854
+ private void unshareNames()
855
+ {
856
+ Name[] old = _mainNames;
857
+ int len = old.length;
858
+ _mainNames = new Name[len];
859
+ System.arraycopy(old, 0, _mainNames, 0, len);
860
+ _mainNamesShared = false;
861
+ }
862
+
863
+ private void expandCollision()
864
+ {
865
+ Bucket[] old = _collList;
866
+ int len = old.length;
867
+ _collList = new Bucket[len+len];
868
+ System.arraycopy(old, 0, _collList, 0, len);
869
+ }
870
+
871
+
872
+ /*
873
+ /**********************************************************
874
+ /* Constructing name objects
875
+ /**********************************************************
876
+ */
877
+
878
+ private static Name constructName(int hash, String name, int q1, int q2)
879
+ {
880
+ if (q2 == 0) { // one quad only?
881
+ return new Name1(name, hash, q1);
882
+ }
883
+ return new Name2(name, hash, q1, q2);
884
+ }
885
+
886
+ private static Name constructName(int hash, String name, int[] quads, int qlen)
887
+ {
888
+ if (qlen < 4) { // Need to check for 3 quad one, can do others too
889
+ switch (qlen) {
890
+ case 1:
891
+ return new Name1(name, hash, quads[0]);
892
+ case 2:
893
+ return new Name2(name, hash, quads[0], quads[1]);
894
+ case 3:
895
+ return new Name3(name, hash, quads[0], quads[1], quads[2]);
896
+ default:
897
+ }
898
+ }
899
+ // Otherwise, need to copy the incoming buffer
900
+ int[] buf = new int[qlen];
901
+ for (int i = 0; i < qlen; ++i) {
902
+ buf[i] = quads[i];
903
+ }
904
+ return new NameN(name, hash, buf, qlen);
905
+ }
906
+
907
+ /*
908
+ /**********************************************************
909
+ /* Helper classes
910
+ /**********************************************************
911
+ */
912
+
913
+ final static class Bucket
914
+ {
915
+ protected final Name _name;
916
+ protected final Bucket _next;
917
+
918
+ Bucket(Name name, Bucket next)
919
+ {
920
+ _name = name;
921
+ _next = next;
922
+ }
923
+
924
+ public int length()
925
+ {
926
+ int len = 1;
927
+ for (Bucket curr = _next; curr != null; curr = curr._next) {
928
+ ++len;
929
+ }
930
+ return len;
931
+ }
932
+
933
+ public Name find(int hash, int firstQuad, int secondQuad)
934
+ {
935
+ if (_name.hashCode() == hash) {
936
+ if (_name.equals(firstQuad, secondQuad)) {
937
+ return _name;
938
+ }
939
+ }
940
+ for (Bucket curr = _next; curr != null; curr = curr._next) {
941
+ Name currName = curr._name;
942
+ if (currName.hashCode() == hash) {
943
+ if (currName.equals(firstQuad, secondQuad)) {
944
+ return currName;
945
+ }
946
+ }
947
+ }
948
+ return null;
949
+ }
950
+
951
+ public Name find(int hash, int[] quads, int qlen)
952
+ {
953
+ if (_name.hashCode() == hash) {
954
+ if (_name.equals(quads, qlen)) {
955
+ return _name;
956
+ }
957
+ }
958
+ for (Bucket curr = _next; curr != null; curr = curr._next) {
959
+ Name currName = curr._name;
960
+ if (currName.hashCode() == hash) {
961
+ if (currName.equals(quads, qlen)) {
962
+ return currName;
963
+ }
964
+ }
965
+ }
966
+ return null;
967
+ }
968
+ }
969
+ }