io.atleon.core.AloFactoryConfig Maven / Gradle / Ivy
package io.atleon.core;
import java.util.Map;
/**
* Utility for loading {@link AloFactory} implementations
*/
public final class AloFactoryConfig {
private AloFactoryConfig() {
}
public static > AloFactory loadDecorated(
Map properties,
Class decoratorSuperType
) {
AloFactory aloFactory = loadDefault();
return AloDecoratorConfig.load(properties, decoratorSuperType)
.map(aloFactory::withDecorator)
.orElse(aloFactory);
}
public static AloFactory loadDefault() {
return ComposedAlo.factory();
}
}