private Constructor<MODEL> findConstructor(Class<MODEL> clazz) {
        for (Constructor<?> ctor : clazz.getDeclaredConstructors()) {
            if (ctor.getAnnotation(com.google.inject.Inject.class) != null
                    || ctor.getAnnotation(com.yahoo.component.annotation.Inject.class) != null) {
                return (Constructor<MODEL>) ctor;
            }
        }
        return (Constructor<MODEL>) clazz.getDeclaredConstructors()[0];
    }
Represents a node in the dependency graph, and contains information about a builders dependencies.
Constructor signatures of model classes must have ConfigModelContext as the first argument and
ConfigModel subclasses or Collection of ConfigModels as subsequent arguments.
Only Collection, not Collection subtypes can be used.

@author Ulf Lilleengen
config-model/src/main/java/com/yahoo/config/model/graph/ModelNode.java