imperativeApplicator.applyImperative(pluginId, plugin);
}
public void applyRules(@Nullable String pluginId, Class<?> clazz) {
for (Class<?> source : modelRuleSourceDetector.getDeclaredSources(clazz)) {
inspector.inspect(source, target.getModelRegistry(), new RuleSourceDependencies() {
public void add(Class<?> source) {
if (!Plugin.class.isAssignableFrom(source)) {
throw new IllegalArgumentException("Only plugin classes are valid as rule source dependencies.");
}
target.apply(Collections.singletonMap("plugin", source));