cdc.mf.ea.checks.EaRuleUtils Maven / Gradle / Ivy
The newest version!
package cdc.mf.ea.checks;
import java.util.function.Consumer;
import cdc.issues.IssueSeverity;
import cdc.issues.rules.Rule;
public final class EaRuleUtils {
private EaRuleUtils() {
}
public static Rule define(String name,
Consumer descriptionBuilder,
IssueSeverity severity) {
final EaRuleDescription.Builder description = EaRuleDescription.builder();
descriptionBuilder.accept(description);
final Rule.Builder builder = Rule.builder()
.domain(EaProfile.DOMAIN)
.name(name)
.description(description.build().toString())
.severity(severity);
return builder.build();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy