use of org.gradle.model.ModelRuleBindingException in project gradle by gradle.
the class ModelBinding method onBind.
public final void onBind(ModelNodeInternal node) {
if (boundTo != null) {
ModelRuleDescriptor creatorDescriptor = node.getDescriptor();
ModelPath path = node.getPath();
throw new InvalidModelRuleException(referrer, new ModelRuleBindingException(new AmbiguousBindingReporter(predicate.getReference(), boundTo.getPath(), boundTo.getDescriptor(), path, creatorDescriptor).asString()));
}
doOnBind(node);
}
use of org.gradle.model.ModelRuleBindingException in project gradle by gradle.
the class PathBinderCreationListener method doOnBind.
@Override
public void doOnBind(ModelNodeInternal node) {
if (predicate.matches(node)) {
boundTo = node;
bindAction.execute(this);
} else {
throw new InvalidModelRuleException(referrer, new ModelRuleBindingException(IncompatibleTypeReferenceReporter.of(node, predicate.getReference().getType(), predicate.getReference().getDescription(), writable).asString()));
}
}
Aggregations