private void addTypeFields(QueryProfileType type) {
        boolean overridable=true;
        type.addField(new FieldDescription("myString", FieldType.fromString("string",registry),false,!overridable));
        type.addField(new FieldDescription("myInteger",FieldType.fromString("integer",registry)));
        type.addField(new FieldDescription("myLong",FieldType.fromString("long",registry)));
        type.addField(new FieldDescription("myFloat",FieldType.fromString("float",registry)));
        type.addField(new FieldDescription("myDouble",FieldType.fromString("double",registry)));
        type.addField(new FieldDescription("myQueryProfile",FieldType.fromString("query-profile",registry)));
        type.addField(new FieldDescription("myUserQueryProfile", FieldType.fromString("query-profile:user",registry),false,!overridable));
    }
Tests overriding of field values

@author bratseth
container-search/src/test/java/com/yahoo/search/query/profile/types/test/OverrideTestCase.java