Java 类org.codehaus.jackson.map.JsonSerializableWithType 实例源码

项目:12306-android-Decompile    文件:StdSerializers.java   
public final void serializeWithType(JsonSerializable paramJsonSerializable, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider, TypeSerializer paramTypeSerializer)
  throws IOException, JsonGenerationException
{
  if ((paramJsonSerializable instanceof JsonSerializableWithType))
  {
    ((JsonSerializableWithType)paramJsonSerializable).serializeWithType(paramJsonGenerator, paramSerializerProvider, paramTypeSerializer);
    return;
  }
  serialize(paramJsonSerializable, paramJsonGenerator, paramSerializerProvider);
}
项目:12306-android-Decompile    文件:BasicSerializerFactory.java   
public final JsonSerializer<?> findSerializerByPrimaryType(JavaType paramJavaType, SerializationConfig paramSerializationConfig, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, boolean paramBoolean)
  throws JsonMappingException
{
  Class localClass = paramJavaType.getRawClass();
  Object localObject;
  if (JsonSerializable.class.isAssignableFrom(localClass))
    if (JsonSerializableWithType.class.isAssignableFrom(localClass))
      localObject = StdSerializers.SerializableWithTypeSerializer.instance;
  do
  {
    return localObject;
    return StdSerializers.SerializableSerializer.instance;
    AnnotatedMethod localAnnotatedMethod = paramBasicBeanDescription.findJsonValueMethod();
    if (localAnnotatedMethod != null)
    {
      JsonSerializer localJsonSerializer = findSerializerFromAnnotation(paramSerializationConfig, localAnnotatedMethod, paramBeanProperty);
      return new JsonValueSerializer(localAnnotatedMethod.getAnnotated(), localJsonSerializer, paramBeanProperty);
    }
    if (InetAddress.class.isAssignableFrom(localClass))
      return InetAddressSerializer.instance;
    if (TimeZone.class.isAssignableFrom(localClass))
      return TimeZoneSerializer.instance;
    localObject = this.optionalHandlers.findSerializer(paramSerializationConfig, paramJavaType);
  }
  while (localObject != null);
  if (Number.class.isAssignableFrom(localClass))
    return StdSerializers.NumberSerializer.instance;
  if (Enum.class.isAssignableFrom(localClass))
    return EnumSerializer.construct(localClass, paramSerializationConfig, paramBasicBeanDescription);
  if (Calendar.class.isAssignableFrom(localClass))
    return StdSerializers.CalendarSerializer.instance;
  if (java.util.Date.class.isAssignableFrom(localClass))
    return StdSerializers.UtilDateSerializer.instance;
  return (JsonSerializer<?>)null;
}
项目:12306-android-Decompile    文件:StdSerializers.java   
public final void serializeWithType(JsonSerializable paramJsonSerializable, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider, TypeSerializer paramTypeSerializer)
  throws IOException, JsonGenerationException
{
  if ((paramJsonSerializable instanceof JsonSerializableWithType))
  {
    ((JsonSerializableWithType)paramJsonSerializable).serializeWithType(paramJsonGenerator, paramSerializerProvider, paramTypeSerializer);
    return;
  }
  serialize(paramJsonSerializable, paramJsonGenerator, paramSerializerProvider);
}
项目:12306-android-Decompile    文件:BasicSerializerFactory.java   
public final JsonSerializer<?> findSerializerByPrimaryType(JavaType paramJavaType, SerializationConfig paramSerializationConfig, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, boolean paramBoolean)
  throws JsonMappingException
{
  Class localClass = paramJavaType.getRawClass();
  Object localObject;
  if (JsonSerializable.class.isAssignableFrom(localClass))
    if (JsonSerializableWithType.class.isAssignableFrom(localClass))
      localObject = StdSerializers.SerializableWithTypeSerializer.instance;
  do
  {
    return localObject;
    return StdSerializers.SerializableSerializer.instance;
    AnnotatedMethod localAnnotatedMethod = paramBasicBeanDescription.findJsonValueMethod();
    if (localAnnotatedMethod != null)
    {
      JsonSerializer localJsonSerializer = findSerializerFromAnnotation(paramSerializationConfig, localAnnotatedMethod, paramBeanProperty);
      return new JsonValueSerializer(localAnnotatedMethod.getAnnotated(), localJsonSerializer, paramBeanProperty);
    }
    if (InetAddress.class.isAssignableFrom(localClass))
      return InetAddressSerializer.instance;
    if (TimeZone.class.isAssignableFrom(localClass))
      return TimeZoneSerializer.instance;
    localObject = this.optionalHandlers.findSerializer(paramSerializationConfig, paramJavaType);
  }
  while (localObject != null);
  if (Number.class.isAssignableFrom(localClass))
    return StdSerializers.NumberSerializer.instance;
  if (Enum.class.isAssignableFrom(localClass))
    return EnumSerializer.construct(localClass, paramSerializationConfig, paramBasicBeanDescription);
  if (Calendar.class.isAssignableFrom(localClass))
    return StdSerializers.CalendarSerializer.instance;
  if (java.util.Date.class.isAssignableFrom(localClass))
    return StdSerializers.UtilDateSerializer.instance;
  return (JsonSerializer<?>)null;
}
项目:ingress-indonesia-dev    文件:SerializableSerializer.java   
public final void serializeWithType(JsonSerializable paramJsonSerializable, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider, TypeSerializer paramTypeSerializer)
{
  if ((paramJsonSerializable instanceof JsonSerializableWithType))
  {
    ((JsonSerializableWithType)paramJsonSerializable).serializeWithType(paramJsonGenerator, paramSerializerProvider, paramTypeSerializer);
    return;
  }
  serialize(paramJsonSerializable, paramJsonGenerator, paramSerializerProvider);
}
项目:ingress-indonesia-dev    文件:BasicSerializerFactory.java   
public final JsonSerializer<?> findSerializerByPrimaryType(JavaType paramJavaType, SerializationConfig paramSerializationConfig, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, boolean paramBoolean)
{
  Class localClass = paramJavaType.getRawClass();
  Object localObject;
  if (JsonSerializable.class.isAssignableFrom(localClass))
    if (JsonSerializableWithType.class.isAssignableFrom(localClass))
      localObject = SerializableWithTypeSerializer.instance;
  do
  {
    return localObject;
    return SerializableSerializer.instance;
    AnnotatedMethod localAnnotatedMethod = paramBasicBeanDescription.findJsonValueMethod();
    if (localAnnotatedMethod != null)
    {
      Method localMethod = localAnnotatedMethod.getAnnotated();
      if (paramSerializationConfig.isEnabled(SerializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS))
        ClassUtil.checkAndFixAccess(localMethod);
      return new JsonValueSerializer(localMethod, findSerializerFromAnnotation(paramSerializationConfig, localAnnotatedMethod, paramBeanProperty), paramBeanProperty);
    }
    if (InetAddress.class.isAssignableFrom(localClass))
      return InetAddressSerializer.instance;
    if (TimeZone.class.isAssignableFrom(localClass))
      return TimeZoneSerializer.instance;
    localObject = this.optionalHandlers.findSerializer(paramSerializationConfig, paramJavaType);
  }
  while (localObject != null);
  if (Number.class.isAssignableFrom(localClass))
    return StdSerializers.NumberSerializer.instance;
  if (Enum.class.isAssignableFrom(localClass))
    return EnumSerializer.construct(localClass, paramSerializationConfig, paramBasicBeanDescription);
  if (Calendar.class.isAssignableFrom(localClass))
    return CalendarSerializer.instance;
  if (java.util.Date.class.isAssignableFrom(localClass))
    return DateSerializer.instance;
  return null;
}
项目:12306-android-Decompile    文件:StdSerializers.java   
public void serialize(JsonSerializableWithType paramJsonSerializableWithType, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider)
  throws IOException, JsonGenerationException
{
  paramJsonSerializableWithType.serialize(paramJsonGenerator, paramSerializerProvider);
}
项目:12306-android-Decompile    文件:StdSerializers.java   
public final void serializeWithType(JsonSerializableWithType paramJsonSerializableWithType, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider, TypeSerializer paramTypeSerializer)
  throws IOException, JsonGenerationException
{
  paramJsonSerializableWithType.serializeWithType(paramJsonGenerator, paramSerializerProvider, paramTypeSerializer);
}
项目:12306-android-Decompile    文件:StdSerializers.java   
public void serialize(JsonSerializableWithType paramJsonSerializableWithType, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider)
  throws IOException, JsonGenerationException
{
  paramJsonSerializableWithType.serialize(paramJsonGenerator, paramSerializerProvider);
}
项目:12306-android-Decompile    文件:StdSerializers.java   
public final void serializeWithType(JsonSerializableWithType paramJsonSerializableWithType, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider, TypeSerializer paramTypeSerializer)
  throws IOException, JsonGenerationException
{
  paramJsonSerializableWithType.serializeWithType(paramJsonGenerator, paramSerializerProvider, paramTypeSerializer);
}
项目:ingress-indonesia-dev    文件:SerializableWithTypeSerializer.java   
protected SerializableWithTypeSerializer()
{
  super(JsonSerializableWithType.class);
}
项目:ingress-indonesia-dev    文件:SerializableWithTypeSerializer.java   
public void serialize(JsonSerializableWithType paramJsonSerializableWithType, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider)
{
  paramJsonSerializableWithType.serialize(paramJsonGenerator, paramSerializerProvider);
}
项目:ingress-indonesia-dev    文件:SerializableWithTypeSerializer.java   
public final void serializeWithType(JsonSerializableWithType paramJsonSerializableWithType, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider, TypeSerializer paramTypeSerializer)
{
  paramJsonSerializableWithType.serializeWithType(paramJsonGenerator, paramSerializerProvider, paramTypeSerializer);
}