All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.mstream.trader.commons.test.util.date.DateModule Maven / Gradle / Ivy

There is a newer version: 1.14
Show newest version
package io.mstream.trader.commons.test.util.date;

import com.google.inject.AbstractModule;
import com.google.inject.Scopes;
import io.mstream.trader.commons.test.Feature;
import io.mstream.trader.commons.test.Service;
import io.mstream.trader.commons.test.Yahoo;


import java.time.format.DateTimeFormatter;

public class DateModule extends AbstractModule {

    @Override
    protected void configure() {

        bind(DateTimeFormatter.class)
                .annotatedWith(Feature.class)
                .toProvider(FeatureDateTimeFormatterProvider.class)
                .in(Scopes.SINGLETON);

        bind(DateTimeFormatter.class)
                .annotatedWith(Service.class)
                .toProvider(ServiceDateTimeFormatterProvider.class)
                .in(Scopes.SINGLETON);

        bind(DateTimeFormatter.class)
                .annotatedWith(Yahoo.class)
                .toProvider(YahooDateTimeFormatterProvider.class)
                .in(Scopes.SINGLETON);

        bind(DateFormatter.class)
                .in(Scopes.SINGLETON);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy