Java 类org.codehaus.jackson.map.deser.std.StdDeserializer 实例源码

项目:playground    文件:BasicObjectMapperProvider.java   
/**
 * Add Joda-Time deserializers to a module.
 */
private static void addJodaDeserializers(final SimpleModule module) {

    for (final StdDeserializer<?> deserializer : new JodaDeserializers().provide()) {
        module.addDeserializer((Class) deserializer.getValueClass(), deserializer);
    }
    module.addDeserializer(Duration.class, DurationDeserializer.create());
    module.addDeserializer(Instant.class, InstantDeserializer.create());
    module.addDeserializer(ReadableInstant.class, InstantDeserializer.create());
    module.addDeserializer(Interval.class, IntervalDeserializer.create());
    module.addDeserializer(LocalDate.class, LocalDateDeserializer.create());
}
项目:ingress-indonesia-dev    文件:StdDeserializers.java   
private StdDeserializers()
{
  add(new UntypedObjectDeserializer());
  StringDeserializer localStringDeserializer = new StringDeserializer();
  add(localStringDeserializer, String.class);
  add(localStringDeserializer, CharSequence.class);
  add(new ClassDeserializer());
  add(new StdDeserializer.BooleanDeserializer(Boolean.class, null));
  add(new StdDeserializer.ByteDeserializer(Byte.class, null));
  add(new StdDeserializer.ShortDeserializer(Short.class, null));
  add(new StdDeserializer.CharacterDeserializer(Character.class, null));
  add(new StdDeserializer.IntegerDeserializer(Integer.class, null));
  add(new StdDeserializer.LongDeserializer(Long.class, null));
  add(new StdDeserializer.FloatDeserializer(Float.class, null));
  add(new StdDeserializer.DoubleDeserializer(Double.class, null));
  add(new StdDeserializer.BooleanDeserializer(Boolean.TYPE, Boolean.FALSE));
  add(new StdDeserializer.ByteDeserializer(Byte.TYPE, Byte.valueOf((byte)0)));
  add(new StdDeserializer.ShortDeserializer(Short.TYPE, Short.valueOf((short)0)));
  add(new StdDeserializer.CharacterDeserializer(Character.TYPE, Character.valueOf('\000')));
  add(new StdDeserializer.IntegerDeserializer(Integer.TYPE, Integer.valueOf(0)));
  add(new StdDeserializer.LongDeserializer(Long.TYPE, Long.valueOf(0L)));
  add(new StdDeserializer.FloatDeserializer(Float.TYPE, Float.valueOf(0.0F)));
  add(new StdDeserializer.DoubleDeserializer(Double.TYPE, Double.valueOf(0.0D)));
  add(new StdDeserializer.NumberDeserializer());
  add(new StdDeserializer.BigDecimalDeserializer());
  add(new StdDeserializer.BigIntegerDeserializer());
  add(new CalendarDeserializer());
  add(new DateDeserializer());
  add(new CalendarDeserializer(GregorianCalendar.class), GregorianCalendar.class);
  add(new StdDeserializer.SqlDateDeserializer());
  add(new TimestampDeserializer());
  Iterator localIterator = FromStringDeserializer.all().iterator();
  while (localIterator.hasNext())
    add((FromStringDeserializer)localIterator.next());
  add(new StdDeserializer.StackTraceElementDeserializer());
  add(new AtomicBooleanDeserializer());
  add(new TokenBufferDeserializer());
  add(new JavaTypeDeserializer());
}
项目:ingress-indonesia-dev    文件:StdDeserializers.java   
private void add(StdDeserializer<?> paramStdDeserializer)
{
  add(paramStdDeserializer, paramStdDeserializer.getValueClass());
}
项目:ingress-indonesia-dev    文件:StdDeserializers.java   
private void add(StdDeserializer<?> paramStdDeserializer, Class<?> paramClass)
{
  this._deserializers.put(new ClassKey(paramClass), paramStdDeserializer);
}