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