Search in sources :

Example 1 with JavaTimeConverterFactoryProducer

use of org.simpleflatmapper.converter.impl.time.JavaTimeConverterFactoryProducer in project SimpleFlatMapper by arnaudroger.

the class ConverterService method getConverterFactories.

private static List<ConverterFactory> getConverterFactories() {
    final List<ConverterFactory> converterFactories = new ArrayList<ConverterFactory>();
    Consumer<ConverterFactory<?, ?>> factoryConsumer = new Consumer<ConverterFactory<?, ?>>() {

        @Override
        public void accept(ConverterFactory<?, ?> converterFactory) {
            converterFactories.add(converterFactory);
        }
    };
    new JavaBaseConverterFactoryProducer().produce(factoryConsumer);
    // IFJAVA8_START
    new JavaTimeConverterFactoryProducer().produce(factoryConsumer);
    // IFJAVA8_END
    ProducerServiceLoader.produceFromServiceLoader(ConverterFactoryProducer.class, factoryConsumer);
    return converterFactories;
}
Also used : Consumer(org.simpleflatmapper.util.Consumer) JavaBaseConverterFactoryProducer(org.simpleflatmapper.converter.impl.JavaBaseConverterFactoryProducer) JavaTimeConverterFactoryProducer(org.simpleflatmapper.converter.impl.time.JavaTimeConverterFactoryProducer) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 JavaBaseConverterFactoryProducer (org.simpleflatmapper.converter.impl.JavaBaseConverterFactoryProducer)1 JavaTimeConverterFactoryProducer (org.simpleflatmapper.converter.impl.time.JavaTimeConverterFactoryProducer)1 Consumer (org.simpleflatmapper.util.Consumer)1