/** * Add a type converter. If it is a duplicate for an existing type, it will override that type. * * @param tc */ public TypeConverter addConverter(TypeConverter tc) { if (tc.getSupportedTypes() != null) for (Class c : tc.getSupportedTypes()) addTypedConverter(c, tc); else untypedTypeEncoders.add(tc); tc.setMapper(mapr); registeredConverterClasses.add(tc.getClass()); return tc; }
public void setMapper(Mapper mapr) { this.mapr = mapr; for (List<TypeConverter> tcs : tcMap.values()) for (TypeConverter tc : tcs) tc.setMapper(mapr); for (TypeConverter tc : untypedTypeEncoders) tc.setMapper(mapr); }