コード例 #1
0
 @Override
 public TypeResolverBuilder<?> findPropertyTypeResolver(
     MapperConfig<?> config, AnnotatedMember am, JavaType baseType) {
   /* As per definition of @JsonTypeInfo, should only apply to contents of container
    * (collection, map) types, not container types themselves:
    */
   if (baseType.isContainerType()) return null;
   // No per-member type overrides (yet)
   return _findTypeResolver(config, am, baseType);
 }
コード例 #2
0
 @Override
 public TypeResolverBuilder<?> findPropertyContentTypeResolver(
     MapperConfig<?> config, AnnotatedMember am, JavaType containerType) {
   /* First: let's ensure property is a container type: caller should have
    * verified but just to be sure
    */
   if (!containerType.isContainerType()) {
     throw new IllegalArgumentException(
         "Must call method with a container type (got " + containerType + ")");
   }
   return _findTypeResolver(config, am, containerType);
 }