io.mstream.trader.commons.test.util.date.DateModule Maven / Gradle / Ivy
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);
}
}