public <T> void register(MethodRuleDefinition<T> ruleDefinition, ModelRegistry modelRegistry, RuleSourceDependencies dependencies) {
String modelName = determineModelName(ruleDefinition);
List<ModelReference<?>> references = ruleDefinition.getReferences();
if (references.isEmpty()) {
throw new InvalidModelRuleDeclarationException(ruleDefinition.getDescriptor(), "a void returning model element creation rule has to take a managed model element instance as the first argument");
}
ModelType<?> managedType = references.get(0).getType();
modelRegistry.create(buildModelCreatorForManagedType(managedType, ruleDefinition, ModelPath.path(modelName)));
}