private static void fillProfileType(QueryProfilesConfig.Queryprofiletype config, QueryProfileTypeRegistry registry) {
        QueryProfileType type = registry.getComponent(new ComponentSpecification(config.id()).toId());
        try {

            for (String inheritedId : config.inherit()) {
                QueryProfileType inherited = registry.getComponent(inheritedId);
                if (inherited == null)
                    throw new IllegalArgumentException("Inherited query profile type '" + inheritedId + "' in " + type + " was not found");
                else
                    type.inherited().add(inherited);

            }

            for (QueryProfilesConfig.Queryprofiletype.Field fieldConfig : config.field())
                instantiateFieldDescription(fieldConfig,type,registry);
        }
        catch (IllegalArgumentException e) {
            throw new IllegalArgumentException("Invalid " + type,e);
        }
    }
Fill a given profile by locating its config
container-search/src/main/java/com/yahoo/search/query/profile/config/QueryProfileConfigurer.java