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);
   }
 }
 @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 {
   JsonStringFormatVisitor v2 = (visitor == null) ? null : visitor.expectStringFormat(typeHint);
   if (v2 != null) {
     v2.format(JsonValueFormat.DATE_TIME);
   }
 }
 public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
     throws JsonMappingException {
   if (visitor != null) {
     JsonArrayFormatVisitor v2 = visitor.expectArrayFormat(typeHint);
     if (v2 != null) {
       v2.itemsFormat(JsonFormatTypes.STRING);
     }
   }
 }
 @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);
 }
 protected void _acceptJsonFormatVisitor(
     JsonFormatVisitorWrapper visitor, JavaType typeHint, boolean asNumber)
     throws JsonMappingException {
   if (asNumber) {
     if (_usesArrays) {
       JsonArrayFormatVisitor v2 = visitor.expectArrayFormat(typeHint);
       if (v2 != null) {
         v2.itemsFormat(JsonFormatTypes.INTEGER);
       }
     } else {
       JsonIntegerFormatVisitor v2 = visitor.expectIntegerFormat(typeHint);
       if (v2 != null) {
         v2.numberType(JsonParser.NumberType.LONG);
         v2.format(JsonValueFormat.UTC_MILLISEC);
       }
     }
   } else {
     JsonStringFormatVisitor v2 = visitor.expectStringFormat(typeHint);
     if (v2 != null) {
       v2.format(JsonValueFormat.DATE_TIME);
     }
   }
 }
Esempio n. 7
0
 @Override
 public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) {
   // jackphel Aug 17 2012 : this can definitely more more exact.
   visitor.expectObjectFormat(typeHint);
 }
Esempio n. 8
0
 @Override
 public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
     throws JsonMappingException {
   visitor.expectNullFormat(typeHint);
 }
 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;
       }
     }
   }
 }
 public void acceptJsonFormatVisitor(
     JsonFormatVisitorWrapper jsonformatvisitorwrapper, JavaType javatype) {
   jsonformatvisitorwrapper.expectIntegerFormat(javatype);
 }
 @Override
 public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
     throws JsonMappingException {
   _acceptJsonFormatVisitor(visitor, typeHint, _useTimestamp(visitor.getProvider()));
 }