calabash-android 0.4.7.pre4 → 0.4.7.pre6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (446) hide show
  1. checksums.yaml +4 -4
  2. data/lib/calabash-android/helpers.rb +22 -1
  3. data/lib/calabash-android/lib/TestServer.apk +0 -0
  4. data/lib/calabash-android/lib/apktool-cli-1.5.3-SNAPSHOT.jar +0 -0
  5. data/lib/calabash-android/version.rb +1 -1
  6. data/test-server/instrumentation-backend/.classpath +4 -1
  7. data/test-server/instrumentation-backend/libs/jackson-annotations-2.2.0-rc2-20130418.042013-1.jar +0 -0
  8. data/test-server/instrumentation-backend/libs/jackson-core-2.2.0-rc2-20130420.041001-2.jar +0 -0
  9. data/test-server/instrumentation-backend/libs/jackson-databind-2.2.0-rc2-20130422.041053-3.jar +0 -0
  10. data/test-server/instrumentation-backend/libs/robotium-solo-4.1.jar +0 -0
  11. data/test-server/instrumentation-backend/src/org/antlr/runtime/LegacyCommonTokenStream.java +6 -1
  12. data/test-server/instrumentation-backend/src/org/antlr/runtime/debug/DebugTokenStream.java +3 -3
  13. data/test-server/instrumentation-backend/src/org/antlr/runtime/misc/FastQueue.java +1 -1
  14. data/test-server/instrumentation-backend/src/org/antlr/runtime/tree/BaseTreeAdaptor.java +4 -4
  15. data/test-server/instrumentation-backend/src/org/antlr/runtime/tree/CommonErrorNode.java +8 -1
  16. data/test-server/instrumentation-backend/src/org/antlr/runtime/tree/TreeIterator.java +2 -3
  17. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/CalabashInstrumentationTestRunner.java +1 -1
  18. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/InstrumentationBackend.java +2 -2
  19. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/HttpServer.java +21 -11
  20. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/NanoHTTPD.java +127 -68
  21. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/button/PressButtonText.java +2 -2
  22. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/button/PressImageButtonDescription.java +2 -3
  23. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/gestures/Swipe.java +0 -1
  24. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/list/GetListData.java +1 -1
  25. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/list/GetListItemProperties.java +1 -1
  26. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/list/GetListItemText.java +1 -1
  27. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/AssertGridViewContainsNoDuplicates.java +4 -4
  28. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/Press.java +1 -1
  29. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/SelectTab.java +4 -4
  30. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/wait/WaitForProgress.java +1 -1
  31. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/wait/WaitForTab.java +4 -4
  32. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/QueryHelper.java +2 -1
  33. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/json/JSONUtils.java +1 -1
  34. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/QueryResult.java +2 -2
  35. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/ast/UIQueryASTClassName.java +0 -2
  36. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/ast/UIQueryUtils.java +3 -2
  37. metadata +7 -411
  38. data/test-server/instrumentation-backend/libs/robotium-solo-3.6.jar +0 -0
  39. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/activity/GetOpenedActivities.java +0 -31
  40. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/activity/GoBackToActivity.java +0 -67
  41. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Base64Variant.java +0 -413
  42. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Base64Variants.java +0 -90
  43. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/FormatSchema.java +0 -29
  44. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonEncoding.java +0 -47
  45. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonFactory.java +0 -937
  46. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonGenerationException.java +0 -28
  47. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonGenerator.java +0 -1197
  48. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonLocation.java +0 -141
  49. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonNode.java +0 -879
  50. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonParseException.java +0 -23
  51. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonParser.java +0 -1434
  52. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonProcessingException.java +0 -80
  53. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonStreamContext.java +0 -122
  54. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonToken.java +0 -161
  55. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/ObjectCodec.java +0 -157
  56. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/PrettyPrinter.java +0 -166
  57. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/SerializableString.java +0 -54
  58. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Version.java +0 -90
  59. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Versioned.java +0 -20
  60. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JacksonAnnotation.java +0 -20
  61. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonAnyGetter.java +0 -25
  62. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonAnySetter.java +0 -24
  63. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonAutoDetect.java +0 -148
  64. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonBackReference.java +0 -41
  65. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonCreator.java +0 -19
  66. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonGetter.java +0 -35
  67. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonIgnore.java +0 -57
  68. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonIgnoreProperties.java +0 -48
  69. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonIgnoreType.java +0 -33
  70. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonManagedReference.java +0 -41
  71. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonMethod.java +0 -90
  72. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonProperty.java +0 -38
  73. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonPropertyOrder.java +0 -46
  74. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonRawValue.java +0 -33
  75. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonSetter.java +0 -33
  76. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonSubTypes.java +0 -44
  77. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonTypeInfo.java +0 -236
  78. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonTypeName.java +0 -28
  79. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonUnwrapped.java +0 -76
  80. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonValue.java +0 -46
  81. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonWriteNullProperties.java +0 -34
  82. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/package-info.java +0 -16
  83. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/DataFormatDetector.java +0 -176
  84. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/DataFormatMatcher.java +0 -117
  85. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/InputAccessor.java +0 -130
  86. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/MatchStrength.java +0 -64
  87. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/package-info.java +0 -8
  88. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/ByteSourceBootstrapper.java +0 -518
  89. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/DefaultPrettyPrinter.java +0 -13
  90. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/Indenter.java +0 -23
  91. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonGeneratorBase.java +0 -570
  92. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonNumericParserBase.java +0 -20
  93. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonParserBase.java +0 -1067
  94. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonParserMinimalBase.java +0 -539
  95. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonReadContext.java +0 -188
  96. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonWriteContext.java +0 -178
  97. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/ReaderBasedParser.java +0 -1815
  98. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/ReaderBasedParserBase.java +0 -228
  99. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/StreamBasedParserBase.java +0 -197
  100. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/Utf8Generator.java +0 -1757
  101. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/Utf8StreamParser.java +0 -2966
  102. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/WriterBasedGenerator.java +0 -1815
  103. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/package-info.java +0 -6
  104. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/BaseReader.java +0 -117
  105. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/CharacterEscapes.java +0 -73
  106. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/IOContext.java +0 -239
  107. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/InputDecorator.java +0 -67
  108. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/JsonStringEncoder.java +0 -408
  109. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/MergedStream.java +0 -145
  110. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/NumberInput.java +0 -303
  111. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/NumberOutput.java +0 -398
  112. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/OutputDecorator.java +0 -40
  113. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/SegmentedStringWriter.java +0 -104
  114. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/SerializedString.java +0 -114
  115. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/UTF32Reader.java +0 -214
  116. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/UTF8Writer.java +0 -387
  117. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/package.html +0 -4
  118. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/AbstractTypeResolver.java +0 -63
  119. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/AnnotationIntrospector.java +0 -1485
  120. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/BeanDescription.java +0 -171
  121. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/BeanProperty.java +0 -123
  122. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/BeanPropertyDefinition.java +0 -66
  123. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ClassIntrospector.java +0 -117
  124. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ContextualDeserializer.java +0 -38
  125. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ContextualKeyDeserializer.java +0 -33
  126. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ContextualSerializer.java +0 -38
  127. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializationConfig.java +0 -926
  128. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializationContext.java +0 -262
  129. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializationProblemHandler.java +0 -56
  130. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializerFactory.java +0 -356
  131. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializerProvider.java +0 -185
  132. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/Deserializers.java +0 -339
  133. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/HandlerInstantiator.java +0 -115
  134. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/InjectableValues.java +0 -85
  135. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonDeserializer.java +0 -166
  136. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonMappingException.java +0 -335
  137. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonSerializable.java +0 -34
  138. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonSerializableWithType.java +0 -22
  139. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonSerializer.java +0 -138
  140. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/KeyDeserializer.java +0 -31
  141. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/KeyDeserializers.java +0 -21
  142. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/MapperConfig.java +0 -1154
  143. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/MappingIterator.java +0 -190
  144. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/MappingJsonFactory.java +0 -81
  145. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/Module.java +0 -255
  146. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ObjectMapper.java +0 -2885
  147. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ObjectReader.java +0 -958
  148. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ObjectWriter.java +0 -554
  149. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/PropertyNamingStrategy.java +0 -258
  150. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ResolvableDeserializer.java +0 -23
  151. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ResolvableSerializer.java +0 -23
  152. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/RuntimeJsonMappingException.java +0 -21
  153. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/SerializationConfig.java +0 -1041
  154. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/SerializerFactory.java +0 -198
  155. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/SerializerProvider.java +0 -552
  156. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/Serializers.java +0 -137
  157. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/TypeDeserializer.java +0 -118
  158. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/TypeSerializer.java +0 -164
  159. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JacksonInject.java +0 -30
  160. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JacksonStdImpl.java +0 -25
  161. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonCachable.java +0 -32
  162. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonDeserialize.java +0 -109
  163. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonFilter.java +0 -31
  164. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonRootName.java +0 -29
  165. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonSerialize.java +0 -216
  166. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonTypeIdResolver.java +0 -35
  167. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonTypeResolver.java +0 -28
  168. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonValueInstantiator.java +0 -26
  169. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonView.java +0 -37
  170. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/NoClass.java +0 -19
  171. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/package-info.java +0 -5
  172. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/AbstractDeserializer.java +0 -102
  173. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ArrayDeserializer.java +0 -28
  174. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ArrayDeserializers.java +0 -11
  175. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BasicDeserializerFactory.java +0 -894
  176. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializer.java +0 -1537
  177. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializerBuilder.java +0 -277
  178. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializerFactory.java +0 -1474
  179. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializerModifier.java +0 -58
  180. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/CollectionDeserializer.java +0 -47
  181. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ContainerDeserializer.java +0 -14
  182. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/CustomDeserializerFactory.java +0 -227
  183. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/DateDeserializer.java +0 -9
  184. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/EnumDeserializer.java +0 -15
  185. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/EnumResolver.java +0 -17
  186. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/FromStringDeserializer.java +0 -13
  187. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/JsonNodeDeserializer.java +0 -54
  188. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/MapDeserializer.java +0 -44
  189. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/SettableAnyProperty.java +0 -177
  190. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/SettableBeanProperty.java +0 -827
  191. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializationContext.java +0 -326
  192. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializer.java +0 -94
  193. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializerProvider.java +0 -494
  194. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializers.java +0 -119
  195. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdKeyDeserializer.java +0 -12
  196. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdKeyDeserializers.java +0 -11
  197. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdScalarDeserializer.java +0 -13
  198. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ThrowableDeserializer.java +0 -13
  199. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/UntypedObjectDeserializer.java +0 -9
  200. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ValueInstantiator.java +0 -280
  201. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ValueInstantiators.java +0 -52
  202. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/BeanPropertyMap.java +0 -257
  203. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/CreatorCollector.java +0 -141
  204. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/CreatorProperty.java +0 -152
  205. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/ExternalTypeHandler.java +0 -173
  206. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/PropertyBasedCreator.java +0 -117
  207. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/PropertyValue.java +0 -117
  208. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/PropertyValueBuffer.java +0 -102
  209. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/UnwrappedPropertyHandler.java +0 -41
  210. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/ValueInjector.java +0 -45
  211. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/package-info.java +0 -9
  212. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/package-info.java +0 -5
  213. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/AtomicBooleanDeserializer.java +0 -22
  214. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/AtomicReferenceDeserializer.java +0 -47
  215. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/CalendarDeserializer.java +0 -47
  216. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ClassDeserializer.java +0 -49
  217. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/CollectionDeserializer.java +0 -265
  218. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ContainerDeserializerBase.java +0 -37
  219. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/DateDeserializer.java +0 -30
  220. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/EnumDeserializer.java +0 -139
  221. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/EnumMapDeserializer.java +0 -90
  222. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/EnumSetDeserializer.java +0 -89
  223. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/FromStringDeserializer.java +0 -265
  224. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/JavaTypeDeserializer.java +0 -38
  225. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/JsonNodeDeserializer.java +0 -314
  226. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/MapDeserializer.java +0 -412
  227. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ObjectArrayDeserializer.java +0 -201
  228. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/PrimitiveArrayDeserializers.java +0 -583
  229. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdDeserializer.java +0 -1136
  230. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdKeyDeserializer.java +0 -340
  231. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdKeyDeserializers.java +0 -108
  232. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdScalarDeserializer.java +0 -34
  233. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdValueInstantiator.java +0 -392
  234. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StringCollectionDeserializer.java +0 -227
  235. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StringDeserializer.java +0 -55
  236. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ThrowableDeserializer.java +0 -164
  237. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/TimestampDeserializer.java +0 -30
  238. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/TokenBufferDeserializer.java +0 -36
  239. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/UntypedObjectDeserializer.java +0 -248
  240. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/package-info.java +0 -15
  241. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/exc/UnrecognizedPropertyException.java +0 -75
  242. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ext/DOMDeserializer.java +0 -65
  243. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ext/OptionalHandlerFactory.java +0 -217
  244. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ext/package-info.java +0 -23
  245. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/Annotated.java +0 -85
  246. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedClass.java +0 -980
  247. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedConstructor.java +0 -143
  248. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedField.java +0 -119
  249. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedMember.java +0 -56
  250. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedMethod.java +0 -188
  251. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedMethodMap.java +0 -85
  252. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedParameter.java +0 -191
  253. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedWithParams.java +0 -195
  254. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotationMap.java +0 -101
  255. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/BasicBeanDescription.java +0 -615
  256. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/BasicClassIntrospector.java +0 -364
  257. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/JacksonAnnotationIntrospector.java +0 -813
  258. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/MemberKey.java +0 -83
  259. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/MethodFilter.java +0 -12
  260. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/NopAnnotationIntrospector.java +0 -209
  261. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/POJOPropertiesCollector.java +0 -713
  262. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/POJOPropertyBuilder.java +0 -648
  263. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/VisibilityChecker.java +0 -424
  264. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/package-info.java +0 -12
  265. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/NamedType.java +0 -53
  266. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/SubtypeResolver.java +0 -39
  267. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/TypeIdResolver.java +0 -74
  268. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/TypeResolverBuilder.java +0 -151
  269. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsArrayTypeDeserializer.java +0 -126
  270. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsArrayTypeSerializer.java +0 -110
  271. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsExternalTypeDeserializer.java +0 -37
  272. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsExternalTypeSerializer.java +0 -129
  273. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsPropertyTypeDeserializer.java +0 -191
  274. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsPropertyTypeSerializer.java +0 -69
  275. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsWrapperTypeDeserializer.java +0 -103
  276. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsWrapperTypeSerializer.java +0 -121
  277. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/ClassNameIdResolver.java +0 -138
  278. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/MinimalClassNameIdResolver.java +0 -66
  279. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/StdSubtypeResolver.java +0 -151
  280. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/StdTypeResolverBuilder.java +0 -202
  281. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeDeserializerBase.java +0 -154
  282. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeIdResolverBase.java +0 -37
  283. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeNameIdResolver.java +0 -154
  284. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeSerializerBase.java +0 -31
  285. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/package-info.java +0 -9
  286. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/package-info.java +0 -10
  287. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleAbstractTypeResolver.java +0 -86
  288. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleDeserializers.java +0 -130
  289. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleKeyDeserializers.java +0 -59
  290. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleModule.java +0 -265
  291. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleSerializers.java +0 -206
  292. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java +0 -45
  293. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/package-info.java +0 -16
  294. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/package-info.java +0 -34
  295. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/AnyGetterWriter.java +0 -48
  296. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ArraySerializers.java +0 -7
  297. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BasicSerializerFactory.java +0 -806
  298. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanPropertyFilter.java +0 -30
  299. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanPropertyWriter.java +0 -512
  300. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializer.java +0 -126
  301. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializerBuilder.java +0 -140
  302. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializerFactory.java +0 -780
  303. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializerModifier.java +0 -95
  304. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ContainerSerializers.java +0 -8
  305. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/CustomSerializerFactory.java +0 -293
  306. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/EnumSerializer.java +0 -17
  307. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/FilterProvider.java +0 -23
  308. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/FilteredBeanPropertyWriter.java +0 -96
  309. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/JdkSerializers.java +0 -11
  310. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/MapSerializer.java +0 -58
  311. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/PropertyBuilder.java +0 -372
  312. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ScalarSerializerBase.java +0 -18
  313. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/SerializerBase.java +0 -23
  314. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/StdKeySerializer.java +0 -10
  315. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/StdSerializerProvider.java +0 -852
  316. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/StdSerializers.java +0 -372
  317. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ToStringSerializer.java +0 -14
  318. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/FailingSerializer.java +0 -43
  319. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/JsonSerializerMap.java +0 -93
  320. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/PropertySerializerMap.java +0 -231
  321. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/ReadOnlyClassToSerializerMap.java +0 -73
  322. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/SerializerCache.java +0 -304
  323. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/SimpleBeanPropertyFilter.java +0 -109
  324. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/SimpleFilterProvider.java +0 -114
  325. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/UnknownSerializer.java +0 -54
  326. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/UnwrappingBeanPropertyWriter.java +0 -99
  327. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/UnwrappingBeanSerializer.java +0 -76
  328. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/package-info.java +0 -5
  329. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/package-info.java +0 -5
  330. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/AsArraySerializerBase.java +0 -185
  331. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/BeanSerializerBase.java +0 -340
  332. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/CalendarSerializer.java +0 -43
  333. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/CollectionSerializer.java +0 -113
  334. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ContainerSerializerBase.java +0 -51
  335. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/DateSerializer.java +0 -42
  336. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/EnumMapSerializer.java +0 -218
  337. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/EnumSerializer.java +0 -84
  338. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/EnumSetSerializer.java +0 -47
  339. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/IndexedStringListSerializer.java +0 -116
  340. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/InetAddressSerializer.java +0 -51
  341. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/IterableSerializer.java +0 -63
  342. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/JsonValueSerializer.java +0 -233
  343. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/MapSerializer.java +0 -422
  344. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/NonTypedScalarSerializerBase.java +0 -34
  345. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/NullSerializer.java +0 -38
  346. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ObjectArraySerializer.java +0 -281
  347. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/RawSerializer.java +0 -52
  348. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ScalarSerializerBase.java +0 -52
  349. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/SerializableSerializer.java +0 -99
  350. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/SerializableWithTypeSerializer.java +0 -90
  351. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/SerializerBase.java +0 -184
  352. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StaticListSerializerBase.java +0 -46
  353. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdArraySerializers.java +0 -476
  354. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdContainerSerializers.java +0 -249
  355. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdJdkSerializers.java +0 -195
  356. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdKeySerializer.java +0 -43
  357. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdKeySerializers.java +0 -95
  358. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StringCollectionSerializer.java +0 -119
  359. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StringSerializer.java +0 -36
  360. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java +0 -38
  361. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ToStringSerializer.java +0 -73
  362. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TokenBufferSerializer.java +0 -66
  363. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/ArrayType.java +0 -260
  364. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/ClassKey.java +0 -94
  365. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/CollectionLikeType.java +0 -204
  366. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/CollectionType.java +0 -94
  367. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/HierarchicType.java +0 -88
  368. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/MapLikeType.java +0 -265
  369. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/MapType.java +0 -146
  370. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/SimpleType.java +0 -250
  371. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeBase.java +0 -148
  372. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeBindings.java +0 -351
  373. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeFactory.java +0 -1165
  374. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeModifier.java +0 -38
  375. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeParser.java +0 -134
  376. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/package-info.java +0 -10
  377. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Annotations.java +0 -23
  378. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ArrayBuilders.java +0 -293
  379. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/BeanUtil.java +0 -260
  380. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ClassUtil.java +0 -645
  381. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Comparators.java +0 -48
  382. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/EnumResolver.java +0 -108
  383. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/EnumValues.java +0 -82
  384. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ISO8601DateFormat.java +0 -52
  385. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ISO8601Utils.java +0 -230
  386. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/JSONPObject.java +0 -105
  387. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/JSONWrappedObject.java +0 -117
  388. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/LRUMap.java +0 -28
  389. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/LinkedNode.java +0 -45
  390. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Named.java +0 -10
  391. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ObjectBuffer.java +0 -257
  392. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/PrimitiveArrayBuilder.java +0 -180
  393. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Provider.java +0 -21
  394. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/RootNameLookup.java +0 -54
  395. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/StdDateFormat.java +0 -348
  396. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/package-info.java +0 -4
  397. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ArrayNode.java +0 -758
  398. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BaseJsonNode.java +0 -122
  399. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BigIntegerNode.java +0 -104
  400. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BinaryNode.java +0 -136
  401. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BooleanNode.java +0 -84
  402. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ContainerNode.java +0 -185
  403. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/DecimalNode.java +0 -96
  404. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/DoubleNode.java +0 -106
  405. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/IntNode.java +0 -122
  406. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/JsonNodeFactory.java +0 -222
  407. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/LongNode.java +0 -99
  408. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/MissingNode.java +0 -97
  409. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NodeCursor.java +0 -222
  410. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NullNode.java +0 -58
  411. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java +0 -72
  412. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ObjectNode.java +0 -696
  413. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/POJONode.java +0 -145
  414. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/TextNode.java +0 -299
  415. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/TreeTraversingParser.java +0 -383
  416. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ValueNode.java +0 -58
  417. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/package-info.java +0 -8
  418. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/package-info.java +0 -30
  419. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/JsonSchema.java +0 -82
  420. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/JsonSerializableSchema.java +0 -46
  421. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/SchemaAware.java +0 -25
  422. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/package-info.java +0 -5
  423. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/BytesToNameCanonicalizer.java +0 -969
  424. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/CharsToNameCanonicalizer.java +0 -578
  425. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name.java +0 -50
  426. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name1.java +0 -44
  427. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name2.java +0 -40
  428. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name3.java +0 -39
  429. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/NameN.java +0 -68
  430. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/package-info.java +0 -5
  431. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/type/JavaType.java +0 -503
  432. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/type/TypeReference.java +0 -60
  433. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/type/package-info.java +0 -8
  434. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/BufferRecycler.java +0 -109
  435. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/ByteArrayBuilder.java +0 -294
  436. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/CharTypes.java +0 -237
  437. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/DefaultPrettyPrinter.java +0 -282
  438. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/InternCache.java +0 -49
  439. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/JsonGeneratorDelegate.java +0 -273
  440. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/JsonParserDelegate.java +0 -251
  441. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/JsonParserSequence.java +0 -150
  442. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/MinimalPrettyPrinter.java +0 -152
  443. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/TextBuffer.java +0 -707
  444. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/TokenBuffer.java +0 -1233
  445. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/VersionUtil.java +0 -79
  446. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/package-info.java +0 -4
@@ -1,1165 +0,0 @@
1
- package sh.calaba.org.codehaus.jackson.map.type;
2
-
3
- import java.util.*;
4
- import java.lang.reflect.*;
5
-
6
- import sh.calaba.org.codehaus.jackson.map.util.ArrayBuilders;
7
- import sh.calaba.org.codehaus.jackson.type.JavaType;
8
- import sh.calaba.org.codehaus.jackson.type.TypeReference;
9
-
10
- /**
11
- * Class used for creating concrete {@link JavaType} instances,
12
- * given various inputs.
13
- *<p>
14
- * As of Jackson 1.8, usage should be done using instance configured
15
- * via {@link sh.calaba.org.codehaus.jackson.map.ObjectMapper} (and exposed through
16
- * {@link sh.calaba.org.codehaus.jackson.map.DeserializationConfig} and
17
- * {@link sh.calaba.org.codehaus.jackson.map.SerializationConfig}).
18
- * However, old static-singleton access methods are supported as well; however,
19
- * using those may cause issues with extension modules that register
20
- * "type enchancers".
21
- *<p>
22
- * Typical usage pattern before Jackson 1.8 was to statically import factory methods
23
- * of this class, to allow convenient instantiation of structured
24
- * types, especially {@link Collection} and {@link Map} types
25
- * to represent generic types. For example
26
- *<pre>
27
- * mapType(String.class, Integer.class)
28
- *</pre>
29
- * to represent
30
- *<pre>
31
- * Map&lt;String,Integer>
32
- *</pre>
33
- * This is an alternative to using {@link TypeReference} that would
34
- * be something like
35
- *<pre>
36
- * new TypeReference&lt;Map&lt;String,Integer>>() { }
37
- *</pre>
38
- */
39
- @SuppressWarnings({"rawtypes", "unchecked"})
40
- public final class TypeFactory
41
- {
42
- /**
43
- * Globally shared singleton. Should never be accessed directly; non-core
44
- * code should use per-ObjectMapper instance (via configuration objects).
45
- * Core Jackson code uses {@link #defaultInstance} for accessing it.
46
- *
47
- * @deprecated As of 1.8, should use a per-ObjectMapper instance instead
48
- * of global singleton
49
- */
50
- @Deprecated
51
- public final static TypeFactory instance = new TypeFactory();
52
-
53
- private final static JavaType[] NO_TYPES = new JavaType[0];
54
-
55
- /**
56
- * Registered {@link TypeModifier}s: objects that can change details
57
- * of {@link JavaType} instances factory constructs.
58
- *
59
- * @since 1.8
60
- */
61
- protected final TypeModifier[] _modifiers;
62
-
63
- protected final TypeParser _parser;
64
-
65
- /*
66
- * Looks like construction of {@link JavaType} instances can be
67
- * a bottleneck, esp. for root-level Maps, so we better do bit
68
- * of low-level component caching here...
69
- */
70
-
71
- /**
72
- * Lazily constructed copy of type hierarchy from {@link java.util.HashMap}
73
- * to its supertypes.
74
- *
75
- * @since 1.9
76
- */
77
- protected HierarchicType _cachedHashMapType;
78
-
79
- /**
80
- * Lazily constructed copy of type hierarchy from {@link java.util.ArrayList}
81
- * to its supertypes.
82
- *
83
- * @since 1.9
84
- */
85
- protected HierarchicType _cachedArrayListType;
86
-
87
- /*
88
- /**********************************************************
89
- /* Life-cycle
90
- /**********************************************************
91
- */
92
-
93
- private TypeFactory() {
94
- _parser = new TypeParser(this);
95
- _modifiers = null;
96
- }
97
-
98
- protected TypeFactory(TypeParser p, TypeModifier[] mods) {
99
- _parser = p;
100
- _modifiers = mods;
101
- }
102
-
103
- public TypeFactory withModifier(TypeModifier mod)
104
- {
105
- if (_modifiers == null) {
106
- return new TypeFactory(_parser, new TypeModifier[] { mod });
107
- }
108
- return new TypeFactory(_parser, ArrayBuilders.insertInListNoDup(_modifiers, mod));
109
- }
110
-
111
- /**
112
- * Method used to access the globally shared instance, which has
113
- * no custom configuration. Used by <code>ObjectMapper</code> to
114
- * get the default factory when constructed.
115
- *
116
- * @since 1.8
117
- */
118
- public static TypeFactory defaultInstance() { return instance; }
119
-
120
- /*
121
- /**********************************************************
122
- /* Static methods for non-instance-specific functionality
123
- /**********************************************************
124
- */
125
-
126
- /**
127
- * Method for constructing a marker type that indicates missing generic
128
- * type information, which is handled same as simple type for
129
- * <code>java.lang.Object</code>.
130
- *
131
- * @since 1.8
132
- */
133
- public static JavaType unknownType() {
134
- return defaultInstance()._unknownType();
135
- }
136
-
137
- public static Class<?> rawClass(Type t) {
138
- if (t instanceof Class<?>) {
139
- return (Class<?>) t;
140
- }
141
- // Can optimize bit more in future...
142
- return defaultInstance().constructType(t).getRawClass();
143
- }
144
-
145
- /*
146
- /**********************************************************
147
- /* Legacy factory methods (pre-1.8)
148
- /**********************************************************
149
- */
150
-
151
- @Deprecated
152
- public static JavaType type(Type t) {
153
- return instance._constructType(t, null);
154
- }
155
-
156
- @Deprecated
157
- public static JavaType type(Type type, Class<?> context) {
158
- return instance.constructType(type, context);
159
- }
160
-
161
- @Deprecated
162
- public static JavaType type(Type type, JavaType context) {
163
- return instance.constructType(type, context);
164
- }
165
-
166
- @Deprecated
167
- public static JavaType type(Type type, TypeBindings bindings) {
168
- return instance._constructType(type, bindings);
169
- }
170
-
171
- @Deprecated
172
- public static JavaType type(TypeReference<?> ref) {
173
- return instance.constructType(ref.getType());
174
- }
175
-
176
- @Deprecated
177
- public static JavaType arrayType(Class<?> elementType) {
178
- return instance.constructArrayType(instance.constructType(elementType));
179
- }
180
-
181
- @Deprecated
182
- public static JavaType arrayType(JavaType elementType) {
183
- return instance.constructArrayType(elementType);
184
- }
185
-
186
- @Deprecated
187
- public static JavaType collectionType(Class<? extends Collection> collectionType, Class<?> elementType) {
188
- return instance.constructCollectionType(collectionType, instance.constructType(elementType));
189
- }
190
-
191
- @Deprecated
192
- public static JavaType collectionType(Class<? extends Collection> collectionType, JavaType elementType) {
193
- return instance.constructCollectionType(collectionType, elementType);
194
- }
195
-
196
- @Deprecated
197
- public static JavaType mapType(Class<? extends Map> mapClass, Class<?> keyType, Class<?> valueType)
198
- {
199
- return instance.constructMapType(mapClass, type(keyType), instance.constructType(valueType));
200
- }
201
-
202
- @Deprecated
203
- public static JavaType mapType(Class<? extends Map> mapType, JavaType keyType, JavaType valueType) {
204
- return instance.constructMapType(mapType, keyType, valueType);
205
- }
206
-
207
- @Deprecated
208
- public static JavaType parametricType(Class<?> parametrized, Class<?>... parameterClasses) {
209
- return instance.constructParametricType(parametrized, parameterClasses);
210
- }
211
-
212
- @Deprecated
213
- public static JavaType parametricType(Class<?> parametrized, JavaType... parameterTypes) {
214
- return instance.constructParametricType(parametrized, parameterTypes);
215
- }
216
-
217
- public static JavaType fromCanonical(String canonical) throws IllegalArgumentException {
218
- return instance.constructFromCanonical(canonical);
219
- }
220
-
221
- @Deprecated
222
- public static JavaType specialize(JavaType baseType, Class<?> subclass) {
223
- return instance.constructSpecializedType(baseType, subclass);
224
- }
225
-
226
- @Deprecated
227
- public static JavaType fastSimpleType(Class<?> cls) {
228
- return instance.uncheckedSimpleType(cls);
229
- }
230
-
231
- @Deprecated
232
- public static JavaType[] findParameterTypes(Class<?> clz, Class<?> expType) {
233
- return instance.findTypeParameters(clz, expType);
234
- }
235
-
236
- @Deprecated
237
- public static JavaType[] findParameterTypes(Class<?> clz, Class<?> expType, TypeBindings bindings) {
238
- return instance.findTypeParameters(clz, expType, bindings);
239
- }
240
-
241
- @Deprecated
242
- public static JavaType[] findParameterTypes(JavaType type, Class<?> expType) {
243
- return instance.findTypeParameters(type, expType);
244
- }
245
-
246
- /*
247
- /**********************************************************
248
- /* Legacy methods
249
- /**********************************************************
250
- */
251
-
252
- /**
253
- * Factory method that can be used if only type information
254
- * available is of type {@link Class}. This means that there
255
- * will not be generic type information due to type erasure,
256
- * but at least it will be possible to recognize array
257
- * types and non-typed container types.
258
- * And for other types (primitives/wrappers, beans), this
259
- * is all that is needed.
260
- *
261
- * @deprecated Use {@link #type(Type)} instead
262
- */
263
- @Deprecated
264
- public static JavaType fromClass(Class<?> clz)
265
- {
266
- return instance._fromClass(clz, null);
267
- }
268
-
269
- /**
270
- * Factory method that can be used if the full generic type has
271
- * been passed using {@link TypeReference}. This only needs to be
272
- * done if the root type to bind to is generic; but if so,
273
- * it must be done to get proper typing.
274
- *
275
- * @deprecated Use {@link #type(Type)} instead
276
- */
277
- @Deprecated
278
- public static JavaType fromTypeReference(TypeReference<?> ref)
279
- {
280
- return type(ref.getType());
281
- }
282
-
283
- /**
284
- * Factory method that can be used if type information is passed
285
- * as Java typing returned from <code>getGenericXxx</code> methods
286
- * (usually for a return or argument type).
287
- *
288
- * @deprecated Use {@link #type(Type)} instead
289
- */
290
- @Deprecated
291
- public static JavaType fromType(Type type)
292
- {
293
- return instance._constructType(type, null);
294
- }
295
-
296
- /*
297
- /**********************************************************
298
- /* Type conversion, parameterization resolution methods
299
- /**********************************************************
300
- */
301
-
302
- /**
303
- * Factory method for creating a subtype of given base type, as defined
304
- * by specified subclass; but retaining generic type information if any.
305
- * Can be used, for example, to get equivalent of "HashMap&lt;String,Integer>"
306
- * from "Map&ltString,Integer>" by giving <code>HashMap.class</code>
307
- * as subclass.
308
- */
309
- public JavaType constructSpecializedType(JavaType baseType, Class<?> subclass)
310
- {
311
- // Currently only SimpleType instances can become something else
312
- if (baseType instanceof SimpleType) {
313
- // and only if subclass is an array, Collection or Map
314
- if (subclass.isArray()
315
- || Map.class.isAssignableFrom(subclass)
316
- || Collection.class.isAssignableFrom(subclass)) {
317
- // need to assert type compatibility...
318
- if (!baseType.getRawClass().isAssignableFrom(subclass)) {
319
- throw new IllegalArgumentException("Class "+subclass.getClass().getName()+" not subtype of "+baseType);
320
- }
321
- // this _should_ work, right?
322
- JavaType subtype = _fromClass(subclass, new TypeBindings(this, baseType.getRawClass()));
323
- // one more thing: handlers to copy?
324
- Object h = baseType.getValueHandler();
325
- if (h != null) {
326
- // subtype.setValueHandler(h);
327
- subtype = subtype.withValueHandler(h);
328
- }
329
- h = baseType.getTypeHandler();
330
- if (h != null) {
331
- subtype = subtype.withTypeHandler(h);
332
- }
333
- return subtype;
334
- }
335
- }
336
- // otherwise regular narrowing should work just fine
337
- return baseType.narrowBy(subclass);
338
- }
339
-
340
- /**
341
- * Factory method for constructing a {@link JavaType} out of its canonical
342
- * representation (see {@link JavaType#toCanonical()}).
343
- *
344
- * @param canonical Canonical string representation of a type
345
- *
346
- * @throws IllegalArgumentException If canonical representation is malformed,
347
- * or class that type represents (including its generic parameters) is
348
- * not found
349
- *
350
- * @since 1.8
351
- */
352
- public JavaType constructFromCanonical(String canonical) throws IllegalArgumentException
353
- {
354
- return _parser.parse(canonical);
355
- }
356
-
357
- /**
358
- * Method that is to figure out actual type parameters that given
359
- * class binds to generic types defined by given (generic)
360
- * interface or class.
361
- * This could mean, for example, trying to figure out
362
- * key and value types for Map implementations.
363
- *
364
- * @param type Sub-type (leaf type) that implements <code>expType</code>
365
- *
366
- * @since 1.6
367
- */
368
- public JavaType[] findTypeParameters(JavaType type, Class<?> expType)
369
- {
370
- /* Tricky part here is that some JavaType instances have been constructed
371
- * from generic type (usually via TypeReference); and in those case
372
- * types have been resolved. Alternative is that the leaf type is type-erased
373
- * class, in which case this has not been done.
374
- * For now simplest way to handle this is to split processing in two: latter
375
- * case actually fully works; and former mostly works. In future may need to
376
- * rewrite former part, which requires changes to JavaType as well.
377
- */
378
- Class<?> raw = type.getRawClass();
379
- if (raw == expType) {
380
- // Direct type info; good since we can return it as is
381
- int count = type.containedTypeCount();
382
- if (count == 0) return null;
383
- JavaType[] result = new JavaType[count];
384
- for (int i = 0; i < count; ++i) {
385
- result[i] = type.containedType(i);
386
- }
387
- return result;
388
- }
389
- /* Otherwise need to go through type-erased class. This may miss cases where
390
- * we get generic type; ideally JavaType/SimpleType would retain information
391
- * about generic declaration at main level... but let's worry about that
392
- * if/when there are problems; current handling is an improvement over earlier
393
- * code.
394
- */
395
- return findTypeParameters(raw, expType, new TypeBindings(this, type));
396
- }
397
-
398
- public JavaType[] findTypeParameters(Class<?> clz, Class<?> expType) {
399
- return findTypeParameters(clz, expType, new TypeBindings(this, clz));
400
- }
401
-
402
- public JavaType[] findTypeParameters(Class<?> clz, Class<?> expType, TypeBindings bindings)
403
- {
404
- // First: find full inheritance chain
405
- HierarchicType subType = _findSuperTypeChain(clz, expType);
406
- // Caller is supposed to ensure this never happens, so:
407
- if (subType == null) {
408
- throw new IllegalArgumentException("Class "+clz.getName()+" is not a subtype of "+expType.getName());
409
- }
410
- // Ok and then go to the ultimate super-type:
411
- HierarchicType superType = subType;
412
- while (superType.getSuperType() != null) {
413
- superType = superType.getSuperType();
414
- Class<?> raw = superType.getRawClass();
415
- TypeBindings newBindings = new TypeBindings(this, raw);
416
- if (superType.isGeneric()) { // got bindings, need to resolve
417
- ParameterizedType pt = superType.asGeneric();
418
- Type[] actualTypes = pt.getActualTypeArguments();
419
- TypeVariable<?>[] vars = raw.getTypeParameters();
420
- int len = actualTypes.length;
421
- for (int i = 0; i < len; ++i) {
422
- String name = vars[i].getName();
423
- JavaType type = instance._constructType(actualTypes[i], bindings);
424
- newBindings.addBinding(name, type);
425
- }
426
- }
427
- bindings = newBindings;
428
- }
429
-
430
- // which ought to be generic (if not, it's raw type)
431
- if (!superType.isGeneric()) {
432
- return null;
433
- }
434
- return bindings.typesAsArray();
435
- }
436
-
437
- /*
438
- /**********************************************************
439
- /* Public factory methods
440
- /**********************************************************
441
- */
442
-
443
- public JavaType constructType(Type type) {
444
- return _constructType(type, null);
445
- }
446
-
447
- public JavaType constructType(Type type, TypeBindings bindings) {
448
- return _constructType(type, bindings);
449
- }
450
-
451
- public JavaType constructType(TypeReference<?> typeRef) {
452
- return _constructType(typeRef.getType(), null);
453
- }
454
-
455
- public JavaType constructType(Type type, Class<?> context) {
456
- TypeBindings b = (context == null) ? null : new TypeBindings(this, context);
457
- return _constructType(type, b);
458
- }
459
-
460
- public JavaType constructType(Type type, JavaType context) {
461
- TypeBindings b = (context == null) ? null : new TypeBindings(this, context);
462
- return _constructType(type, b);
463
- }
464
-
465
- /**
466
- * Factory method that can be used if type information is passed
467
- * as Java typing returned from <code>getGenericXxx</code> methods
468
- * (usually for a return or argument type).
469
- */
470
- public JavaType _constructType(Type type, TypeBindings context)
471
- {
472
- JavaType resultType;
473
-
474
- // simple class?
475
- if (type instanceof Class<?>) {
476
- Class<?> cls = (Class<?>) type;
477
- /* 24-Mar-2010, tatu: Better create context if one was not passed;
478
- * mostly matters for root serialization types
479
- */
480
- if (context == null) {
481
- context = new TypeBindings(this, cls);
482
- }
483
- resultType = _fromClass(cls, context);
484
- }
485
- // But if not, need to start resolving.
486
- else if (type instanceof ParameterizedType) {
487
- resultType = _fromParamType((ParameterizedType) type, context);
488
- }
489
- else if (type instanceof GenericArrayType) {
490
- resultType = _fromArrayType((GenericArrayType) type, context);
491
- }
492
- else if (type instanceof TypeVariable<?>) {
493
- resultType = _fromVariable((TypeVariable<?>) type, context);
494
- }
495
- else if (type instanceof WildcardType) {
496
- resultType = _fromWildcard((WildcardType) type, context);
497
- } else {
498
- // sanity check
499
- throw new IllegalArgumentException("Unrecognized Type: "+type.toString());
500
- }
501
- /* [JACKSON-521]: Need to allow TypeModifiers to alter actual type; however,
502
- * for now only call for simple types (i.e. not for arrays, map or collections).
503
- * Can be changed in future it necessary
504
- */
505
- if (_modifiers != null && !resultType.isContainerType()) {
506
- for (TypeModifier mod : _modifiers) {
507
- resultType = mod.modifyType(resultType, type, context, this);
508
- }
509
- }
510
- return resultType;
511
- }
512
-
513
- /*
514
- /**********************************************************
515
- /* Direct factory methods
516
- /**********************************************************
517
- */
518
-
519
- /**
520
- * Method for constructing an {@link ArrayType}.
521
- *<p>
522
- * NOTE: type modifiers are NOT called on array type itself; but are called
523
- * for element type (and other contained types)
524
- */
525
- public ArrayType constructArrayType(Class<?> elementType) {
526
- return ArrayType.construct(_constructType(elementType, null), null, null);
527
- }
528
-
529
- /**
530
- * Method for constructing an {@link ArrayType}.
531
- *<p>
532
- * NOTE: type modifiers are NOT called on array type itself; but are called
533
- * for contained types.
534
- */
535
- public ArrayType constructArrayType(JavaType elementType) {
536
- return ArrayType.construct(elementType, null, null);
537
- }
538
-
539
- /**
540
- * Method for constructing a {@link CollectionType}.
541
- *<p>
542
- * NOTE: type modifiers are NOT called on Collection type itself; but are called
543
- * for contained types.
544
- */
545
- public CollectionType constructCollectionType(Class<? extends Collection> collectionClass, Class<?> elementClass) {
546
- return CollectionType.construct(collectionClass, constructType(elementClass));
547
- }
548
-
549
- /**
550
- * Method for constructing a {@link CollectionType}.
551
- *<p>
552
- * NOTE: type modifiers are NOT called on Collection type itself; but are called
553
- * for contained types.
554
- */
555
- public CollectionType constructCollectionType(Class<? extends Collection> collectionClass, JavaType elementType) {
556
- return CollectionType.construct(collectionClass, elementType);
557
- }
558
-
559
- /**
560
- * Method for constructing a {@link CollectionLikeType}.
561
- *<p>
562
- * NOTE: type modifiers are NOT called on constructed type itself; but are called
563
- * for contained types.
564
- *
565
- * @since 1.8
566
- */
567
- public CollectionLikeType constructCollectionLikeType(Class<?> collectionClass, Class<?> elementClass) {
568
- return CollectionLikeType.construct(collectionClass, constructType(elementClass));
569
- }
570
-
571
- /**
572
- * Method for constructing a {@link CollectionLikeType}.
573
- *<p>
574
- * NOTE: type modifiers are NOT called on constructed type itself; but are called
575
- * for contained types.
576
- *
577
- * @since 1.8
578
- */
579
- public CollectionLikeType constructCollectionLikeType(Class<?> collectionClass, JavaType elementType) {
580
- return CollectionLikeType.construct(collectionClass, elementType);
581
- }
582
-
583
- /**
584
- * Method for constructing a {@link MapType} instance
585
- *<p>
586
- * NOTE: type modifiers are NOT called on constructed type itself; but are called
587
- * for contained types.
588
- *
589
- * @since 1.8
590
- */
591
- public MapType constructMapType(Class<? extends Map> mapClass, JavaType keyType, JavaType valueType) {
592
- return MapType.construct(mapClass, keyType, valueType);
593
- }
594
-
595
- /**
596
- * Method for constructing a {@link MapType} instance
597
- *<p>
598
- * NOTE: type modifiers are NOT called on constructed type itself; but are called
599
- * for contained types.
600
- *
601
- * @since 1.8
602
- */
603
- public MapType constructMapType(Class<? extends Map> mapClass, Class<?> keyClass, Class<?> valueClass) {
604
- return MapType.construct(mapClass, constructType(keyClass), constructType(valueClass));
605
- }
606
-
607
- /**
608
- * Method for constructing a {@link MapLikeType} instance
609
- *<p>
610
- * NOTE: type modifiers are NOT called on constructed type itself; but are called
611
- * for contained types.
612
- *
613
- * @since 1.8
614
- */
615
- public MapLikeType constructMapLikeType(Class<?> mapClass, JavaType keyType, JavaType valueType) {
616
- return MapLikeType.construct(mapClass, keyType, valueType);
617
- }
618
-
619
- /**
620
- * Method for constructing a {@link MapLikeType} instance
621
- *<p>
622
- * NOTE: type modifiers are NOT called on constructed type itself; but are called
623
- * for contained types.
624
- *
625
- * @since 1.8
626
- */
627
- public MapLikeType constructMapLikeType(Class<?> mapClass, Class<?> keyClass, Class<?> valueClass) {
628
- return MapType.construct(mapClass, constructType(keyClass), constructType(valueClass));
629
- }
630
-
631
- /**
632
- * Method for constructing a type instance with specified parameterization.
633
- *
634
- * @since 1.8
635
- */
636
- public JavaType constructSimpleType(Class<?> rawType, JavaType[] parameterTypes)
637
- {
638
- // Quick sanity check: must match numbers of types with expected...
639
- TypeVariable<?>[] typeVars = rawType.getTypeParameters();
640
- if (typeVars.length != parameterTypes.length) {
641
- throw new IllegalArgumentException("Parameter type mismatch for "+rawType.getName()
642
- +": expected "+typeVars.length+" parameters, was given "+parameterTypes.length);
643
- }
644
- String[] names = new String[typeVars.length];
645
- for (int i = 0, len = typeVars.length; i < len; ++i) {
646
- names[i] = typeVars[i].getName();
647
- }
648
- JavaType resultType = new SimpleType(rawType, names, parameterTypes, null, null);
649
- return resultType;
650
- }
651
-
652
- /**
653
- * Method that will force construction of a simple type, without trying to
654
- * check for more specialized types.
655
- *<p>
656
- * NOTE: no type modifiers are called on type either, so calling this method
657
- * should only be used if caller really knows what it's doing...
658
- *
659
- * @since 1.8
660
- */
661
- public JavaType uncheckedSimpleType(Class<?> cls) {
662
- return new SimpleType(cls);
663
- }
664
-
665
- /**
666
- * Factory method for constructing {@link JavaType} that
667
- * represents a parameterized type. For example, to represent
668
- * type <code>List&lt;Set&lt;Integer>></code>, you could
669
- * call
670
- *<pre>
671
- * TypeFactory.parametricType(List.class, Integer.class);
672
- *</pre>
673
- *<p>
674
- * NOTE: type modifiers are NOT called on constructed type itself; but are called
675
- * for contained types.
676
- *
677
- * @since 1.5
678
- */
679
- public JavaType constructParametricType(Class<?> parametrized, Class<?>... parameterClasses)
680
- {
681
- int len = parameterClasses.length;
682
- JavaType[] pt = new JavaType[len];
683
- for (int i = 0; i < len; ++i) {
684
- pt[i] = _fromClass(parameterClasses[i], null);
685
- }
686
- return constructParametricType(parametrized, pt);
687
- }
688
-
689
- /**
690
- * Factory method for constructing {@link JavaType} that
691
- * represents a parameterized type. For example, to represent
692
- * type <code>List&lt;Set&lt;Integer>></code>, you could
693
- * call
694
- *<pre>
695
- * JavaType inner = TypeFactory.parametricType(Set.class, Integer.class);
696
- * TypeFactory.parametricType(List.class, inner);
697
- *</pre>
698
- *<p>
699
- * NOTE: type modifiers are NOT called on constructed type itself; but are called
700
- * for contained types.
701
- *
702
- * @since 1.5
703
- */
704
- public JavaType constructParametricType(Class<?> parametrized, JavaType... parameterTypes)
705
- {
706
- JavaType resultType;
707
-
708
- // Need to check kind of class we are dealing with...
709
- if (parametrized.isArray()) {
710
- // 19-Jan-2010, tatus: should we support multi-dimensional arrays directly?
711
- if (parameterTypes.length != 1) {
712
- throw new IllegalArgumentException("Need exactly 1 parameter type for arrays ("+parametrized.getName()+")");
713
- }
714
- resultType = constructArrayType(parameterTypes[0]);
715
- }
716
- else if (Map.class.isAssignableFrom(parametrized)) {
717
- if (parameterTypes.length != 2) {
718
- throw new IllegalArgumentException("Need exactly 2 parameter types for Map types ("+parametrized.getName()+")");
719
- }
720
- resultType = constructMapType((Class<Map<?,?>>)parametrized, parameterTypes[0], parameterTypes[1]);
721
- }
722
- else if (Collection.class.isAssignableFrom(parametrized)) {
723
- if (parameterTypes.length != 1) {
724
- throw new IllegalArgumentException("Need exactly 1 parameter type for Collection types ("+parametrized.getName()+")");
725
- }
726
- resultType = constructCollectionType((Class<Collection<?>>)parametrized, parameterTypes[0]);
727
- } else {
728
- resultType = constructSimpleType(parametrized, parameterTypes);
729
- }
730
- return resultType;
731
- }
732
-
733
- /*
734
- /**********************************************************
735
- /* Direct factory methods for "raw" variants, used when
736
- /* parameterization is unknown
737
- /**********************************************************
738
- */
739
-
740
- /**
741
- * Method that can be used to construct "raw" Collection type; meaning that its
742
- * parameterization is unknown.
743
- * This is similar to using <code>Object.class</code> parameterization,
744
- * and is equivalent to calling:
745
- *<pre>
746
- * typeFactory.constructCollectionType(collectionClass, typeFactory.unknownType());
747
- *<pre>
748
- *<p>
749
- * This method should only be used if parameterization is completely unavailable.
750
- *
751
- * @since 1.9
752
- */
753
- public CollectionType constructRawCollectionType(Class<? extends Collection> collectionClass) {
754
- return CollectionType.construct(collectionClass, unknownType());
755
- }
756
-
757
- /**
758
- * Method that can be used to construct "raw" Collection-like type; meaning that its
759
- * parameterization is unknown.
760
- * This is similar to using <code>Object.class</code> parameterization,
761
- * and is equivalent to calling:
762
- *<pre>
763
- * typeFactory.constructCollectionLikeType(collectionClass, typeFactory.unknownType());
764
- *<pre>
765
- *<p>
766
- * This method should only be used if parameterization is completely unavailable.
767
- *
768
- * @since 1.9
769
- */
770
- public CollectionLikeType constructRawCollectionLikeType(Class<?> collectionClass) {
771
- return CollectionLikeType.construct(collectionClass, unknownType());
772
- }
773
-
774
- /**
775
- * Method that can be used to construct "raw" Map type; meaning that its
776
- * parameterization is unknown.
777
- * This is similar to using <code>Object.class</code> parameterization,
778
- * and is equivalent to calling:
779
- *<pre>
780
- * typeFactory.constructMapType(collectionClass, typeFactory.unknownType(), typeFactory.unknownType());
781
- *<pre>
782
- *<p>
783
- * This method should only be used if parameterization is completely unavailable.
784
- *
785
- * @since 1.9
786
- */
787
- public MapType constructRawMapType(Class<? extends Map> mapClass) {
788
- return MapType.construct(mapClass, unknownType(), unknownType());
789
- }
790
-
791
- /**
792
- * Method that can be used to construct "raw" Map-like type; meaning that its
793
- * parameterization is unknown.
794
- * This is similar to using <code>Object.class</code> parameterization,
795
- * and is equivalent to calling:
796
- *<pre>
797
- * typeFactory.constructMapLikeType(collectionClass, typeFactory.unknownType(), typeFactory.unknownType());
798
- *<pre>
799
- *<p>
800
- * This method should only be used if parameterization is completely unavailable.
801
- *
802
- * @since 1.9
803
- */
804
- public MapLikeType constructRawMapLikeType(Class<?> mapClass) {
805
- return MapLikeType.construct(mapClass, unknownType(), unknownType());
806
- }
807
-
808
- /*
809
- /**********************************************************
810
- /* Actual factory methods
811
- /**********************************************************
812
- */
813
-
814
- /**
815
- * @param context Mapping of formal parameter declarations (for generic
816
- * types) into actual types
817
- */
818
- protected JavaType _fromClass(Class<?> clz, TypeBindings context)
819
- {
820
- // First: do we have an array type?
821
- if (clz.isArray()) {
822
- return ArrayType.construct(_constructType(clz.getComponentType(), null), null, null);
823
- }
824
- /* Also: although enums can also be fully resolved, there's little
825
- * point in doing so (T extends Enum<T>) etc.
826
- */
827
- if (clz.isEnum()) {
828
- return new SimpleType(clz);
829
- }
830
- /* Maps and Collections aren't quite as hot; problem is, due
831
- * to type erasure we often do not know typing and can only assume
832
- * base Object.
833
- */
834
- if (Map.class.isAssignableFrom(clz)) {
835
- return _mapType(clz);
836
- }
837
- if (Collection.class.isAssignableFrom(clz)) {
838
- return _collectionType(clz);
839
- }
840
- return new SimpleType(clz);
841
- }
842
-
843
- /**
844
- * Method used by {@link TypeParser} when generics-aware version
845
- * is constructed.
846
- */
847
- protected JavaType _fromParameterizedClass(Class<?> clz, List<JavaType> paramTypes)
848
- {
849
- if (clz.isArray()) { // ignore generics (should never have any)
850
- return ArrayType.construct(_constructType(clz.getComponentType(), null), null, null);
851
- }
852
- if (clz.isEnum()) { // ditto for enums
853
- return new SimpleType(clz);
854
- }
855
- if (Map.class.isAssignableFrom(clz)) {
856
- // First: if we do have param types, use them
857
- JavaType keyType, contentType;
858
- if (paramTypes.size() > 0) {
859
- keyType = paramTypes.get(0);
860
- contentType = (paramTypes.size() >= 2) ?
861
- paramTypes.get(1) : _unknownType();
862
- return MapType.construct(clz, keyType, contentType);
863
- }
864
- return _mapType(clz);
865
- }
866
- if (Collection.class.isAssignableFrom(clz)) {
867
- if (paramTypes.size() >= 1) {
868
- return CollectionType.construct(clz, paramTypes.get(0));
869
- }
870
- return _collectionType(clz);
871
- }
872
- if (paramTypes.size() == 0) {
873
- return new SimpleType(clz);
874
- }
875
- JavaType[] pt = paramTypes.toArray(new JavaType[paramTypes.size()]);
876
- return constructSimpleType(clz, pt);
877
- }
878
-
879
- /**
880
- * This method deals with parameterized types, that is,
881
- * first class generic classes.
882
- *<p>
883
- * Since version 1.2, this resolves all parameterized types, not just
884
- * Maps or Collections.
885
- */
886
- protected JavaType _fromParamType(ParameterizedType type, TypeBindings context)
887
- {
888
- /* First: what is the actual base type? One odd thing
889
- * is that 'getRawType' returns Type, not Class<?> as
890
- * one might expect. But let's assume it is always of
891
- * type Class: if not, need to add more code to resolve
892
- * it to Class.
893
- */
894
- Class<?> rawType = (Class<?>) type.getRawType();
895
- Type[] args = type.getActualTypeArguments();
896
- int paramCount = (args == null) ? 0 : args.length;
897
-
898
- JavaType[] pt;
899
-
900
- if (paramCount == 0) {
901
- pt = NO_TYPES;
902
- } else {
903
- pt = new JavaType[paramCount];
904
- for (int i = 0; i < paramCount; ++i) {
905
- pt[i] = _constructType(args[i], context);
906
- }
907
- }
908
-
909
- // Ok: Map or Collection?
910
- if (Map.class.isAssignableFrom(rawType)) {
911
- JavaType subtype = constructSimpleType(rawType, pt);
912
- JavaType[] mapParams = findTypeParameters(subtype, Map.class);
913
- if (mapParams.length != 2) {
914
- throw new IllegalArgumentException("Could not find 2 type parameters for Map class "+rawType.getName()+" (found "+mapParams.length+")");
915
- }
916
- return MapType.construct(rawType, mapParams[0], mapParams[1]);
917
- }
918
- if (Collection.class.isAssignableFrom(rawType)) {
919
- JavaType subtype = constructSimpleType(rawType, pt);
920
- JavaType[] collectionParams = findTypeParameters(subtype, Collection.class);
921
- if (collectionParams.length != 1) {
922
- throw new IllegalArgumentException("Could not find 1 type parameter for Collection class "+rawType.getName()+" (found "+collectionParams.length+")");
923
- }
924
- return CollectionType.construct(rawType, collectionParams[0]);
925
- }
926
- if (paramCount == 0) { // no generics
927
- return new SimpleType(rawType);
928
- }
929
- return constructSimpleType(rawType, pt);
930
- }
931
-
932
-
933
- protected JavaType _fromArrayType(GenericArrayType type, TypeBindings context)
934
- {
935
- JavaType compType = _constructType(type.getGenericComponentType(), context);
936
- return ArrayType.construct(compType, null, null);
937
- }
938
-
939
- protected JavaType _fromVariable(TypeVariable<?> type, TypeBindings context)
940
- {
941
- /* 26-Sep-2009, tatus: It should be possible to try "partial"
942
- * resolution; meaning that it is ok not to find bindings.
943
- * For now this is indicated by passing null context.
944
- */
945
- if (context == null) {
946
- return _unknownType();
947
- }
948
-
949
- // Ok: here's where context might come in handy!
950
- String name = type.getName();
951
- JavaType actualType = context.findType(name);
952
- if (actualType != null) {
953
- return actualType;
954
- }
955
-
956
- /* 29-Jan-2010, tatu: We used to throw exception here, if type was
957
- * bound: but the problem is that this can occur for generic "base"
958
- * method, overridden by sub-class. If so, we will want to ignore
959
- * current type (for method) since it will be masked.
960
- */
961
- Type[] bounds = type.getBounds();
962
-
963
- // With type variables we must use bound information.
964
- // Theoretically this gets tricky, as there may be multiple
965
- // bounds ("... extends A & B"); and optimally we might
966
- // want to choose the best match. Also, bounds are optional;
967
- // but here we are lucky in that implicit "Object" is
968
- // added as bounds if so.
969
- // Either way let's just use the first bound, for now, and
970
- // worry about better match later on if there is need.
971
-
972
- /* 29-Jan-2010, tatu: One more problem are recursive types
973
- * (T extends Comparable<T>). Need to add "placeholder"
974
- * for resolution to catch those.
975
- */
976
- context._addPlaceholder(name);
977
- return _constructType(bounds[0], context);
978
- }
979
-
980
- protected JavaType _fromWildcard(WildcardType type, TypeBindings context)
981
- {
982
- /* Similar to challenges with TypeVariable, we may have
983
- * multiple upper bounds. But it is also possible that if
984
- * upper bound defaults to Object, we might want to consider
985
- * lower bounds instead.
986
- *
987
- * For now, we won't try anything more advanced; above is
988
- * just for future reference.
989
- */
990
- return _constructType(type.getUpperBounds()[0], context);
991
- }
992
-
993
- private JavaType _mapType(Class<?> rawClass)
994
- {
995
- JavaType[] typeParams = findTypeParameters(rawClass, Map.class);
996
- // ok to have no types ("raw")
997
- if (typeParams == null) {
998
- return MapType.construct(rawClass, _unknownType(), _unknownType());
999
- }
1000
- // but exactly 2 types if any found
1001
- if (typeParams.length != 2) {
1002
- throw new IllegalArgumentException("Strange Map type "+rawClass.getName()+": can not determine type parameters");
1003
- }
1004
- return MapType.construct(rawClass, typeParams[0], typeParams[1]);
1005
- }
1006
-
1007
- private JavaType _collectionType(Class<?> rawClass)
1008
- {
1009
- JavaType[] typeParams = findTypeParameters(rawClass, Collection.class);
1010
- // ok to have no types ("raw")
1011
- if (typeParams == null) {
1012
- return CollectionType.construct(rawClass, _unknownType());
1013
- }
1014
- // but exactly 2 types if any found
1015
- if (typeParams.length != 1) {
1016
- throw new IllegalArgumentException("Strange Collection type "+rawClass.getName()+": can not determine type parameters");
1017
- }
1018
- return CollectionType.construct(rawClass, typeParams[0]);
1019
- }
1020
-
1021
- protected JavaType _resolveVariableViaSubTypes(HierarchicType leafType, String variableName, TypeBindings bindings)
1022
- {
1023
- // can't resolve raw types; possible to have as-of-yet-unbound types too:
1024
- if (leafType != null && leafType.isGeneric()) {
1025
- TypeVariable<?>[] typeVariables = leafType.getRawClass().getTypeParameters();
1026
- for (int i = 0, len = typeVariables.length; i < len; ++i) {
1027
- TypeVariable<?> tv = typeVariables[i];
1028
- if (variableName.equals(tv.getName())) {
1029
- // further resolution needed?
1030
- Type type = leafType.asGeneric().getActualTypeArguments()[i];
1031
- if (type instanceof TypeVariable<?>) {
1032
- return _resolveVariableViaSubTypes(leafType.getSubType(), ((TypeVariable<?>) type).getName(), bindings);
1033
- }
1034
- // no we're good for the variable (but it may have parameterization of its own)
1035
- return _constructType(type, bindings);
1036
- }
1037
- }
1038
- }
1039
- return _unknownType();
1040
- }
1041
-
1042
- protected JavaType _unknownType() {
1043
- return new SimpleType(Object.class);
1044
- }
1045
-
1046
- /*
1047
- /**********************************************************
1048
- /* Helper methods
1049
- /**********************************************************
1050
- */
1051
-
1052
- /**
1053
- * Helper method used to find inheritance (implements, extends) path
1054
- * between given types, if one exists (caller generally checks before
1055
- * calling this method). Returned type represents given <b>subtype</b>,
1056
- * with supertype linkage extending to <b>supertype</b>.
1057
- */
1058
- protected HierarchicType _findSuperTypeChain(Class<?> subtype, Class<?> supertype)
1059
- {
1060
- // If super-type is a class (not interface), bit simpler
1061
- if (supertype.isInterface()) {
1062
- return _findSuperInterfaceChain(subtype, supertype);
1063
- }
1064
- return _findSuperClassChain(subtype, supertype);
1065
- }
1066
-
1067
- protected HierarchicType _findSuperClassChain(Type currentType, Class<?> target)
1068
- {
1069
- HierarchicType current = new HierarchicType(currentType);
1070
- Class<?> raw = current.getRawClass();
1071
- if (raw == target) {
1072
- return current;
1073
- }
1074
- // Otherwise, keep on going down the rat hole...
1075
- Type parent = raw.getGenericSuperclass();
1076
- if (parent != null) {
1077
- HierarchicType sup = _findSuperClassChain(parent, target);
1078
- if (sup != null) {
1079
- sup.setSubType(current);
1080
- current.setSuperType(sup);
1081
- return current;
1082
- }
1083
- }
1084
- return null;
1085
- }
1086
-
1087
- protected HierarchicType _findSuperInterfaceChain(Type currentType, Class<?> target)
1088
- {
1089
- HierarchicType current = new HierarchicType(currentType);
1090
- Class<?> raw = current.getRawClass();
1091
- if (raw == target) {
1092
- return new HierarchicType(currentType);
1093
- }
1094
- // Otherwise, keep on going down the rat hole; first implemented interfaces
1095
- /* 16-Aug-2011, tatu: Minor optimization based on profiled hot spot; let's
1096
- * try caching certain commonly needed cases
1097
- */
1098
- if (raw == HashMap.class) {
1099
- if (target == Map.class) {
1100
- return _hashMapSuperInterfaceChain(current);
1101
- }
1102
- }
1103
- if (raw == ArrayList.class) {
1104
- if (target == List.class) {
1105
- return _arrayListSuperInterfaceChain(current);
1106
- }
1107
- }
1108
- return _doFindSuperInterfaceChain(current, target);
1109
- }
1110
-
1111
- protected HierarchicType _doFindSuperInterfaceChain(HierarchicType current, Class<?> target)
1112
- {
1113
- Class<?> raw = current.getRawClass();
1114
- Type[] parents = raw.getGenericInterfaces();
1115
- // as long as there are superclasses
1116
- // and unless we have already seen the type (<T extends X<T>>)
1117
- if (parents != null) {
1118
- for (Type parent : parents) {
1119
- HierarchicType sup = _findSuperInterfaceChain(parent, target);
1120
- if (sup != null) {
1121
- sup.setSubType(current);
1122
- current.setSuperType(sup);
1123
- return current;
1124
- }
1125
- }
1126
- }
1127
- // and then super-class if any
1128
- Type parent = raw.getGenericSuperclass();
1129
- if (parent != null) {
1130
- HierarchicType sup = _findSuperInterfaceChain(parent, target);
1131
- if (sup != null) {
1132
- sup.setSubType(current);
1133
- current.setSuperType(sup);
1134
- return current;
1135
- }
1136
- }
1137
- return null;
1138
- }
1139
-
1140
- protected synchronized HierarchicType _hashMapSuperInterfaceChain(HierarchicType current)
1141
- {
1142
- if (_cachedHashMapType == null) {
1143
- HierarchicType base = current.deepCloneWithoutSubtype();
1144
- _doFindSuperInterfaceChain(base, Map.class);
1145
- _cachedHashMapType = base.getSuperType();
1146
- }
1147
- HierarchicType t = _cachedHashMapType.deepCloneWithoutSubtype();
1148
- current.setSuperType(t);
1149
- t.setSubType(current);
1150
- return current;
1151
- }
1152
-
1153
- protected synchronized HierarchicType _arrayListSuperInterfaceChain(HierarchicType current)
1154
- {
1155
- if (_cachedArrayListType == null) {
1156
- HierarchicType base = current.deepCloneWithoutSubtype();
1157
- _doFindSuperInterfaceChain(base, List.class);
1158
- _cachedArrayListType = base.getSuperType();
1159
- }
1160
- HierarchicType t = _cachedArrayListType.deepCloneWithoutSubtype();
1161
- current.setSuperType(t);
1162
- t.setSubType(current);
1163
- return current;
1164
- }
1165
- }