private void add(int id, Class<? extends Identifiable> spec) {

            CreateFromConstructor creator;
            try {
                creator = new CreateFromConstructor(spec.getConstructor());
            } catch (NoSuchMethodException e) {
                creator = null;
            }
            add(id, spec, creator);
        }
Adds an entry in the type map, pairing the given identifier with the given class specification.

@param id   The class identifier to register with.
@param spec The class to register.
@throws IllegalArgumentException Thrown if two classes attempt to register with the same identifier.
vespajlib/src/main/java/com/yahoo/vespa/objects/Identifiable.java