io.mstream.trader.commons.test.util.date.DateModule Maven / Gradle / Ivy
The 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 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(FeatureToServiceDateFormatter.class)
.in(Scopes.SINGLETON);
bind(ServiceToFeatureDateFormatter.class)
.in(Scopes.SINGLETON);
}
}