public void acceptJsonFormatVisitor(
     JsonFormatVisitorWrapper paramJsonFormatVisitorWrapper, JavaType paramJavaType)
     throws JsonMappingException {
   JsonArrayFormatVisitor localJsonArrayFormatVisitor =
       paramJsonFormatVisitorWrapper.expectArrayFormat(paramJavaType);
   if (localJsonArrayFormatVisitor != null) {
     JavaType localJavaType =
         paramJsonFormatVisitorWrapper
             .getProvider()
             .getTypeFactory()
             .moreSpecificType(this._elementType, paramJavaType.getContentType());
     if (localJavaType == null) {
       throw new JsonMappingException("Could not resolve type");
     }
     JsonSerializer localJsonSerializer = this._elementSerializer;
     paramJavaType = localJsonSerializer;
     if (localJsonSerializer == null) {
       paramJavaType =
           paramJsonFormatVisitorWrapper
               .getProvider()
               .findValueSerializer(localJavaType, this._property);
     }
     localJsonArrayFormatVisitor.itemsFormat(paramJavaType, localJavaType);
   }
 }
Ejemplo n.º 2
0
 @Override
 public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
     throws JsonMappingException {
   JsonMapFormatVisitor v2 = visitor.expectMapFormat(typeHint);
   if (v2 != null) {
     v2.keyFormat(_keySerializer, _keyType);
     JsonSerializer<?> valueSer = _valueSerializer;
     if (valueSer == null) {
       valueSer = _findAndAddDynamic(_dynamicValueSerializers, _valueType, visitor.getProvider());
     }
     v2.valueFormat(valueSer, _valueType);
   }
 }
 @Override
 public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
     throws JsonMappingException {
   JsonSerializer<?> ser = _valueSerializer;
   if (ser == null) {
     // 28-Sep-2015, tatu: as per [datatype-guava#83] need to ensure we don't
     //    accidentally drop parameterization
     ser = _findSerializer(visitor.getProvider(), _referredType, _property);
     if (_unwrapper != null) {
       ser = ser.unwrappingSerializer(_unwrapper);
     }
   }
   ser.acceptJsonFormatVisitor(visitor, _referredType);
 }
 public void acceptJsonFormatVisitor(
     JsonFormatVisitorWrapper paramJsonFormatVisitorWrapper, JavaType paramJavaType)
     throws JsonMappingException {
   if (paramJsonFormatVisitorWrapper == null) {}
   for (; ; ) {
     return;
     JsonObjectFormatVisitor localJsonObjectFormatVisitor =
         paramJsonFormatVisitorWrapper.expectObjectFormat(paramJavaType);
     if (localJsonObjectFormatVisitor != null) {
       Object localObject3 = paramJavaType.containedType(1);
       Object localObject2 = this._valueSerializer;
       Object localObject1 = localObject2;
       if (localObject2 == null) {
         localObject1 = localObject2;
         if (localObject3 != null) {
           localObject1 =
               paramJsonFormatVisitorWrapper
                   .getProvider()
                   .findValueSerializer((JavaType) localObject3, this._property);
         }
       }
       localObject2 = localObject3;
       if (localObject3 == null) {
         localObject2 = paramJsonFormatVisitorWrapper.getProvider().constructType(Object.class);
       }
       Object localObject4 = this._keyEnums;
       localObject3 = localObject4;
       if (localObject4 == null) {
         localObject3 = paramJavaType.containedType(0);
         if (localObject3 == null) {
           throw new IllegalStateException(
               "Can not resolve Enum type of EnumMap: " + paramJavaType);
         }
         localObject3 =
             paramJsonFormatVisitorWrapper
                 .getProvider()
                 .findValueSerializer((JavaType) localObject3, this._property);
         if (!(localObject3 instanceof EnumSerializer)) {
           throw new IllegalStateException(
               "Can not resolve Enum type of EnumMap: " + paramJavaType);
         }
         localObject3 = ((EnumSerializer) localObject3).getEnumValues();
       }
       localObject3 = ((EnumValues) localObject3).internalMap().entrySet().iterator();
       while (((Iterator) localObject3).hasNext()) {
         Map.Entry localEntry = (Map.Entry) ((Iterator) localObject3).next();
         localObject4 = ((SerializableString) localEntry.getValue()).getValue();
         paramJavaType = (JavaType) localObject1;
         if (localObject1 == null) {
           paramJavaType =
               paramJsonFormatVisitorWrapper
                   .getProvider()
                   .findValueSerializer(localEntry.getKey().getClass(), this._property);
         }
         localJsonObjectFormatVisitor.property(
             (String) localObject4, paramJavaType, (JavaType) localObject2);
         localObject1 = paramJavaType;
       }
     }
   }
 }
 @Override
 public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
     throws JsonMappingException {
   _acceptJsonFormatVisitor(visitor, typeHint, _useTimestamp(visitor.getProvider()));
 }