@Test public void testConvertToNull() { assertThat(jTransfo.convertTo(null, this.getClass())).isNull(); }
@Override public <T> T convertTo(Object source, Class<T> targetClass, String... tags) { if (null == source) { return null; } source = replaceObject(source); Class<T> realTargetClass = replaceClass(targetClass); return (T) convert(source, findTarget(source, realTargetClass, tags), tags); }
JTransfoImpl implements JTransfo, ConfigurableJTransfo, ConvertSourceTarget { @Override public <T> T convertTo(Object source, Class<T> targetClass, String... tags) { if (null == source) { return null; } source = replaceObject(source); Class<T> realTargetClass = replaceClass(targetClass); return (T) convert(source, findTarget(source, realTargetClass, tags), tags); } }
JTransfoImpl implements JTransfo, ConfigurableJTransfo, ConvertSourceTarget { @Override public <T> T convertTo(Object source, Class<T> targetClass, String... tags) { if (null == source) { return null; } source = replaceObject(source); Class<T> realTargetClass = replaceClass(targetClass); return (T) convert(source, findTarget(source, realTargetClass, tags), tags); } JTransfoImpl(); }
JTransfoImpl implements JTransfo, ConfigurableJTransfo, ConvertSourceTarget { @Override public <T> T convertTo(Object source, Class<T> targetClass, String... tags) { if (null == source) { return null; } source = replaceObject(source); Class<T> realTargetClass = replaceClass(targetClass); return (T) convert(source, findTarget(source, realTargetClass, tags), tags); } JTransfoImpl(); @Override List<TypeConverter> getTypeConverters(); @Override void updateTypeConverters(); @Override void updateTypeConverters(List<TypeConverter> newConverters); @Override List<PreConverter> getPreConverters(); @Override void updatePreConverters(); @Override void updatePreConverters(List<PreConverter> newConverters); @Override List<PostConverter> getPostConverters(); @Override void updatePostConverters(); @Override void updatePostConverters(List<PostConverter> newConverters); @Override List<ObjectFinder> getObjectFinders(); @Override void updateObjectFinders(); @Override void updateObjectFinders(List<ObjectFinder> newObjectFinders); @Override List<ObjectReplacer> getObjectReplacers(); @Override void updateObjectReplacers(); @Override void updateObjectReplacers(List<ObjectReplacer> newObjectReplacers); @Override List<ClassReplacer> getClassReplacers(); @Override void updateClassReplacers(); @Override void updateClassReplacers(List<ClassReplacer> newClassReplacers); List<ConvertInterceptor> getConvertInterceptors(); void updateConvertInterceptors(); void updateConvertInterceptors(List<ConvertInterceptor> newConvertInterceptors); @Override T convert(Object source, T target, String... tags); @Override T convert(Object source, T target, boolean targetIsTo, String... tags); @Override Object convert(Object source); @Override T convertTo(Object source, Class<T> targetClass, String... tags); @Override List<T> convertList(List<?> source, Class<T> targetClass, String... tags); @Override T findTarget(Object source, Class<T> targetClass, String... tags); @Override Class<?> getDomainClass(Class<?> toClass); @Override boolean isToClass(Class<?> toClass); @Override Class<?> getToSubType(Class<?> toType, Object domainObject); void clearCaches(); }
JTransfoImpl implements JTransfo, ConfigurableJTransfo, ConvertSourceTarget { @Override public <T> T convertTo(Object source, Class<T> targetClass, String... tags) { if (null == source) { return null; } source = replaceObject(source); Class<T> realTargetClass = replaceClass(targetClass); return (T) convert(source, findTarget(source, realTargetClass, tags), tags); } JTransfoImpl(); @Override List<TypeConverter> getTypeConverters(); @Override void updateTypeConverters(); @Override void updateTypeConverters(List<TypeConverter> newConverters); @Override List<PreConverter> getPreConverters(); @Override void updatePreConverters(); @Override void updatePreConverters(List<PreConverter> newConverters); @Override List<PostConverter> getPostConverters(); @Override void updatePostConverters(); @Override void updatePostConverters(List<PostConverter> newConverters); @Override List<ObjectFinder> getObjectFinders(); @Override void updateObjectFinders(); @Override void updateObjectFinders(List<ObjectFinder> newObjectFinders); @Override List<ObjectReplacer> getObjectReplacers(); @Override void updateObjectReplacers(); @Override void updateObjectReplacers(List<ObjectReplacer> newObjectReplacers); @Override List<ClassReplacer> getClassReplacers(); @Override void updateClassReplacers(); @Override void updateClassReplacers(List<ClassReplacer> newClassReplacers); List<ConvertInterceptor> getConvertInterceptors(); void updateConvertInterceptors(); void updateConvertInterceptors(List<ConvertInterceptor> newConvertInterceptors); @Override T convert(Object source, T target, String... tags); @Override T convert(Object source, T target, boolean targetIsTo, String... tags); @Override Object convert(Object source); @Override T convertTo(Object source, Class<T> targetClass, String... tags); @Override List<T> convertList(List<?> source, Class<T> targetClass, String... tags); @Override T findTarget(Object source, Class<T> targetClass, String... tags); @Override Class<?> getDomainClass(Class<?> toClass); @Override boolean isToClass(Class<?> toClass); @Override Class<?> getToSubType(Class<?> toType, Object domainObject); void clearCaches();  }