public static QueryProfileFieldType fromString(String queryProfileName, QueryProfileTypeRegistry registry) {
        if (queryProfileName == null || queryProfileName.isEmpty())
            return new QueryProfileFieldType(null);

        if (registry == null)
            throw new IllegalArgumentException("Can not resolve query profile type '" + queryProfileName +
                                               "' because no registry is provided");
        QueryProfileType queryProfileType=registry.getComponent(queryProfileName);
        if (queryProfileType == null)
            throw new IllegalArgumentException("Could not resolve query profile type '" + queryProfileName + "'");
        return new QueryProfileFieldType(registry.getComponent(queryProfileName));
    }
Represents a query profile field type which is a reference to a query profile.
The reference may optionally specify the type of the referred query profile.

@author bratseth
container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileFieldType.java