calabash-android 0.4.7.pre6 → 0.4.7.pre7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/calabash-android/helpers.rb +7 -15
- data/lib/calabash-android/lib/TestServer.apk +0 -0
- data/lib/calabash-android/version.rb +1 -1
- data/test-server/build.xml +2 -2
- data/test-server/instrumentation-backend/.classpath +0 -3
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/HttpServer.java +1 -2
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/wait/WaitForProgress.java +1 -1
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/QueryHelper.java +1 -2
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/json/JSONUtils.java +1 -1
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/QueryResult.java +1 -1
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/ast/UIQueryUtils.java +203 -222
- data/test-server/instrumentation-backend/src/sh/calaba/org/apache/http/entity/mime/version.properties +22 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Base64Variant.java +413 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Base64Variants.java +90 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/FormatSchema.java +29 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonEncoding.java +47 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonFactory.java +937 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonGenerationException.java +28 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonGenerator.java +1197 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonLocation.java +141 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonNode.java +879 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonParseException.java +23 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonParser.java +1434 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonProcessingException.java +80 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonStreamContext.java +122 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonToken.java +161 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/ObjectCodec.java +157 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/PrettyPrinter.java +166 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/SerializableString.java +54 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Version.java +90 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Versioned.java +20 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JacksonAnnotation.java +20 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonAnyGetter.java +25 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonAnySetter.java +24 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonAutoDetect.java +148 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonBackReference.java +41 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonCreator.java +19 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonGetter.java +35 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonIgnore.java +57 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonIgnoreProperties.java +48 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonIgnoreType.java +33 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonManagedReference.java +41 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonMethod.java +90 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonProperty.java +38 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonPropertyOrder.java +46 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonRawValue.java +33 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonSetter.java +33 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonSubTypes.java +44 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonTypeInfo.java +236 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonTypeName.java +28 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonUnwrapped.java +76 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonValue.java +46 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonWriteNullProperties.java +34 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/package-info.java +16 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/DataFormatDetector.java +176 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/DataFormatMatcher.java +117 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/InputAccessor.java +130 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/MatchStrength.java +64 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/package-info.java +8 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/ByteSourceBootstrapper.java +518 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/DefaultPrettyPrinter.java +13 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/Indenter.java +23 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonGeneratorBase.java +570 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonNumericParserBase.java +20 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonParserBase.java +1067 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonParserMinimalBase.java +539 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonReadContext.java +188 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonWriteContext.java +178 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/ReaderBasedParser.java +1815 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/ReaderBasedParserBase.java +228 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/StreamBasedParserBase.java +197 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/Utf8Generator.java +1757 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/Utf8StreamParser.java +2966 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/WriterBasedGenerator.java +1815 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/package-info.java +6 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/BaseReader.java +117 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/CharacterEscapes.java +73 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/IOContext.java +239 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/InputDecorator.java +67 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/JsonStringEncoder.java +408 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/MergedStream.java +145 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/NumberInput.java +303 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/NumberOutput.java +398 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/OutputDecorator.java +40 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/SegmentedStringWriter.java +104 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/SerializedString.java +114 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/UTF32Reader.java +214 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/UTF8Writer.java +387 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/package.html +4 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/AbstractTypeResolver.java +63 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/AnnotationIntrospector.java +1485 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/BeanDescription.java +171 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/BeanProperty.java +123 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/BeanPropertyDefinition.java +66 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ClassIntrospector.java +117 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ContextualDeserializer.java +38 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ContextualKeyDeserializer.java +33 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ContextualSerializer.java +38 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializationConfig.java +926 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializationContext.java +262 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializationProblemHandler.java +56 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializerFactory.java +356 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializerProvider.java +185 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/Deserializers.java +339 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/HandlerInstantiator.java +115 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/InjectableValues.java +85 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonDeserializer.java +166 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonMappingException.java +335 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonSerializable.java +34 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonSerializableWithType.java +22 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonSerializer.java +138 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/KeyDeserializer.java +31 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/KeyDeserializers.java +21 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/MapperConfig.java +1154 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/MappingIterator.java +190 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/MappingJsonFactory.java +81 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/Module.java +255 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ObjectMapper.java +2885 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ObjectReader.java +958 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ObjectWriter.java +554 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/PropertyNamingStrategy.java +258 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ResolvableDeserializer.java +23 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ResolvableSerializer.java +23 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/RuntimeJsonMappingException.java +21 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/SerializationConfig.java +1041 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/SerializerFactory.java +198 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/SerializerProvider.java +552 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/Serializers.java +137 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/TypeDeserializer.java +118 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/TypeSerializer.java +164 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JacksonInject.java +30 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JacksonStdImpl.java +25 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonCachable.java +32 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonDeserialize.java +109 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonFilter.java +31 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonRootName.java +29 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonSerialize.java +216 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonTypeIdResolver.java +35 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonTypeResolver.java +28 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonValueInstantiator.java +26 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonView.java +37 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/NoClass.java +19 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/package-info.java +5 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/AbstractDeserializer.java +102 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ArrayDeserializer.java +28 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ArrayDeserializers.java +11 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BasicDeserializerFactory.java +894 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializer.java +1537 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializerBuilder.java +277 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializerFactory.java +1474 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializerModifier.java +58 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/CollectionDeserializer.java +47 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ContainerDeserializer.java +14 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/CustomDeserializerFactory.java +227 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/DateDeserializer.java +9 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/EnumDeserializer.java +15 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/EnumResolver.java +17 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/FromStringDeserializer.java +13 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/JsonNodeDeserializer.java +54 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/MapDeserializer.java +44 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/SettableAnyProperty.java +177 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/SettableBeanProperty.java +827 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializationContext.java +326 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializer.java +94 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializerProvider.java +494 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializers.java +119 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdKeyDeserializer.java +12 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdKeyDeserializers.java +11 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdScalarDeserializer.java +13 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ThrowableDeserializer.java +13 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/UntypedObjectDeserializer.java +9 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ValueInstantiator.java +280 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ValueInstantiators.java +52 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/BeanPropertyMap.java +257 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/CreatorCollector.java +141 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/CreatorProperty.java +152 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/ExternalTypeHandler.java +173 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/PropertyBasedCreator.java +117 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/PropertyValue.java +117 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/PropertyValueBuffer.java +102 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/UnwrappedPropertyHandler.java +41 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/ValueInjector.java +45 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/package-info.java +9 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/package-info.java +5 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/AtomicBooleanDeserializer.java +22 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/AtomicReferenceDeserializer.java +47 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/CalendarDeserializer.java +47 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ClassDeserializer.java +49 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/CollectionDeserializer.java +265 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ContainerDeserializerBase.java +37 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/DateDeserializer.java +30 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/EnumDeserializer.java +139 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/EnumMapDeserializer.java +90 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/EnumSetDeserializer.java +89 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/FromStringDeserializer.java +265 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/JavaTypeDeserializer.java +38 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/JsonNodeDeserializer.java +314 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/MapDeserializer.java +412 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ObjectArrayDeserializer.java +201 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/PrimitiveArrayDeserializers.java +583 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdDeserializer.java +1136 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdKeyDeserializer.java +340 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdKeyDeserializers.java +108 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdScalarDeserializer.java +34 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdValueInstantiator.java +392 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StringCollectionDeserializer.java +227 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StringDeserializer.java +55 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ThrowableDeserializer.java +164 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/TimestampDeserializer.java +30 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/TokenBufferDeserializer.java +36 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/UntypedObjectDeserializer.java +248 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/package-info.java +15 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/exc/UnrecognizedPropertyException.java +75 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ext/DOMDeserializer.java +65 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ext/OptionalHandlerFactory.java +217 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ext/package-info.java +23 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/Annotated.java +85 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedClass.java +980 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedConstructor.java +143 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedField.java +119 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedMember.java +56 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedMethod.java +188 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedMethodMap.java +85 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedParameter.java +191 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedWithParams.java +195 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotationMap.java +101 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/BasicBeanDescription.java +615 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/BasicClassIntrospector.java +364 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/JacksonAnnotationIntrospector.java +813 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/MemberKey.java +83 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/MethodFilter.java +12 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/NopAnnotationIntrospector.java +209 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/POJOPropertiesCollector.java +713 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/POJOPropertyBuilder.java +648 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/VisibilityChecker.java +424 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/package-info.java +12 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/NamedType.java +53 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/SubtypeResolver.java +39 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/TypeIdResolver.java +74 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/TypeResolverBuilder.java +151 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsArrayTypeDeserializer.java +126 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsArrayTypeSerializer.java +110 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsExternalTypeDeserializer.java +37 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsExternalTypeSerializer.java +129 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsPropertyTypeDeserializer.java +191 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsPropertyTypeSerializer.java +69 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsWrapperTypeDeserializer.java +103 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsWrapperTypeSerializer.java +121 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/ClassNameIdResolver.java +138 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/MinimalClassNameIdResolver.java +66 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/StdSubtypeResolver.java +151 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/StdTypeResolverBuilder.java +202 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeDeserializerBase.java +154 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeIdResolverBase.java +37 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeNameIdResolver.java +154 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeSerializerBase.java +31 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/package-info.java +9 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/package-info.java +10 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleAbstractTypeResolver.java +86 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleDeserializers.java +130 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleKeyDeserializers.java +59 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleModule.java +265 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleSerializers.java +206 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java +45 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/package-info.java +16 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/package-info.java +34 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/AnyGetterWriter.java +48 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ArraySerializers.java +7 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BasicSerializerFactory.java +806 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanPropertyFilter.java +30 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanPropertyWriter.java +512 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializer.java +126 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializerBuilder.java +140 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializerFactory.java +780 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializerModifier.java +95 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ContainerSerializers.java +8 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/CustomSerializerFactory.java +293 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/EnumSerializer.java +17 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/FilterProvider.java +23 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/FilteredBeanPropertyWriter.java +96 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/JdkSerializers.java +11 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/MapSerializer.java +58 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/PropertyBuilder.java +372 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ScalarSerializerBase.java +18 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/SerializerBase.java +23 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/StdKeySerializer.java +10 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/StdSerializerProvider.java +852 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/StdSerializers.java +372 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ToStringSerializer.java +14 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/FailingSerializer.java +43 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/JsonSerializerMap.java +93 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/PropertySerializerMap.java +231 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/ReadOnlyClassToSerializerMap.java +73 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/SerializerCache.java +304 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/SimpleBeanPropertyFilter.java +109 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/SimpleFilterProvider.java +114 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/UnknownSerializer.java +54 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/UnwrappingBeanPropertyWriter.java +99 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/UnwrappingBeanSerializer.java +76 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/package-info.java +5 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/package-info.java +5 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/AsArraySerializerBase.java +185 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/BeanSerializerBase.java +340 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/CalendarSerializer.java +43 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/CollectionSerializer.java +113 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ContainerSerializerBase.java +51 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/DateSerializer.java +42 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/EnumMapSerializer.java +218 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/EnumSerializer.java +84 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/EnumSetSerializer.java +47 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/IndexedStringListSerializer.java +116 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/InetAddressSerializer.java +51 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/IterableSerializer.java +63 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/JsonValueSerializer.java +233 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/MapSerializer.java +422 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/NonTypedScalarSerializerBase.java +34 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/NullSerializer.java +38 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ObjectArraySerializer.java +281 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/RawSerializer.java +52 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ScalarSerializerBase.java +52 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/SerializableSerializer.java +99 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/SerializableWithTypeSerializer.java +90 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/SerializerBase.java +184 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StaticListSerializerBase.java +46 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdArraySerializers.java +476 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdContainerSerializers.java +249 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdJdkSerializers.java +195 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdKeySerializer.java +43 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdKeySerializers.java +95 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StringCollectionSerializer.java +119 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StringSerializer.java +36 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java +38 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ToStringSerializer.java +73 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TokenBufferSerializer.java +66 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/ArrayType.java +260 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/ClassKey.java +94 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/CollectionLikeType.java +204 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/CollectionType.java +94 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/HierarchicType.java +88 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/MapLikeType.java +265 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/MapType.java +146 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/SimpleType.java +250 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeBase.java +148 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeBindings.java +351 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeFactory.java +1165 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeModifier.java +38 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeParser.java +134 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/package-info.java +10 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Annotations.java +23 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ArrayBuilders.java +293 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/BeanUtil.java +260 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ClassUtil.java +645 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Comparators.java +48 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/EnumResolver.java +108 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/EnumValues.java +82 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ISO8601DateFormat.java +52 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ISO8601Utils.java +230 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/JSONPObject.java +105 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/JSONWrappedObject.java +117 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/LRUMap.java +28 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/LinkedNode.java +45 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Named.java +10 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ObjectBuffer.java +257 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/PrimitiveArrayBuilder.java +180 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Provider.java +21 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/RootNameLookup.java +54 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/StdDateFormat.java +348 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/package-info.java +4 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ArrayNode.java +758 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BaseJsonNode.java +122 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BigIntegerNode.java +104 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BinaryNode.java +136 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BooleanNode.java +84 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ContainerNode.java +185 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/DecimalNode.java +96 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/DoubleNode.java +106 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/IntNode.java +122 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/JsonNodeFactory.java +222 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/LongNode.java +99 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/MissingNode.java +97 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NodeCursor.java +222 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NullNode.java +58 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java +72 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ObjectNode.java +696 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/POJONode.java +145 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/TextNode.java +299 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/TreeTraversingParser.java +383 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ValueNode.java +58 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/package-info.java +8 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/package-info.java +30 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/JsonSchema.java +82 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/JsonSerializableSchema.java +46 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/SchemaAware.java +25 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/package-info.java +5 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/BytesToNameCanonicalizer.java +969 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/CharsToNameCanonicalizer.java +578 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name.java +50 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name1.java +44 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name2.java +40 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name3.java +39 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/NameN.java +68 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/package-info.java +5 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/type/JavaType.java +503 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/type/TypeReference.java +60 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/type/package-info.java +8 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/BufferRecycler.java +109 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/ByteArrayBuilder.java +294 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/CharTypes.java +237 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/DefaultPrettyPrinter.java +282 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/InternCache.java +49 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/JsonGeneratorDelegate.java +273 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/JsonParserDelegate.java +251 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/JsonParserSequence.java +150 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/MinimalPrettyPrinter.java +152 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/TextBuffer.java +707 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/TokenBuffer.java +1233 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/VersionUtil.java +79 -0
- data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/package-info.java +4 -0
- metadata +409 -5
- data/test-server/instrumentation-backend/libs/jackson-annotations-2.2.0-rc2-20130418.042013-1.jar +0 -0
- data/test-server/instrumentation-backend/libs/jackson-core-2.2.0-rc2-20130420.041001-2.jar +0 -0
- data/test-server/instrumentation-backend/libs/jackson-databind-2.2.0-rc2-20130422.041053-3.jar +0 -0
@@ -0,0 +1,1537 @@
|
|
1
|
+
package sh.calaba.org.codehaus.jackson.map.deser;
|
2
|
+
|
3
|
+
import java.io.IOException;
|
4
|
+
import java.lang.reflect.*;
|
5
|
+
import java.util.*;
|
6
|
+
|
7
|
+
import sh.calaba.org.codehaus.jackson.*;
|
8
|
+
import sh.calaba.org.codehaus.jackson.annotate.JsonTypeInfo;
|
9
|
+
import sh.calaba.org.codehaus.jackson.map.*;
|
10
|
+
import sh.calaba.org.codehaus.jackson.map.annotate.JsonCachable;
|
11
|
+
import sh.calaba.org.codehaus.jackson.map.deser.impl.*;
|
12
|
+
import sh.calaba.org.codehaus.jackson.map.deser.std.ContainerDeserializerBase;
|
13
|
+
import sh.calaba.org.codehaus.jackson.map.deser.std.StdDeserializer;
|
14
|
+
import sh.calaba.org.codehaus.jackson.map.introspect.AnnotatedClass;
|
15
|
+
import sh.calaba.org.codehaus.jackson.map.introspect.AnnotatedMember;
|
16
|
+
import sh.calaba.org.codehaus.jackson.map.introspect.AnnotatedWithParams;
|
17
|
+
import sh.calaba.org.codehaus.jackson.map.type.ClassKey;
|
18
|
+
import sh.calaba.org.codehaus.jackson.map.util.ClassUtil;
|
19
|
+
import sh.calaba.org.codehaus.jackson.type.JavaType;
|
20
|
+
import sh.calaba.org.codehaus.jackson.util.TokenBuffer;
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Deserializer class that can deserialize instances of
|
24
|
+
* arbitrary bean objects, usually from JSON Object structs,
|
25
|
+
* but possibly also from simple types like String values.
|
26
|
+
*/
|
27
|
+
@JsonCachable
|
28
|
+
/* Because of costs associated with constructing bean deserializers,
|
29
|
+
* they usually should be cached unlike other deserializer types.
|
30
|
+
* But more importantly, it is important to be able to cache
|
31
|
+
* bean serializers to handle cyclic references.
|
32
|
+
*/
|
33
|
+
public class BeanDeserializer
|
34
|
+
extends StdDeserializer<Object>
|
35
|
+
implements ResolvableDeserializer
|
36
|
+
{
|
37
|
+
/*
|
38
|
+
/**********************************************************
|
39
|
+
/* Information regarding type being deserialized
|
40
|
+
/**********************************************************
|
41
|
+
*/
|
42
|
+
|
43
|
+
/**
|
44
|
+
* Class for which deserializer is built; used for accessing
|
45
|
+
* annotations during resolution phase (see {@link #resolve}).
|
46
|
+
*/
|
47
|
+
final protected AnnotatedClass _forClass;
|
48
|
+
|
49
|
+
/**
|
50
|
+
* Declared type of the bean this deserializer handles.
|
51
|
+
*/
|
52
|
+
final protected JavaType _beanType;
|
53
|
+
|
54
|
+
/**
|
55
|
+
* Property that contains value to be deserialized using
|
56
|
+
* deserializer; mostly needed to find contextual annotations
|
57
|
+
* for subtypes.
|
58
|
+
*
|
59
|
+
* @since 1.7
|
60
|
+
*/
|
61
|
+
final protected BeanProperty _property;
|
62
|
+
|
63
|
+
/*
|
64
|
+
/**********************************************************
|
65
|
+
/* Construction configuration
|
66
|
+
/**********************************************************
|
67
|
+
*/
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Object that handles details of constructing initial
|
71
|
+
* bean value (to which bind data to), unless instance
|
72
|
+
* is passed (via updateValue())
|
73
|
+
*/
|
74
|
+
protected final ValueInstantiator _valueInstantiator;
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Deserializer that is used iff delegate-based creator is
|
78
|
+
* to be used for deserializing from JSON Object.
|
79
|
+
*/
|
80
|
+
protected JsonDeserializer<Object> _delegateDeserializer;
|
81
|
+
|
82
|
+
/**
|
83
|
+
* If the bean needs to be instantiated using constructor
|
84
|
+
* or factory method
|
85
|
+
* that takes one or more named properties as argument(s),
|
86
|
+
* this creator is used for instantiation.
|
87
|
+
*/
|
88
|
+
protected final PropertyBasedCreator _propertyBasedCreator;
|
89
|
+
|
90
|
+
/**
|
91
|
+
* Flag that is set to mark "non-standard" cases; where either
|
92
|
+
* we use one of non-default creators, or there are unwrapped
|
93
|
+
* values to consider.
|
94
|
+
*/
|
95
|
+
protected boolean _nonStandardCreation;
|
96
|
+
|
97
|
+
/*
|
98
|
+
/**********************************************************
|
99
|
+
/* Property information, setters
|
100
|
+
/**********************************************************
|
101
|
+
*/
|
102
|
+
|
103
|
+
/**
|
104
|
+
* Mapping of property names to properties, built when all properties
|
105
|
+
* to use have been successfully resolved.
|
106
|
+
*
|
107
|
+
* @since 1.7
|
108
|
+
*/
|
109
|
+
final protected BeanPropertyMap _beanProperties;
|
110
|
+
|
111
|
+
/**
|
112
|
+
* List of {@link ValueInjector}s, if any injectable values are
|
113
|
+
* expected by the bean; otherwise null.
|
114
|
+
* This includes injectors used for injecting values via setters
|
115
|
+
* and fields, but not ones passed through constructor parameters.
|
116
|
+
*
|
117
|
+
* @since 1.9
|
118
|
+
*/
|
119
|
+
final protected ValueInjector[] _injectables;
|
120
|
+
|
121
|
+
/**
|
122
|
+
* Fallback setter used for handling any properties that are not
|
123
|
+
* mapped to regular setters. If setter is not null, it will be
|
124
|
+
* called once for each such property.
|
125
|
+
*/
|
126
|
+
protected SettableAnyProperty _anySetter;
|
127
|
+
|
128
|
+
/**
|
129
|
+
* In addition to properties that are set, we will also keep
|
130
|
+
* track of recognized but ignorable properties: these will
|
131
|
+
* be skipped without errors or warnings.
|
132
|
+
*/
|
133
|
+
final protected HashSet<String> _ignorableProps;
|
134
|
+
|
135
|
+
/**
|
136
|
+
* Flag that can be set to ignore and skip unknown properties.
|
137
|
+
* If set, will not throw an exception for unknown properties.
|
138
|
+
*/
|
139
|
+
final protected boolean _ignoreAllUnknown;
|
140
|
+
|
141
|
+
/**
|
142
|
+
* We may also have one or more back reference fields (usually
|
143
|
+
* zero or one).
|
144
|
+
*/
|
145
|
+
final protected Map<String, SettableBeanProperty> _backRefs;
|
146
|
+
|
147
|
+
/*
|
148
|
+
/**********************************************************
|
149
|
+
/* Related handlers
|
150
|
+
/**********************************************************
|
151
|
+
*/
|
152
|
+
|
153
|
+
/**
|
154
|
+
* Lazily constructed map used to contain deserializers needed
|
155
|
+
* for polymorphic subtypes.
|
156
|
+
*/
|
157
|
+
protected HashMap<ClassKey, JsonDeserializer<Object>> _subDeserializers;
|
158
|
+
|
159
|
+
/**
|
160
|
+
* If one of properties has "unwrapped" value, we need separate
|
161
|
+
* helper object
|
162
|
+
*
|
163
|
+
* @since 1.9
|
164
|
+
*/
|
165
|
+
protected UnwrappedPropertyHandler _unwrappedPropertyHandler;
|
166
|
+
|
167
|
+
/**
|
168
|
+
* Handler that we need iff any of properties uses external
|
169
|
+
* type id.
|
170
|
+
*/
|
171
|
+
protected ExternalTypeHandler _externalTypeIdHandler;
|
172
|
+
|
173
|
+
/*
|
174
|
+
/**********************************************************
|
175
|
+
/* Life-cycle, construction, initialization
|
176
|
+
/**********************************************************
|
177
|
+
*/
|
178
|
+
|
179
|
+
/**
|
180
|
+
* @deprecated (since 1.9) Use the constructor that takes {@link ValueInstantiator} instead
|
181
|
+
*/
|
182
|
+
@Deprecated
|
183
|
+
public BeanDeserializer(AnnotatedClass forClass, JavaType type, BeanProperty property,
|
184
|
+
CreatorCollector creators,
|
185
|
+
BeanPropertyMap properties, Map<String, SettableBeanProperty> backRefs,
|
186
|
+
HashSet<String> ignorableProps, boolean ignoreAllUnknown,
|
187
|
+
SettableAnyProperty anySetter)
|
188
|
+
{
|
189
|
+
this(forClass, type, property,
|
190
|
+
creators.constructValueInstantiator(null),
|
191
|
+
properties, backRefs,
|
192
|
+
ignorableProps, ignoreAllUnknown,
|
193
|
+
anySetter, null);
|
194
|
+
}
|
195
|
+
|
196
|
+
/**
|
197
|
+
* @since 1.9
|
198
|
+
*/
|
199
|
+
public BeanDeserializer(BeanDescription beanDesc, BeanProperty property,
|
200
|
+
ValueInstantiator valueInstantiator,
|
201
|
+
BeanPropertyMap properties, Map<String, SettableBeanProperty> backRefs,
|
202
|
+
HashSet<String> ignorableProps, boolean ignoreAllUnknown,
|
203
|
+
SettableAnyProperty anySetter, List<ValueInjector> injectables)
|
204
|
+
{
|
205
|
+
this(beanDesc.getClassInfo(), beanDesc.getType(), property,
|
206
|
+
valueInstantiator,
|
207
|
+
properties, backRefs,
|
208
|
+
ignorableProps, ignoreAllUnknown,
|
209
|
+
anySetter, injectables);
|
210
|
+
}
|
211
|
+
|
212
|
+
/**
|
213
|
+
* @since 1.9
|
214
|
+
*/
|
215
|
+
protected BeanDeserializer(AnnotatedClass forClass, JavaType type, BeanProperty property,
|
216
|
+
ValueInstantiator valueInstantiator,
|
217
|
+
BeanPropertyMap properties, Map<String, SettableBeanProperty> backRefs,
|
218
|
+
HashSet<String> ignorableProps, boolean ignoreAllUnknown,
|
219
|
+
SettableAnyProperty anySetter, List<ValueInjector> injectables)
|
220
|
+
{
|
221
|
+
super(type);
|
222
|
+
_forClass = forClass;
|
223
|
+
_beanType = type;
|
224
|
+
_property = property;
|
225
|
+
|
226
|
+
_valueInstantiator = valueInstantiator;
|
227
|
+
if (valueInstantiator.canCreateFromObjectWith()) {
|
228
|
+
_propertyBasedCreator = new PropertyBasedCreator(valueInstantiator);
|
229
|
+
} else {
|
230
|
+
_propertyBasedCreator = null;
|
231
|
+
}
|
232
|
+
|
233
|
+
_beanProperties = properties;
|
234
|
+
_backRefs = backRefs;
|
235
|
+
_ignorableProps = ignorableProps;
|
236
|
+
_ignoreAllUnknown = ignoreAllUnknown;
|
237
|
+
_anySetter = anySetter;
|
238
|
+
_injectables = (injectables == null || injectables.isEmpty()) ? null
|
239
|
+
: injectables.toArray(new ValueInjector[injectables.size()]);
|
240
|
+
|
241
|
+
_nonStandardCreation = valueInstantiator.canCreateUsingDelegate()
|
242
|
+
|| (_propertyBasedCreator != null)
|
243
|
+
|| !valueInstantiator.canCreateUsingDefault()
|
244
|
+
|| (_unwrappedPropertyHandler != null);
|
245
|
+
}
|
246
|
+
|
247
|
+
/**
|
248
|
+
* Copy-constructor that can be used by sub-classes to allow
|
249
|
+
* copy-on-write styling copying of settings of an existing instance.
|
250
|
+
*
|
251
|
+
* @since 1.7
|
252
|
+
*/
|
253
|
+
protected BeanDeserializer(BeanDeserializer src)
|
254
|
+
{
|
255
|
+
this(src, src._ignoreAllUnknown);
|
256
|
+
}
|
257
|
+
|
258
|
+
/**
|
259
|
+
* @since 1.9
|
260
|
+
*/
|
261
|
+
protected BeanDeserializer(BeanDeserializer src, boolean ignoreAllUnknown)
|
262
|
+
{
|
263
|
+
super(src._beanType);
|
264
|
+
|
265
|
+
_forClass = src._forClass;
|
266
|
+
_beanType = src._beanType;
|
267
|
+
_property = src._property;
|
268
|
+
|
269
|
+
_valueInstantiator = src._valueInstantiator;
|
270
|
+
_delegateDeserializer = src._delegateDeserializer;
|
271
|
+
_propertyBasedCreator = src._propertyBasedCreator;
|
272
|
+
|
273
|
+
_beanProperties = src._beanProperties;
|
274
|
+
_backRefs = src._backRefs;
|
275
|
+
_ignorableProps = src._ignorableProps;
|
276
|
+
_ignoreAllUnknown = ignoreAllUnknown;
|
277
|
+
_anySetter = src._anySetter;
|
278
|
+
_injectables = src._injectables;
|
279
|
+
|
280
|
+
_nonStandardCreation = src._nonStandardCreation;
|
281
|
+
_unwrappedPropertyHandler = src._unwrappedPropertyHandler;
|
282
|
+
}
|
283
|
+
|
284
|
+
@Override
|
285
|
+
public JsonDeserializer<Object> unwrappingDeserializer()
|
286
|
+
{
|
287
|
+
/* bit kludgy but we don't want to accidentally change type;
|
288
|
+
* sub-classes MUST override this method to support unwrapped
|
289
|
+
* properties...
|
290
|
+
*/
|
291
|
+
if (getClass() != BeanDeserializer.class) {
|
292
|
+
return this;
|
293
|
+
}
|
294
|
+
/* main thing really is to just enforce ignoring of unknown
|
295
|
+
* properties; since there may be multiple unwrapped values
|
296
|
+
* and properties for all may be interleaved...
|
297
|
+
*/
|
298
|
+
return new BeanDeserializer(this, true);
|
299
|
+
}
|
300
|
+
|
301
|
+
/*
|
302
|
+
/**********************************************************
|
303
|
+
/* Public accessors
|
304
|
+
/**********************************************************
|
305
|
+
*/
|
306
|
+
|
307
|
+
public boolean hasProperty(String propertyName) {
|
308
|
+
return _beanProperties.find(propertyName) != null;
|
309
|
+
}
|
310
|
+
|
311
|
+
/**
|
312
|
+
* Accessor for checking number of deserialized properties.
|
313
|
+
*
|
314
|
+
* @since 1.7
|
315
|
+
*/
|
316
|
+
public int getPropertyCount() {
|
317
|
+
return _beanProperties.size();
|
318
|
+
}
|
319
|
+
|
320
|
+
public final Class<?> getBeanClass() { return _beanType.getRawClass(); }
|
321
|
+
|
322
|
+
@Override public JavaType getValueType() { return _beanType; }
|
323
|
+
|
324
|
+
/**
|
325
|
+
*
|
326
|
+
* @since 1.6
|
327
|
+
*/
|
328
|
+
public Iterator<SettableBeanProperty> properties()
|
329
|
+
{
|
330
|
+
if (_beanProperties == null) { // since 1.7
|
331
|
+
throw new IllegalStateException("Can only call before BeanDeserializer has been resolved");
|
332
|
+
}
|
333
|
+
return _beanProperties.allProperties();
|
334
|
+
}
|
335
|
+
|
336
|
+
/**
|
337
|
+
* Method needed by {@link BeanDeserializerFactory} to properly link
|
338
|
+
* managed- and back-reference pairs.
|
339
|
+
*/
|
340
|
+
public SettableBeanProperty findBackReference(String logicalName)
|
341
|
+
{
|
342
|
+
if (_backRefs == null) {
|
343
|
+
return null;
|
344
|
+
}
|
345
|
+
return _backRefs.get(logicalName);
|
346
|
+
}
|
347
|
+
|
348
|
+
/**
|
349
|
+
* @since 1.9
|
350
|
+
*/
|
351
|
+
public ValueInstantiator getValueInstantiator() {
|
352
|
+
return _valueInstantiator;
|
353
|
+
}
|
354
|
+
|
355
|
+
/*
|
356
|
+
/**********************************************************
|
357
|
+
/* Validation, post-processing
|
358
|
+
/**********************************************************
|
359
|
+
*/
|
360
|
+
|
361
|
+
/**
|
362
|
+
* Method called to finalize setup of this deserializer,
|
363
|
+
* after deserializer itself has been registered.
|
364
|
+
* This is needed to handle recursive and transitive dependencies.
|
365
|
+
*/
|
366
|
+
@Override
|
367
|
+
public void resolve(DeserializationConfig config, DeserializerProvider provider)
|
368
|
+
throws JsonMappingException
|
369
|
+
{
|
370
|
+
Iterator<SettableBeanProperty> it = _beanProperties.allProperties();
|
371
|
+
UnwrappedPropertyHandler unwrapped = null;
|
372
|
+
ExternalTypeHandler.Builder extTypes = null;
|
373
|
+
|
374
|
+
while (it.hasNext()) {
|
375
|
+
SettableBeanProperty origProp = it.next();
|
376
|
+
SettableBeanProperty prop = origProp;
|
377
|
+
// May already have deserializer from annotations, if so, skip:
|
378
|
+
if (!prop.hasValueDeserializer()) {
|
379
|
+
prop = prop.withValueDeserializer(findDeserializer(config, provider, prop.getType(), prop));
|
380
|
+
}
|
381
|
+
// [JACKSON-235]: need to link managed references with matching back references
|
382
|
+
prop = _resolveManagedReferenceProperty(config, prop);
|
383
|
+
// [JACKSON-132]: support unwrapped values (via @JsonUnwrapped)
|
384
|
+
SettableBeanProperty u = _resolveUnwrappedProperty(config, prop);
|
385
|
+
if (u != null) {
|
386
|
+
prop = u;
|
387
|
+
if (unwrapped == null) {
|
388
|
+
unwrapped = new UnwrappedPropertyHandler();
|
389
|
+
}
|
390
|
+
unwrapped.addProperty(prop);
|
391
|
+
}
|
392
|
+
// [JACKSON-594]: non-static inner classes too:
|
393
|
+
prop = _resolveInnerClassValuedProperty(config, prop);
|
394
|
+
if (prop != origProp) {
|
395
|
+
_beanProperties.replace(prop);
|
396
|
+
}
|
397
|
+
|
398
|
+
/* one more thing: if this property uses "external property" type inclusion
|
399
|
+
* (see [JACKSON-453]), it needs different handling altogether
|
400
|
+
*/
|
401
|
+
if (prop.hasValueTypeDeserializer()) {
|
402
|
+
TypeDeserializer typeDeser = prop.getValueTypeDeserializer();
|
403
|
+
if (typeDeser.getTypeInclusion() == JsonTypeInfo.As.EXTERNAL_PROPERTY) {
|
404
|
+
if (extTypes == null) {
|
405
|
+
extTypes = new ExternalTypeHandler.Builder();
|
406
|
+
}
|
407
|
+
extTypes.addExternal(prop, typeDeser.getPropertyName());
|
408
|
+
// In fact, remove from list of known properties to simplify later handling
|
409
|
+
_beanProperties.remove(prop);
|
410
|
+
}
|
411
|
+
}
|
412
|
+
}
|
413
|
+
|
414
|
+
// Finally, "any setter" may also need to be resolved now
|
415
|
+
if (_anySetter != null && !_anySetter.hasValueDeserializer()) {
|
416
|
+
_anySetter = _anySetter.withValueDeserializer(findDeserializer(config, provider, _anySetter.getType(), _anySetter.getProperty()));
|
417
|
+
}
|
418
|
+
|
419
|
+
// as well as delegate-based constructor:
|
420
|
+
if (_valueInstantiator.canCreateUsingDelegate()) {
|
421
|
+
JavaType delegateType = _valueInstantiator.getDelegateType();
|
422
|
+
if (delegateType == null) {
|
423
|
+
throw new IllegalArgumentException("Invalid delegate-creator definition for "+_beanType
|
424
|
+
+": value instantiator ("+_valueInstantiator.getClass().getName()
|
425
|
+
+") returned true for 'canCreateUsingDelegate()', but null for 'getDelegateType()'");
|
426
|
+
}
|
427
|
+
AnnotatedWithParams delegateCreator = _valueInstantiator.getDelegateCreator();
|
428
|
+
// Need to create a temporary property to allow contextual deserializers:
|
429
|
+
BeanProperty.Std property = new BeanProperty.Std(null,
|
430
|
+
delegateType, _forClass.getAnnotations(), delegateCreator);
|
431
|
+
_delegateDeserializer = findDeserializer(config, provider, delegateType, property);
|
432
|
+
}
|
433
|
+
// or property-based one
|
434
|
+
// IMPORTANT: must access properties that _propertyBasedCreator has
|
435
|
+
if (_propertyBasedCreator != null) {
|
436
|
+
for (SettableBeanProperty prop : _propertyBasedCreator.getCreatorProperties()) {
|
437
|
+
if (!prop.hasValueDeserializer()) {
|
438
|
+
_propertyBasedCreator.assignDeserializer(prop,
|
439
|
+
findDeserializer(config, provider, prop.getType(), prop));
|
440
|
+
}
|
441
|
+
}
|
442
|
+
}
|
443
|
+
if (extTypes != null) {
|
444
|
+
_externalTypeIdHandler = extTypes.build();
|
445
|
+
// we consider this non-standard, to offline handling
|
446
|
+
_nonStandardCreation = true;
|
447
|
+
}
|
448
|
+
|
449
|
+
_unwrappedPropertyHandler = unwrapped;
|
450
|
+
if (unwrapped != null) { // we consider this non-standard, to offline handling
|
451
|
+
_nonStandardCreation = true;
|
452
|
+
}
|
453
|
+
}
|
454
|
+
|
455
|
+
/**
|
456
|
+
* Helper method called to see if given property is part of 'managed' property
|
457
|
+
* pair (managed + back reference), and if so, handle resolution details.
|
458
|
+
*
|
459
|
+
* @since 1.9
|
460
|
+
*/
|
461
|
+
protected SettableBeanProperty _resolveManagedReferenceProperty(DeserializationConfig config,
|
462
|
+
SettableBeanProperty prop)
|
463
|
+
{
|
464
|
+
String refName = prop.getManagedReferenceName();
|
465
|
+
if (refName == null) {
|
466
|
+
return prop;
|
467
|
+
}
|
468
|
+
JsonDeserializer<?> valueDeser = prop.getValueDeserializer();
|
469
|
+
SettableBeanProperty backProp = null;
|
470
|
+
boolean isContainer = false;
|
471
|
+
if (valueDeser instanceof BeanDeserializer) {
|
472
|
+
backProp = ((BeanDeserializer) valueDeser).findBackReference(refName);
|
473
|
+
} else if (valueDeser instanceof ContainerDeserializerBase<?>) {
|
474
|
+
JsonDeserializer<?> contentDeser = ((ContainerDeserializerBase<?>) valueDeser).getContentDeserializer();
|
475
|
+
if (!(contentDeser instanceof BeanDeserializer)) {
|
476
|
+
throw new IllegalArgumentException("Can not handle managed/back reference '"+refName
|
477
|
+
+"': value deserializer is of type ContainerDeserializerBase, but content type is not handled by a BeanDeserializer "
|
478
|
+
+" (instead it's of type "+contentDeser.getClass().getName()+")");
|
479
|
+
}
|
480
|
+
backProp = ((BeanDeserializer) contentDeser).findBackReference(refName);
|
481
|
+
isContainer = true;
|
482
|
+
} else if (valueDeser instanceof AbstractDeserializer) { // [JACKSON-368]: not easy to fix, alas
|
483
|
+
throw new IllegalArgumentException("Can not handle managed/back reference for abstract types (property "+_beanType.getRawClass().getName()+"."+prop.getName()+")");
|
484
|
+
} else {
|
485
|
+
throw new IllegalArgumentException("Can not handle managed/back reference '"+refName
|
486
|
+
+"': type for value deserializer is not BeanDeserializer or ContainerDeserializerBase, but "
|
487
|
+
+valueDeser.getClass().getName());
|
488
|
+
}
|
489
|
+
if (backProp == null) {
|
490
|
+
throw new IllegalArgumentException("Can not handle managed/back reference '"+refName+"': no back reference property found from type "
|
491
|
+
+prop.getType());
|
492
|
+
}
|
493
|
+
// also: verify that type is compatible
|
494
|
+
JavaType referredType = _beanType;
|
495
|
+
JavaType backRefType = backProp.getType();
|
496
|
+
if (!backRefType.getRawClass().isAssignableFrom(referredType.getRawClass())) {
|
497
|
+
throw new IllegalArgumentException("Can not handle managed/back reference '"+refName+"': back reference type ("
|
498
|
+
+backRefType.getRawClass().getName()+") not compatible with managed type ("
|
499
|
+
+referredType.getRawClass().getName()+")");
|
500
|
+
}
|
501
|
+
return new SettableBeanProperty.ManagedReferenceProperty(refName, prop, backProp,
|
502
|
+
_forClass.getAnnotations(), isContainer);
|
503
|
+
}
|
504
|
+
|
505
|
+
/**
|
506
|
+
* Helper method called to see if given property might be so-called unwrapped
|
507
|
+
* property: these require special handling.
|
508
|
+
*
|
509
|
+
* @since 1.9
|
510
|
+
*/
|
511
|
+
protected SettableBeanProperty _resolveUnwrappedProperty(DeserializationConfig config,
|
512
|
+
SettableBeanProperty prop)
|
513
|
+
{
|
514
|
+
AnnotatedMember am = prop.getMember();
|
515
|
+
if (am != null && config.getAnnotationIntrospector().shouldUnwrapProperty(am) == Boolean.TRUE) {
|
516
|
+
JsonDeserializer<Object> orig = prop.getValueDeserializer();
|
517
|
+
JsonDeserializer<Object> unwrapping = orig.unwrappingDeserializer();
|
518
|
+
if (unwrapping != orig && unwrapping != null) {
|
519
|
+
// might be cleaner to create new instance; but difficult to do reliably, so:
|
520
|
+
return prop.withValueDeserializer(unwrapping);
|
521
|
+
}
|
522
|
+
}
|
523
|
+
return null;
|
524
|
+
}
|
525
|
+
|
526
|
+
/**
|
527
|
+
* Helper method that will handle gruesome details of dealing with properties
|
528
|
+
* that have non-static inner class as value...
|
529
|
+
*
|
530
|
+
* @since 1.9
|
531
|
+
*/
|
532
|
+
protected SettableBeanProperty _resolveInnerClassValuedProperty(DeserializationConfig config,
|
533
|
+
SettableBeanProperty prop)
|
534
|
+
{
|
535
|
+
/* Should we encounter a property that has non-static inner-class
|
536
|
+
* as value, we need to add some more magic to find the "hidden" constructor...
|
537
|
+
*/
|
538
|
+
JsonDeserializer<Object> deser = prop.getValueDeserializer();
|
539
|
+
// ideally wouldn't rely on it being BeanDeserializer; but for now it'll have to do
|
540
|
+
if (deser instanceof BeanDeserializer) {
|
541
|
+
BeanDeserializer bd = (BeanDeserializer) deser;
|
542
|
+
ValueInstantiator vi = bd.getValueInstantiator();
|
543
|
+
if (!vi.canCreateUsingDefault()) { // no default constructor
|
544
|
+
Class<?> valueClass = prop.getType().getRawClass();
|
545
|
+
Class<?> enclosing = ClassUtil.getOuterClass(valueClass);
|
546
|
+
// and is inner class of the bean class...
|
547
|
+
if (enclosing != null && enclosing == _beanType.getRawClass()) {
|
548
|
+
for (Constructor<?> ctor : valueClass.getConstructors()) {
|
549
|
+
Class<?>[] paramTypes = ctor.getParameterTypes();
|
550
|
+
if (paramTypes.length == 1 && paramTypes[0] == enclosing) {
|
551
|
+
if (config.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS)) {
|
552
|
+
ClassUtil.checkAndFixAccess(ctor);
|
553
|
+
}
|
554
|
+
return new SettableBeanProperty.InnerClassProperty(prop, ctor);
|
555
|
+
}
|
556
|
+
}
|
557
|
+
}
|
558
|
+
}
|
559
|
+
}
|
560
|
+
return prop;
|
561
|
+
}
|
562
|
+
|
563
|
+
/*
|
564
|
+
/**********************************************************
|
565
|
+
/* JsonDeserializer implementation
|
566
|
+
/**********************************************************
|
567
|
+
*/
|
568
|
+
|
569
|
+
/**
|
570
|
+
* Main deserialization method for bean-based objects (POJOs).
|
571
|
+
*/
|
572
|
+
@Override
|
573
|
+
public final Object deserialize(JsonParser jp, DeserializationContext ctxt)
|
574
|
+
throws IOException, JsonProcessingException
|
575
|
+
{
|
576
|
+
JsonToken t = jp.getCurrentToken();
|
577
|
+
// common case first:
|
578
|
+
if (t == JsonToken.START_OBJECT) {
|
579
|
+
jp.nextToken();
|
580
|
+
return deserializeFromObject(jp, ctxt);
|
581
|
+
}
|
582
|
+
// and then others, generally requiring use of @JsonCreator
|
583
|
+
switch (t) {
|
584
|
+
case VALUE_STRING:
|
585
|
+
return deserializeFromString(jp, ctxt);
|
586
|
+
case VALUE_NUMBER_INT:
|
587
|
+
return deserializeFromNumber(jp, ctxt);
|
588
|
+
case VALUE_NUMBER_FLOAT:
|
589
|
+
return deserializeFromDouble(jp, ctxt);
|
590
|
+
case VALUE_EMBEDDED_OBJECT:
|
591
|
+
return jp.getEmbeddedObject();
|
592
|
+
case VALUE_TRUE:
|
593
|
+
case VALUE_FALSE:
|
594
|
+
return deserializeFromBoolean(jp, ctxt);
|
595
|
+
case START_ARRAY:
|
596
|
+
// these only work if there's a (delegating) creator...
|
597
|
+
return deserializeFromArray(jp, ctxt);
|
598
|
+
case FIELD_NAME:
|
599
|
+
case END_OBJECT: // added to resolve [JACKSON-319], possible related issues
|
600
|
+
return deserializeFromObject(jp, ctxt);
|
601
|
+
}
|
602
|
+
throw ctxt.mappingException(getBeanClass());
|
603
|
+
}
|
604
|
+
|
605
|
+
/**
|
606
|
+
* Secondary deserialization method, called in cases where POJO
|
607
|
+
* instance is created as part of deserialization, potentially
|
608
|
+
* after collecting some or all of the properties to set.
|
609
|
+
*/
|
610
|
+
@Override
|
611
|
+
public Object deserialize(JsonParser jp, DeserializationContext ctxt, Object bean)
|
612
|
+
throws IOException, JsonProcessingException
|
613
|
+
{
|
614
|
+
if (_injectables != null) {
|
615
|
+
injectValues(ctxt, bean);
|
616
|
+
}
|
617
|
+
if (_unwrappedPropertyHandler != null) {
|
618
|
+
return deserializeWithUnwrapped(jp, ctxt, bean);
|
619
|
+
}
|
620
|
+
if (_externalTypeIdHandler != null) {
|
621
|
+
return deserializeWithExternalTypeId(jp, ctxt, bean);
|
622
|
+
}
|
623
|
+
JsonToken t = jp.getCurrentToken();
|
624
|
+
// 23-Mar-2010, tatu: In some cases, we start with full JSON object too...
|
625
|
+
if (t == JsonToken.START_OBJECT) {
|
626
|
+
t = jp.nextToken();
|
627
|
+
}
|
628
|
+
for (; t == JsonToken.FIELD_NAME; t = jp.nextToken()) {
|
629
|
+
String propName = jp.getCurrentName();
|
630
|
+
// Skip field name:
|
631
|
+
jp.nextToken();
|
632
|
+
SettableBeanProperty prop = _beanProperties.find(propName);
|
633
|
+
|
634
|
+
if (prop != null) { // normal case
|
635
|
+
try {
|
636
|
+
prop.deserializeAndSet(jp, ctxt, bean);
|
637
|
+
} catch (Exception e) {
|
638
|
+
wrapAndThrow(e, bean, propName, ctxt);
|
639
|
+
}
|
640
|
+
continue;
|
641
|
+
}
|
642
|
+
/* As per [JACKSON-313], things marked as ignorable should not be
|
643
|
+
* passed to any setter
|
644
|
+
*/
|
645
|
+
if (_ignorableProps != null && _ignorableProps.contains(propName)) {
|
646
|
+
jp.skipChildren();
|
647
|
+
} else if (_anySetter != null) {
|
648
|
+
_anySetter.deserializeAndSet(jp, ctxt, bean, propName);
|
649
|
+
continue;
|
650
|
+
} else {
|
651
|
+
// Unknown: let's call handler method
|
652
|
+
handleUnknownProperty(jp, ctxt, bean, propName);
|
653
|
+
}
|
654
|
+
}
|
655
|
+
return bean;
|
656
|
+
}
|
657
|
+
|
658
|
+
@Override
|
659
|
+
public Object deserializeWithType(JsonParser jp, DeserializationContext ctxt,
|
660
|
+
TypeDeserializer typeDeserializer)
|
661
|
+
throws IOException, JsonProcessingException
|
662
|
+
{
|
663
|
+
// In future could check current token... for now this should be enough:
|
664
|
+
return typeDeserializer.deserializeTypedFromObject(jp, ctxt);
|
665
|
+
}
|
666
|
+
|
667
|
+
/*
|
668
|
+
/**********************************************************
|
669
|
+
/* Concrete deserialization methods
|
670
|
+
/**********************************************************
|
671
|
+
*/
|
672
|
+
|
673
|
+
public Object deserializeFromObject(JsonParser jp, DeserializationContext ctxt)
|
674
|
+
throws IOException, JsonProcessingException
|
675
|
+
{
|
676
|
+
if (_nonStandardCreation) {
|
677
|
+
if (_unwrappedPropertyHandler != null) {
|
678
|
+
return deserializeWithUnwrapped(jp, ctxt);
|
679
|
+
}
|
680
|
+
if (_externalTypeIdHandler != null) {
|
681
|
+
return deserializeWithExternalTypeId(jp, ctxt);
|
682
|
+
}
|
683
|
+
return deserializeFromObjectUsingNonDefault(jp, ctxt);
|
684
|
+
}
|
685
|
+
|
686
|
+
final Object bean = _valueInstantiator.createUsingDefault();
|
687
|
+
if (_injectables != null) {
|
688
|
+
injectValues(ctxt, bean);
|
689
|
+
}
|
690
|
+
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
691
|
+
String propName = jp.getCurrentName();
|
692
|
+
// Skip field name:
|
693
|
+
jp.nextToken();
|
694
|
+
SettableBeanProperty prop = _beanProperties.find(propName);
|
695
|
+
if (prop != null) { // normal case
|
696
|
+
try {
|
697
|
+
prop.deserializeAndSet(jp, ctxt, bean);
|
698
|
+
} catch (Exception e) {
|
699
|
+
wrapAndThrow(e, bean, propName, ctxt);
|
700
|
+
}
|
701
|
+
continue;
|
702
|
+
}
|
703
|
+
_handleUnknown(jp, ctxt, bean, propName);
|
704
|
+
}
|
705
|
+
return bean;
|
706
|
+
}
|
707
|
+
|
708
|
+
private final void _handleUnknown(JsonParser jp, DeserializationContext ctxt,
|
709
|
+
Object bean, String propName)
|
710
|
+
throws IOException, JsonProcessingException
|
711
|
+
{
|
712
|
+
/* As per [JACKSON-313], things marked as ignorable should not be
|
713
|
+
* passed to any setter
|
714
|
+
*/
|
715
|
+
if (_ignorableProps != null && _ignorableProps.contains(propName)) {
|
716
|
+
jp.skipChildren();
|
717
|
+
} else if (_anySetter != null) {
|
718
|
+
try {
|
719
|
+
_anySetter.deserializeAndSet(jp, ctxt, bean, propName);
|
720
|
+
} catch (Exception e) {
|
721
|
+
wrapAndThrow(e, bean, propName, ctxt);
|
722
|
+
}
|
723
|
+
} else {
|
724
|
+
// Unknown: let's call handler method
|
725
|
+
handleUnknownProperty(jp, ctxt, bean, propName);
|
726
|
+
}
|
727
|
+
}
|
728
|
+
|
729
|
+
/**
|
730
|
+
* @since 1.9
|
731
|
+
*/
|
732
|
+
protected Object deserializeFromObjectUsingNonDefault(JsonParser jp, DeserializationContext ctxt)
|
733
|
+
throws IOException, JsonProcessingException
|
734
|
+
{
|
735
|
+
if (_delegateDeserializer != null) {
|
736
|
+
return _valueInstantiator.createUsingDelegate(_delegateDeserializer.deserialize(jp, ctxt));
|
737
|
+
}
|
738
|
+
if (_propertyBasedCreator != null) {
|
739
|
+
return _deserializeUsingPropertyBased(jp, ctxt);
|
740
|
+
}
|
741
|
+
// should only occur for abstract types...
|
742
|
+
if (_beanType.isAbstract()) {
|
743
|
+
throw JsonMappingException.from(jp, "Can not instantiate abstract type "+_beanType
|
744
|
+
+" (need to add/enable type information?)");
|
745
|
+
}
|
746
|
+
throw JsonMappingException.from(jp, "No suitable constructor found for type "
|
747
|
+
+_beanType+": can not instantiate from JSON object (need to add/enable type information?)");
|
748
|
+
}
|
749
|
+
|
750
|
+
public Object deserializeFromString(JsonParser jp, DeserializationContext ctxt)
|
751
|
+
throws IOException, JsonProcessingException
|
752
|
+
{
|
753
|
+
/* Bit complicated if we have delegating creator; may need to use it,
|
754
|
+
* or might not...
|
755
|
+
*/
|
756
|
+
if (_delegateDeserializer != null) {
|
757
|
+
if (!_valueInstantiator.canCreateFromString()) {
|
758
|
+
Object bean = _valueInstantiator.createUsingDelegate(_delegateDeserializer.deserialize(jp, ctxt));
|
759
|
+
if (_injectables != null) {
|
760
|
+
injectValues(ctxt, bean);
|
761
|
+
}
|
762
|
+
return bean;
|
763
|
+
}
|
764
|
+
}
|
765
|
+
return _valueInstantiator.createFromString(jp.getText());
|
766
|
+
}
|
767
|
+
|
768
|
+
public Object deserializeFromNumber(JsonParser jp, DeserializationContext ctxt)
|
769
|
+
throws IOException, JsonProcessingException
|
770
|
+
{
|
771
|
+
switch (jp.getNumberType()) {
|
772
|
+
case INT:
|
773
|
+
if (_delegateDeserializer != null) {
|
774
|
+
if (!_valueInstantiator.canCreateFromInt()) {
|
775
|
+
Object bean = _valueInstantiator.createUsingDelegate(_delegateDeserializer.deserialize(jp, ctxt));
|
776
|
+
if (_injectables != null) {
|
777
|
+
injectValues(ctxt, bean);
|
778
|
+
}
|
779
|
+
return bean;
|
780
|
+
}
|
781
|
+
}
|
782
|
+
return _valueInstantiator.createFromInt(jp.getIntValue());
|
783
|
+
case LONG:
|
784
|
+
if (_delegateDeserializer != null) {
|
785
|
+
if (!_valueInstantiator.canCreateFromInt()) {
|
786
|
+
Object bean = _valueInstantiator.createUsingDelegate(_delegateDeserializer.deserialize(jp, ctxt));
|
787
|
+
if (_injectables != null) {
|
788
|
+
injectValues(ctxt, bean);
|
789
|
+
}
|
790
|
+
return bean;
|
791
|
+
}
|
792
|
+
}
|
793
|
+
return _valueInstantiator.createFromLong(jp.getLongValue());
|
794
|
+
}
|
795
|
+
// actually, could also be BigInteger, so:
|
796
|
+
if (_delegateDeserializer != null) {
|
797
|
+
Object bean = _valueInstantiator.createUsingDelegate(_delegateDeserializer.deserialize(jp, ctxt));
|
798
|
+
if (_injectables != null) {
|
799
|
+
injectValues(ctxt, bean);
|
800
|
+
}
|
801
|
+
return bean;
|
802
|
+
}
|
803
|
+
throw ctxt.instantiationException(getBeanClass(), "no suitable creator method found to deserialize from JSON integer number");
|
804
|
+
}
|
805
|
+
|
806
|
+
/**
|
807
|
+
* Method called to deserialize POJO value from a JSON floating-point
|
808
|
+
* number.
|
809
|
+
*
|
810
|
+
* @since 1.9
|
811
|
+
*/
|
812
|
+
public Object deserializeFromDouble(JsonParser jp, DeserializationContext ctxt)
|
813
|
+
throws IOException, JsonProcessingException
|
814
|
+
{
|
815
|
+
switch (jp.getNumberType()) {
|
816
|
+
case FLOAT: // no separate methods for taking float...
|
817
|
+
case DOUBLE:
|
818
|
+
if (_delegateDeserializer != null) {
|
819
|
+
if (!_valueInstantiator.canCreateFromDouble()) {
|
820
|
+
Object bean = _valueInstantiator.createUsingDelegate(_delegateDeserializer.deserialize(jp, ctxt));
|
821
|
+
if (_injectables != null) {
|
822
|
+
injectValues(ctxt, bean);
|
823
|
+
}
|
824
|
+
return bean;
|
825
|
+
}
|
826
|
+
}
|
827
|
+
return _valueInstantiator.createFromDouble(jp.getDoubleValue());
|
828
|
+
}
|
829
|
+
// actually, could also be BigDecimal, so:
|
830
|
+
if (_delegateDeserializer != null) {
|
831
|
+
return _valueInstantiator.createUsingDelegate(_delegateDeserializer.deserialize(jp, ctxt));
|
832
|
+
}
|
833
|
+
throw ctxt.instantiationException(getBeanClass(), "no suitable creator method found to deserialize from JSON floating-point number");
|
834
|
+
}
|
835
|
+
|
836
|
+
/**
|
837
|
+
* Method called to deserialize POJO value from a JSON boolean
|
838
|
+
* value (true, false)
|
839
|
+
*
|
840
|
+
* @since 1.9
|
841
|
+
*/
|
842
|
+
public Object deserializeFromBoolean(JsonParser jp, DeserializationContext ctxt)
|
843
|
+
throws IOException, JsonProcessingException
|
844
|
+
{
|
845
|
+
if (_delegateDeserializer != null) {
|
846
|
+
if (!_valueInstantiator.canCreateFromBoolean()) {
|
847
|
+
Object bean = _valueInstantiator.createUsingDelegate(_delegateDeserializer.deserialize(jp, ctxt));
|
848
|
+
if (_injectables != null) {
|
849
|
+
injectValues(ctxt, bean);
|
850
|
+
}
|
851
|
+
return bean;
|
852
|
+
}
|
853
|
+
}
|
854
|
+
boolean value = (jp.getCurrentToken() == JsonToken.VALUE_TRUE);
|
855
|
+
return _valueInstantiator.createFromBoolean(value);
|
856
|
+
}
|
857
|
+
|
858
|
+
/**
|
859
|
+
* @since 1.9
|
860
|
+
*/
|
861
|
+
public Object deserializeFromArray(JsonParser jp, DeserializationContext ctxt)
|
862
|
+
throws IOException, JsonProcessingException
|
863
|
+
{
|
864
|
+
if (_delegateDeserializer != null) {
|
865
|
+
try {
|
866
|
+
Object bean = _valueInstantiator.createUsingDelegate(_delegateDeserializer.deserialize(jp, ctxt));
|
867
|
+
if (_injectables != null) {
|
868
|
+
injectValues(ctxt, bean);
|
869
|
+
}
|
870
|
+
return bean;
|
871
|
+
} catch (Exception e) {
|
872
|
+
wrapInstantiationProblem(e, ctxt);
|
873
|
+
}
|
874
|
+
}
|
875
|
+
throw ctxt.mappingException(getBeanClass());
|
876
|
+
}
|
877
|
+
|
878
|
+
/**
|
879
|
+
* Method called to deserialize bean using "property-based creator":
|
880
|
+
* this means that a non-default constructor or factory method is
|
881
|
+
* called, and then possibly other setters. The trick is that
|
882
|
+
* values for creator method need to be buffered, first; and
|
883
|
+
* due to non-guaranteed ordering possibly some other properties
|
884
|
+
* as well.
|
885
|
+
*
|
886
|
+
* @since 1.2
|
887
|
+
*/
|
888
|
+
protected final Object _deserializeUsingPropertyBased(final JsonParser jp, final DeserializationContext ctxt)
|
889
|
+
throws IOException, JsonProcessingException
|
890
|
+
{
|
891
|
+
final PropertyBasedCreator creator = _propertyBasedCreator;
|
892
|
+
PropertyValueBuffer buffer = creator.startBuilding(jp, ctxt);
|
893
|
+
|
894
|
+
// 04-Jan-2010, tatu: May need to collect unknown properties for polymorphic cases
|
895
|
+
TokenBuffer unknown = null;
|
896
|
+
|
897
|
+
JsonToken t = jp.getCurrentToken();
|
898
|
+
for (; t == JsonToken.FIELD_NAME; t = jp.nextToken()) {
|
899
|
+
String propName = jp.getCurrentName();
|
900
|
+
jp.nextToken(); // to point to value
|
901
|
+
// creator property?
|
902
|
+
SettableBeanProperty creatorProp = creator.findCreatorProperty(propName);
|
903
|
+
if (creatorProp != null) {
|
904
|
+
// Last creator property to set?
|
905
|
+
Object value = creatorProp.deserialize(jp, ctxt);
|
906
|
+
if (buffer.assignParameter(creatorProp.getPropertyIndex(), value)) {
|
907
|
+
jp.nextToken(); // to move to following FIELD_NAME/END_OBJECT
|
908
|
+
Object bean;
|
909
|
+
try {
|
910
|
+
bean = creator.build(buffer);
|
911
|
+
} catch (Exception e) {
|
912
|
+
wrapAndThrow(e, _beanType.getRawClass(), propName, ctxt);
|
913
|
+
continue; // never gets here
|
914
|
+
}
|
915
|
+
// polymorphic?
|
916
|
+
if (bean.getClass() != _beanType.getRawClass()) {
|
917
|
+
return handlePolymorphic(jp, ctxt, bean, unknown);
|
918
|
+
}
|
919
|
+
if (unknown != null) { // nope, just extra unknown stuff...
|
920
|
+
bean = handleUnknownProperties(ctxt, bean, unknown);
|
921
|
+
}
|
922
|
+
// or just clean?
|
923
|
+
return deserialize(jp, ctxt, bean);
|
924
|
+
}
|
925
|
+
continue;
|
926
|
+
}
|
927
|
+
// regular property? needs buffering
|
928
|
+
SettableBeanProperty prop = _beanProperties.find(propName);
|
929
|
+
if (prop != null) {
|
930
|
+
buffer.bufferProperty(prop, prop.deserialize(jp, ctxt));
|
931
|
+
continue;
|
932
|
+
}
|
933
|
+
/* As per [JACKSON-313], things marked as ignorable should not be
|
934
|
+
* passed to any setter
|
935
|
+
*/
|
936
|
+
if (_ignorableProps != null && _ignorableProps.contains(propName)) {
|
937
|
+
jp.skipChildren();
|
938
|
+
continue;
|
939
|
+
}
|
940
|
+
// "any property"?
|
941
|
+
if (_anySetter != null) {
|
942
|
+
buffer.bufferAnyProperty(_anySetter, propName, _anySetter.deserialize(jp, ctxt));
|
943
|
+
continue;
|
944
|
+
}
|
945
|
+
// Ok then, let's collect the whole field; name and value
|
946
|
+
if (unknown == null) {
|
947
|
+
unknown = new TokenBuffer(jp.getCodec());
|
948
|
+
}
|
949
|
+
unknown.writeFieldName(propName);
|
950
|
+
unknown.copyCurrentStructure(jp);
|
951
|
+
}
|
952
|
+
|
953
|
+
// We hit END_OBJECT, so:
|
954
|
+
Object bean;
|
955
|
+
try {
|
956
|
+
bean = creator.build(buffer);
|
957
|
+
} catch (Exception e) {
|
958
|
+
wrapInstantiationProblem(e, ctxt);
|
959
|
+
return null; // never gets here
|
960
|
+
}
|
961
|
+
if (unknown != null) {
|
962
|
+
// polymorphic?
|
963
|
+
if (bean.getClass() != _beanType.getRawClass()) {
|
964
|
+
return handlePolymorphic(null, ctxt, bean, unknown);
|
965
|
+
}
|
966
|
+
// no, just some extra unknown properties
|
967
|
+
return handleUnknownProperties(ctxt, bean, unknown);
|
968
|
+
}
|
969
|
+
return bean;
|
970
|
+
}
|
971
|
+
|
972
|
+
/**
|
973
|
+
* Method called in cases where we may have polymorphic deserialization
|
974
|
+
* case: that is, type of Creator-constructed bean is not the type
|
975
|
+
* of deserializer itself. It should be a sub-class or implementation
|
976
|
+
* class; either way, we may have more specific deserializer to use
|
977
|
+
* for handling it.
|
978
|
+
*
|
979
|
+
* @param jp (optional) If not null, parser that has more properties to handle
|
980
|
+
* (in addition to buffered properties); if null, all properties are passed
|
981
|
+
* in buffer
|
982
|
+
*/
|
983
|
+
protected Object handlePolymorphic(JsonParser jp, DeserializationContext ctxt,
|
984
|
+
Object bean, TokenBuffer unknownTokens)
|
985
|
+
throws IOException, JsonProcessingException
|
986
|
+
{
|
987
|
+
// First things first: maybe there is a more specific deserializer available?
|
988
|
+
JsonDeserializer<Object> subDeser = _findSubclassDeserializer(ctxt, bean, unknownTokens);
|
989
|
+
if (subDeser != null) {
|
990
|
+
if (unknownTokens != null) {
|
991
|
+
// need to add END_OBJECT marker first
|
992
|
+
unknownTokens.writeEndObject();
|
993
|
+
JsonParser p2 = unknownTokens.asParser();
|
994
|
+
p2.nextToken(); // to get to first data field
|
995
|
+
bean = subDeser.deserialize(p2, ctxt, bean);
|
996
|
+
}
|
997
|
+
// Original parser may also have some leftovers
|
998
|
+
if (jp != null) {
|
999
|
+
bean = subDeser.deserialize(jp, ctxt, bean);
|
1000
|
+
}
|
1001
|
+
return bean;
|
1002
|
+
}
|
1003
|
+
// nope; need to use this deserializer. Unknowns we've seen so far?
|
1004
|
+
if (unknownTokens != null) {
|
1005
|
+
bean = handleUnknownProperties(ctxt, bean, unknownTokens);
|
1006
|
+
}
|
1007
|
+
// and/or things left to process via main parser?
|
1008
|
+
if (jp != null) {
|
1009
|
+
bean = deserialize(jp, ctxt, bean);
|
1010
|
+
}
|
1011
|
+
return bean;
|
1012
|
+
}
|
1013
|
+
|
1014
|
+
/*
|
1015
|
+
/**********************************************************
|
1016
|
+
/* Handling for cases where we have "unwrapped" values
|
1017
|
+
/**********************************************************
|
1018
|
+
*/
|
1019
|
+
|
1020
|
+
/**
|
1021
|
+
* Method called when there are declared "unwrapped" properties
|
1022
|
+
* which need special handling
|
1023
|
+
*/
|
1024
|
+
protected Object deserializeWithUnwrapped(JsonParser jp, DeserializationContext ctxt)
|
1025
|
+
throws IOException, JsonProcessingException
|
1026
|
+
{
|
1027
|
+
if (_delegateDeserializer != null) {
|
1028
|
+
return _valueInstantiator.createUsingDelegate(_delegateDeserializer.deserialize(jp, ctxt));
|
1029
|
+
}
|
1030
|
+
if (_propertyBasedCreator != null) {
|
1031
|
+
return deserializeUsingPropertyBasedWithUnwrapped(jp, ctxt);
|
1032
|
+
}
|
1033
|
+
|
1034
|
+
TokenBuffer tokens = new TokenBuffer(jp.getCodec());
|
1035
|
+
tokens.writeStartObject();
|
1036
|
+
final Object bean = _valueInstantiator.createUsingDefault();
|
1037
|
+
|
1038
|
+
if (_injectables != null) {
|
1039
|
+
injectValues(ctxt, bean);
|
1040
|
+
}
|
1041
|
+
|
1042
|
+
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
1043
|
+
String propName = jp.getCurrentName();
|
1044
|
+
jp.nextToken();
|
1045
|
+
SettableBeanProperty prop = _beanProperties.find(propName);
|
1046
|
+
if (prop != null) { // normal case
|
1047
|
+
try {
|
1048
|
+
prop.deserializeAndSet(jp, ctxt, bean);
|
1049
|
+
} catch (Exception e) {
|
1050
|
+
wrapAndThrow(e, bean, propName, ctxt);
|
1051
|
+
}
|
1052
|
+
continue;
|
1053
|
+
}
|
1054
|
+
// ignorable things should be ignored
|
1055
|
+
if (_ignorableProps != null && _ignorableProps.contains(propName)) {
|
1056
|
+
jp.skipChildren();
|
1057
|
+
continue;
|
1058
|
+
}
|
1059
|
+
// but... others should be passed to unwrapped property deserializers
|
1060
|
+
tokens.writeFieldName(propName);
|
1061
|
+
tokens.copyCurrentStructure(jp);
|
1062
|
+
// how about any setter? We'll get copies but...
|
1063
|
+
if (_anySetter != null) {
|
1064
|
+
try {
|
1065
|
+
_anySetter.deserializeAndSet(jp, ctxt, bean, propName);
|
1066
|
+
} catch (Exception e) {
|
1067
|
+
wrapAndThrow(e, bean, propName, ctxt);
|
1068
|
+
}
|
1069
|
+
continue;
|
1070
|
+
}
|
1071
|
+
}
|
1072
|
+
tokens.writeEndObject();
|
1073
|
+
_unwrappedPropertyHandler.processUnwrapped(jp, ctxt, bean, tokens);
|
1074
|
+
return bean;
|
1075
|
+
}
|
1076
|
+
|
1077
|
+
protected Object deserializeWithUnwrapped(JsonParser jp, DeserializationContext ctxt, Object bean)
|
1078
|
+
throws IOException, JsonProcessingException
|
1079
|
+
{
|
1080
|
+
JsonToken t = jp.getCurrentToken();
|
1081
|
+
if (t == JsonToken.START_OBJECT) {
|
1082
|
+
t = jp.nextToken();
|
1083
|
+
}
|
1084
|
+
TokenBuffer tokens = new TokenBuffer(jp.getCodec());
|
1085
|
+
tokens.writeStartObject();
|
1086
|
+
for (; t == JsonToken.FIELD_NAME; t = jp.nextToken()) {
|
1087
|
+
String propName = jp.getCurrentName();
|
1088
|
+
SettableBeanProperty prop = _beanProperties.find(propName);
|
1089
|
+
jp.nextToken();
|
1090
|
+
if (prop != null) { // normal case
|
1091
|
+
try {
|
1092
|
+
prop.deserializeAndSet(jp, ctxt, bean);
|
1093
|
+
} catch (Exception e) {
|
1094
|
+
wrapAndThrow(e, bean, propName, ctxt);
|
1095
|
+
}
|
1096
|
+
continue;
|
1097
|
+
}
|
1098
|
+
if (_ignorableProps != null && _ignorableProps.contains(propName)) {
|
1099
|
+
jp.skipChildren();
|
1100
|
+
continue;
|
1101
|
+
}
|
1102
|
+
// but... others should be passed to unwrapped property deserializers
|
1103
|
+
tokens.writeFieldName(propName);
|
1104
|
+
tokens.copyCurrentStructure(jp);
|
1105
|
+
// how about any setter? We'll get copies but...
|
1106
|
+
if (_anySetter != null) {
|
1107
|
+
_anySetter.deserializeAndSet(jp, ctxt, bean, propName);
|
1108
|
+
}
|
1109
|
+
}
|
1110
|
+
tokens.writeEndObject();
|
1111
|
+
_unwrappedPropertyHandler.processUnwrapped(jp, ctxt, bean, tokens);
|
1112
|
+
return bean;
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
protected Object deserializeUsingPropertyBasedWithUnwrapped(JsonParser jp, DeserializationContext ctxt)
|
1116
|
+
throws IOException, JsonProcessingException
|
1117
|
+
{
|
1118
|
+
final PropertyBasedCreator creator = _propertyBasedCreator;
|
1119
|
+
PropertyValueBuffer buffer = creator.startBuilding(jp, ctxt);
|
1120
|
+
|
1121
|
+
TokenBuffer tokens = new TokenBuffer(jp.getCodec());
|
1122
|
+
tokens.writeStartObject();
|
1123
|
+
|
1124
|
+
JsonToken t = jp.getCurrentToken();
|
1125
|
+
for (; t == JsonToken.FIELD_NAME; t = jp.nextToken()) {
|
1126
|
+
String propName = jp.getCurrentName();
|
1127
|
+
jp.nextToken(); // to point to value
|
1128
|
+
// creator property?
|
1129
|
+
SettableBeanProperty creatorProp = creator.findCreatorProperty(propName);
|
1130
|
+
if (creatorProp != null) {
|
1131
|
+
// Last creator property to set?
|
1132
|
+
Object value = creatorProp.deserialize(jp, ctxt);
|
1133
|
+
if (buffer.assignParameter(creatorProp.getPropertyIndex(), value)) {
|
1134
|
+
t = jp.nextToken(); // to move to following FIELD_NAME/END_OBJECT
|
1135
|
+
Object bean;
|
1136
|
+
try {
|
1137
|
+
bean = creator.build(buffer);
|
1138
|
+
} catch (Exception e) {
|
1139
|
+
wrapAndThrow(e, _beanType.getRawClass(), propName, ctxt);
|
1140
|
+
continue; // never gets here
|
1141
|
+
}
|
1142
|
+
// if so, need to copy all remaining tokens into buffer
|
1143
|
+
while (t == JsonToken.FIELD_NAME) {
|
1144
|
+
jp.nextToken(); // to skip name
|
1145
|
+
tokens.copyCurrentStructure(jp);
|
1146
|
+
t = jp.nextToken();
|
1147
|
+
}
|
1148
|
+
tokens.writeEndObject();
|
1149
|
+
if (bean.getClass() != _beanType.getRawClass()) {
|
1150
|
+
// !!! 08-Jul-2011, tatu: Could probably support; but for now
|
1151
|
+
// it's too complicated, so bail out
|
1152
|
+
throw ctxt.mappingException("Can not create polymorphic instances with unwrapped values");
|
1153
|
+
}
|
1154
|
+
return _unwrappedPropertyHandler.processUnwrapped(jp, ctxt, bean, tokens);
|
1155
|
+
}
|
1156
|
+
continue;
|
1157
|
+
}
|
1158
|
+
// regular property? needs buffering
|
1159
|
+
SettableBeanProperty prop = _beanProperties.find(propName);
|
1160
|
+
if (prop != null) {
|
1161
|
+
buffer.bufferProperty(prop, prop.deserialize(jp, ctxt));
|
1162
|
+
continue;
|
1163
|
+
}
|
1164
|
+
/* As per [JACKSON-313], things marked as ignorable should not be
|
1165
|
+
* passed to any setter
|
1166
|
+
*/
|
1167
|
+
if (_ignorableProps != null && _ignorableProps.contains(propName)) {
|
1168
|
+
jp.skipChildren();
|
1169
|
+
continue;
|
1170
|
+
}
|
1171
|
+
tokens.writeFieldName(propName);
|
1172
|
+
tokens.copyCurrentStructure(jp);
|
1173
|
+
// "any property"?
|
1174
|
+
if (_anySetter != null) {
|
1175
|
+
buffer.bufferAnyProperty(_anySetter, propName, _anySetter.deserialize(jp, ctxt));
|
1176
|
+
}
|
1177
|
+
}
|
1178
|
+
|
1179
|
+
// We hit END_OBJECT, so:
|
1180
|
+
Object bean;
|
1181
|
+
try {
|
1182
|
+
bean = creator.build(buffer);
|
1183
|
+
} catch (Exception e) {
|
1184
|
+
wrapInstantiationProblem(e, ctxt);
|
1185
|
+
return null; // never gets here
|
1186
|
+
}
|
1187
|
+
return _unwrappedPropertyHandler.processUnwrapped(jp, ctxt, bean, tokens);
|
1188
|
+
}
|
1189
|
+
|
1190
|
+
/*
|
1191
|
+
/**********************************************************
|
1192
|
+
/* Handling for cases where we have property/-ies wth
|
1193
|
+
/* external type id
|
1194
|
+
/**********************************************************
|
1195
|
+
*/
|
1196
|
+
|
1197
|
+
protected Object deserializeWithExternalTypeId(JsonParser jp, DeserializationContext ctxt)
|
1198
|
+
throws IOException, JsonProcessingException
|
1199
|
+
{
|
1200
|
+
if (_propertyBasedCreator != null) {
|
1201
|
+
return deserializeUsingPropertyBasedWithExternalTypeId(jp, ctxt);
|
1202
|
+
}
|
1203
|
+
return deserializeWithExternalTypeId(jp, ctxt, _valueInstantiator.createUsingDefault());
|
1204
|
+
}
|
1205
|
+
|
1206
|
+
protected Object deserializeWithExternalTypeId(JsonParser jp, DeserializationContext ctxt,
|
1207
|
+
Object bean)
|
1208
|
+
throws IOException, JsonProcessingException
|
1209
|
+
{
|
1210
|
+
final ExternalTypeHandler ext = _externalTypeIdHandler.start();
|
1211
|
+
for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
|
1212
|
+
String propName = jp.getCurrentName();
|
1213
|
+
jp.nextToken();
|
1214
|
+
SettableBeanProperty prop = _beanProperties.find(propName);
|
1215
|
+
if (prop != null) { // normal case
|
1216
|
+
try {
|
1217
|
+
prop.deserializeAndSet(jp, ctxt, bean);
|
1218
|
+
} catch (Exception e) {
|
1219
|
+
wrapAndThrow(e, bean, propName, ctxt);
|
1220
|
+
}
|
1221
|
+
continue;
|
1222
|
+
}
|
1223
|
+
// ignorable things should be ignored
|
1224
|
+
if (_ignorableProps != null && _ignorableProps.contains(propName)) {
|
1225
|
+
jp.skipChildren();
|
1226
|
+
continue;
|
1227
|
+
}
|
1228
|
+
// but others are likely to be part of external type id thingy...
|
1229
|
+
if (ext.handleToken(jp, ctxt, propName, bean)) {
|
1230
|
+
continue;
|
1231
|
+
}
|
1232
|
+
// if not, the usual fallback handling:
|
1233
|
+
if (_anySetter != null) {
|
1234
|
+
try {
|
1235
|
+
_anySetter.deserializeAndSet(jp, ctxt, bean, propName);
|
1236
|
+
} catch (Exception e) {
|
1237
|
+
wrapAndThrow(e, bean, propName, ctxt);
|
1238
|
+
}
|
1239
|
+
continue;
|
1240
|
+
} else {
|
1241
|
+
// Unknown: let's call handler method
|
1242
|
+
handleUnknownProperty(jp, ctxt, bean, propName);
|
1243
|
+
}
|
1244
|
+
}
|
1245
|
+
// and when we get this far, let's try finalizing the deal:
|
1246
|
+
return ext.complete(jp, ctxt, bean);
|
1247
|
+
}
|
1248
|
+
|
1249
|
+
protected Object deserializeUsingPropertyBasedWithExternalTypeId(JsonParser jp, DeserializationContext ctxt)
|
1250
|
+
throws IOException, JsonProcessingException
|
1251
|
+
{
|
1252
|
+
final ExternalTypeHandler ext = _externalTypeIdHandler.start();
|
1253
|
+
final PropertyBasedCreator creator = _propertyBasedCreator;
|
1254
|
+
PropertyValueBuffer buffer = creator.startBuilding(jp, ctxt);
|
1255
|
+
|
1256
|
+
TokenBuffer tokens = new TokenBuffer(jp.getCodec());
|
1257
|
+
tokens.writeStartObject();
|
1258
|
+
|
1259
|
+
JsonToken t = jp.getCurrentToken();
|
1260
|
+
for (; t == JsonToken.FIELD_NAME; t = jp.nextToken()) {
|
1261
|
+
String propName = jp.getCurrentName();
|
1262
|
+
jp.nextToken(); // to point to value
|
1263
|
+
// creator property?
|
1264
|
+
SettableBeanProperty creatorProp = creator.findCreatorProperty(propName);
|
1265
|
+
if (creatorProp != null) {
|
1266
|
+
// Last creator property to set?
|
1267
|
+
Object value = creatorProp.deserialize(jp, ctxt);
|
1268
|
+
if (buffer.assignParameter(creatorProp.getPropertyIndex(), value)) {
|
1269
|
+
t = jp.nextToken(); // to move to following FIELD_NAME/END_OBJECT
|
1270
|
+
Object bean;
|
1271
|
+
try {
|
1272
|
+
bean = creator.build(buffer);
|
1273
|
+
} catch (Exception e) {
|
1274
|
+
wrapAndThrow(e, _beanType.getRawClass(), propName, ctxt);
|
1275
|
+
continue; // never gets here
|
1276
|
+
}
|
1277
|
+
// if so, need to copy all remaining tokens into buffer
|
1278
|
+
while (t == JsonToken.FIELD_NAME) {
|
1279
|
+
jp.nextToken(); // to skip name
|
1280
|
+
tokens.copyCurrentStructure(jp);
|
1281
|
+
t = jp.nextToken();
|
1282
|
+
}
|
1283
|
+
if (bean.getClass() != _beanType.getRawClass()) {
|
1284
|
+
// !!! 08-Jul-2011, tatu: Could probably support; but for now
|
1285
|
+
// it's too complicated, so bail out
|
1286
|
+
throw ctxt.mappingException("Can not create polymorphic instances with unwrapped values");
|
1287
|
+
}
|
1288
|
+
return ext.complete(jp, ctxt, bean);
|
1289
|
+
}
|
1290
|
+
continue;
|
1291
|
+
}
|
1292
|
+
// regular property? needs buffering
|
1293
|
+
SettableBeanProperty prop = _beanProperties.find(propName);
|
1294
|
+
if (prop != null) {
|
1295
|
+
buffer.bufferProperty(prop, prop.deserialize(jp, ctxt));
|
1296
|
+
continue;
|
1297
|
+
}
|
1298
|
+
// external type id (or property that depends on it)?
|
1299
|
+
if (ext.handleToken(jp, ctxt, propName, null)) {
|
1300
|
+
continue;
|
1301
|
+
}
|
1302
|
+
/* As per [JACKSON-313], things marked as ignorable should not be
|
1303
|
+
* passed to any setter
|
1304
|
+
*/
|
1305
|
+
if (_ignorableProps != null && _ignorableProps.contains(propName)) {
|
1306
|
+
jp.skipChildren();
|
1307
|
+
continue;
|
1308
|
+
}
|
1309
|
+
// "any property"?
|
1310
|
+
if (_anySetter != null) {
|
1311
|
+
buffer.bufferAnyProperty(_anySetter, propName, _anySetter.deserialize(jp, ctxt));
|
1312
|
+
}
|
1313
|
+
}
|
1314
|
+
|
1315
|
+
// We hit END_OBJECT, so:
|
1316
|
+
Object bean;
|
1317
|
+
try {
|
1318
|
+
bean = creator.build(buffer);
|
1319
|
+
} catch (Exception e) {
|
1320
|
+
wrapInstantiationProblem(e, ctxt);
|
1321
|
+
return null; // never gets here
|
1322
|
+
}
|
1323
|
+
return ext.complete(jp, ctxt, bean);
|
1324
|
+
}
|
1325
|
+
|
1326
|
+
/*
|
1327
|
+
/**********************************************************
|
1328
|
+
/* Overridable helper methods
|
1329
|
+
/**********************************************************
|
1330
|
+
*/
|
1331
|
+
|
1332
|
+
protected void injectValues(DeserializationContext ctxt, Object bean)
|
1333
|
+
throws IOException, JsonProcessingException
|
1334
|
+
{
|
1335
|
+
for (ValueInjector injector : _injectables) {
|
1336
|
+
injector.inject(ctxt, bean);
|
1337
|
+
}
|
1338
|
+
}
|
1339
|
+
|
1340
|
+
/**
|
1341
|
+
* Method called when a JSON property is encountered that has not matching
|
1342
|
+
* setter, any-setter or field, and thus can not be assigned.
|
1343
|
+
*/
|
1344
|
+
@Override
|
1345
|
+
protected void handleUnknownProperty(JsonParser jp, DeserializationContext ctxt, Object beanOrClass, String propName)
|
1346
|
+
throws IOException, JsonProcessingException
|
1347
|
+
{
|
1348
|
+
/* 22-Aug-2010, tatu: Caller now mostly checks for ignorable properties, so
|
1349
|
+
* following should not be necessary. However, "handleUnknownProperties()" seems
|
1350
|
+
* to still possibly need it so it is left for now.
|
1351
|
+
*/
|
1352
|
+
// If registered as ignorable, skip
|
1353
|
+
if (_ignoreAllUnknown ||
|
1354
|
+
(_ignorableProps != null && _ignorableProps.contains(propName))) {
|
1355
|
+
jp.skipChildren();
|
1356
|
+
return;
|
1357
|
+
}
|
1358
|
+
/* Otherwise use default handling (call handler(s); if not
|
1359
|
+
* handled, throw exception or skip depending on settings)
|
1360
|
+
*/
|
1361
|
+
super.handleUnknownProperty(jp, ctxt, beanOrClass, propName);
|
1362
|
+
}
|
1363
|
+
|
1364
|
+
/**
|
1365
|
+
* Method called to handle set of one or more unknown properties,
|
1366
|
+
* stored in their entirety in given {@link TokenBuffer}
|
1367
|
+
* (as field entries, name and value).
|
1368
|
+
*/
|
1369
|
+
protected Object handleUnknownProperties(DeserializationContext ctxt, Object bean, TokenBuffer unknownTokens)
|
1370
|
+
throws IOException, JsonProcessingException
|
1371
|
+
{
|
1372
|
+
// First: add closing END_OBJECT as marker
|
1373
|
+
unknownTokens.writeEndObject();
|
1374
|
+
|
1375
|
+
// note: buffer does NOT have starting START_OBJECT
|
1376
|
+
JsonParser bufferParser = unknownTokens.asParser();
|
1377
|
+
while (bufferParser.nextToken() != JsonToken.END_OBJECT) {
|
1378
|
+
String propName = bufferParser.getCurrentName();
|
1379
|
+
// Unknown: let's call handler method
|
1380
|
+
bufferParser.nextToken();
|
1381
|
+
handleUnknownProperty(bufferParser, ctxt, bean, propName);
|
1382
|
+
}
|
1383
|
+
return bean;
|
1384
|
+
}
|
1385
|
+
|
1386
|
+
/**
|
1387
|
+
* Helper method called to (try to) locate deserializer for given sub-type of
|
1388
|
+
* type that this deserializer handles.
|
1389
|
+
*/
|
1390
|
+
protected JsonDeserializer<Object> _findSubclassDeserializer(DeserializationContext ctxt, Object bean, TokenBuffer unknownTokens)
|
1391
|
+
throws IOException, JsonProcessingException
|
1392
|
+
{
|
1393
|
+
JsonDeserializer<Object> subDeser;
|
1394
|
+
|
1395
|
+
// First: maybe we have already created sub-type deserializer?
|
1396
|
+
synchronized (this) {
|
1397
|
+
subDeser = (_subDeserializers == null) ? null : _subDeserializers.get(new ClassKey(bean.getClass()));
|
1398
|
+
}
|
1399
|
+
if (subDeser != null) {
|
1400
|
+
return subDeser;
|
1401
|
+
}
|
1402
|
+
// If not, maybe we can locate one. First, need provider
|
1403
|
+
DeserializerProvider deserProv = ctxt.getDeserializerProvider();
|
1404
|
+
if (deserProv != null) {
|
1405
|
+
JavaType type = ctxt.constructType(bean.getClass());
|
1406
|
+
/* 09-Dec-2010, tatu: Would be nice to know which property pointed to this
|
1407
|
+
* bean... but, alas, no such information is retained, so:
|
1408
|
+
*/
|
1409
|
+
subDeser = deserProv.findValueDeserializer(ctxt.getConfig(), type, _property);
|
1410
|
+
// Also, need to cache it
|
1411
|
+
if (subDeser != null) {
|
1412
|
+
synchronized (this) {
|
1413
|
+
if (_subDeserializers == null) {
|
1414
|
+
_subDeserializers = new HashMap<ClassKey,JsonDeserializer<Object>>();;
|
1415
|
+
}
|
1416
|
+
_subDeserializers.put(new ClassKey(bean.getClass()), subDeser);
|
1417
|
+
}
|
1418
|
+
}
|
1419
|
+
}
|
1420
|
+
return subDeser;
|
1421
|
+
}
|
1422
|
+
|
1423
|
+
/*
|
1424
|
+
/**********************************************************
|
1425
|
+
/* Helper methods for error reporting
|
1426
|
+
/**********************************************************
|
1427
|
+
*/
|
1428
|
+
|
1429
|
+
/**
|
1430
|
+
* Method that will modify caught exception (passed in as argument)
|
1431
|
+
* as necessary to include reference information, and to ensure it
|
1432
|
+
* is a subtype of {@link IOException}, or an unchecked exception.
|
1433
|
+
*<p>
|
1434
|
+
* Rules for wrapping and unwrapping are bit complicated; essentially:
|
1435
|
+
*<ul>
|
1436
|
+
* <li>Errors are to be passed as is (if uncovered via unwrapping)
|
1437
|
+
* <li>"Plain" IOExceptions (ones that are not of type
|
1438
|
+
* {@link JsonMappingException} are to be passed as is
|
1439
|
+
*</ul>
|
1440
|
+
*/
|
1441
|
+
public void wrapAndThrow(Throwable t, Object bean, String fieldName,
|
1442
|
+
DeserializationContext ctxt)
|
1443
|
+
throws IOException
|
1444
|
+
{
|
1445
|
+
/* 05-Mar-2009, tatu: But one nasty edge is when we get
|
1446
|
+
* StackOverflow: usually due to infinite loop. But that
|
1447
|
+
* usually gets hidden within an InvocationTargetException...
|
1448
|
+
*/
|
1449
|
+
while (t instanceof InvocationTargetException && t.getCause() != null) {
|
1450
|
+
t = t.getCause();
|
1451
|
+
}
|
1452
|
+
// Errors and "plain" IOExceptions to be passed as is
|
1453
|
+
if (t instanceof Error) {
|
1454
|
+
throw (Error) t;
|
1455
|
+
}
|
1456
|
+
boolean wrap = (ctxt == null) || ctxt.isEnabled(DeserializationConfig.Feature.WRAP_EXCEPTIONS);
|
1457
|
+
// Ditto for IOExceptions; except we may want to wrap mapping exceptions
|
1458
|
+
if (t instanceof IOException) {
|
1459
|
+
if (!wrap || !(t instanceof JsonMappingException)) {
|
1460
|
+
throw (IOException) t;
|
1461
|
+
}
|
1462
|
+
} else if (!wrap) { // [JACKSON-407] -- allow disabling wrapping for unchecked exceptions
|
1463
|
+
if (t instanceof RuntimeException) {
|
1464
|
+
throw (RuntimeException) t;
|
1465
|
+
}
|
1466
|
+
}
|
1467
|
+
// [JACKSON-55] Need to add reference information
|
1468
|
+
throw JsonMappingException.wrapWithPath(t, bean, fieldName);
|
1469
|
+
}
|
1470
|
+
|
1471
|
+
public void wrapAndThrow(Throwable t, Object bean, int index, DeserializationContext ctxt)
|
1472
|
+
throws IOException
|
1473
|
+
{
|
1474
|
+
while (t instanceof InvocationTargetException && t.getCause() != null) {
|
1475
|
+
t = t.getCause();
|
1476
|
+
}
|
1477
|
+
// Errors and "plain" IOExceptions to be passed as is
|
1478
|
+
if (t instanceof Error) {
|
1479
|
+
throw (Error) t;
|
1480
|
+
}
|
1481
|
+
boolean wrap = (ctxt == null) || ctxt.isEnabled(DeserializationConfig.Feature.WRAP_EXCEPTIONS);
|
1482
|
+
// Ditto for IOExceptions; except we may want to wrap mapping exceptions
|
1483
|
+
if (t instanceof IOException) {
|
1484
|
+
if (!wrap || !(t instanceof JsonMappingException)) {
|
1485
|
+
throw (IOException) t;
|
1486
|
+
}
|
1487
|
+
} else if (!wrap) { // [JACKSON-407] -- allow disabling wrapping for unchecked exceptions
|
1488
|
+
if (t instanceof RuntimeException) {
|
1489
|
+
throw (RuntimeException) t;
|
1490
|
+
}
|
1491
|
+
}
|
1492
|
+
// [JACKSON-55] Need to add reference information
|
1493
|
+
throw JsonMappingException.wrapWithPath(t, bean, index);
|
1494
|
+
}
|
1495
|
+
|
1496
|
+
protected void wrapInstantiationProblem(Throwable t, DeserializationContext ctxt)
|
1497
|
+
throws IOException
|
1498
|
+
{
|
1499
|
+
while (t instanceof InvocationTargetException && t.getCause() != null) {
|
1500
|
+
t = t.getCause();
|
1501
|
+
}
|
1502
|
+
// Errors and "plain" IOExceptions to be passed as is
|
1503
|
+
if (t instanceof Error) {
|
1504
|
+
throw (Error) t;
|
1505
|
+
}
|
1506
|
+
boolean wrap = (ctxt == null) || ctxt.isEnabled(DeserializationConfig.Feature.WRAP_EXCEPTIONS);
|
1507
|
+
if (t instanceof IOException) {
|
1508
|
+
// Since we have no more information to add, let's not actually wrap..
|
1509
|
+
throw (IOException) t;
|
1510
|
+
} else if (!wrap) { // [JACKSON-407] -- allow disabling wrapping for unchecked exceptions
|
1511
|
+
if (t instanceof RuntimeException) {
|
1512
|
+
throw (RuntimeException) t;
|
1513
|
+
}
|
1514
|
+
}
|
1515
|
+
throw ctxt.instantiationException(_beanType.getRawClass(), t);
|
1516
|
+
}
|
1517
|
+
|
1518
|
+
/**
|
1519
|
+
* @deprecated Since 1.7 use variant that takes {@link DeserializationContext}
|
1520
|
+
*/
|
1521
|
+
@Deprecated
|
1522
|
+
public void wrapAndThrow(Throwable t, Object bean, String fieldName)
|
1523
|
+
throws IOException
|
1524
|
+
{
|
1525
|
+
wrapAndThrow(t, bean, fieldName, null);
|
1526
|
+
}
|
1527
|
+
|
1528
|
+
/**
|
1529
|
+
* @deprecated Since 1.7 use variant that takes {@link DeserializationContext}
|
1530
|
+
*/
|
1531
|
+
@Deprecated
|
1532
|
+
public void wrapAndThrow(Throwable t, Object bean, int index)
|
1533
|
+
throws IOException
|
1534
|
+
{
|
1535
|
+
wrapAndThrow(t, bean, index, null);
|
1536
|
+
}
|
1537
|
+
}
|