Java 类org.springframework.core.convert.converter.ConditionalGenericConverter 实例源码

项目:spring4-understanding    文件:GenericConversionService.java   
public GenericConverter getConverter(TypeDescriptor sourceType, TypeDescriptor targetType) {
    for (GenericConverter converter : this.converters) {
        if (!(converter instanceof ConditionalGenericConverter) ||
                ((ConditionalGenericConverter) converter).matches(sourceType, targetType)) {
            return converter;
        }
    }
    return null;
}
项目:spring    文件:GenericConversionService.java   
public GenericConverter getConverter(TypeDescriptor sourceType, TypeDescriptor targetType) {
    for (GenericConverter converter : this.converters) {
        if (!(converter instanceof ConditionalGenericConverter) ||
                ((ConditionalGenericConverter) converter).matches(sourceType, targetType)) {
            return converter;
        }
    }
    return null;
}
项目:class-guard    文件:GenericConversionService.java   
public GenericConverter getConverter(TypeDescriptor sourceType, TypeDescriptor targetType) {
    for (GenericConverter converter : this.converters) {
        if (!(converter instanceof ConditionalGenericConverter) ||
                ((ConditionalGenericConverter) converter).matches(sourceType, targetType)) {
            return converter;
        }
    }
    return null;
}
项目:springlets    文件:EntityFormatAnnotationFormatterFactory.java   
/**
 * Creates a converter of entities to {@link String}, based on the {@link EntityFormat}
 * annotation provided at the class level.
 * 
 * @return the entity to String converter
 */
public ConditionalGenericConverter getToStringConverter() {
  return new EntityToStringConverter(PARSER, PARSER_CONTEXT, messageSource, conversionService);
}