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

io.mstream.trader.commons.validation.ValidationModule Maven / Gradle / Ivy

The newest version!
package io.mstream.trader.commons.validation;

import com.google.inject.AbstractModule;
import com.google.inject.Singleton;
import com.google.inject.assistedinject.FactoryModuleBuilder;
import io.mstream.trader.commons.validation.parameter.ParameterModule;


public class ValidationModule extends AbstractModule {

    @Override
    protected void configure() {

        binder().requireExplicitBindings();

        install(new FactoryModuleBuilder()
                .implement(ValidationResult.class, ValidationResult.class)
                .build(ValidationResultFactory.class));

        install(new ParameterModule());

        bind(ValidationErrorFactory.class)
                .to(ValidationErrorFactoryImpl.class)
                .in(Singleton.class);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy