hollow/src/main/java/com/netflix/hollow/core/read/filter/HollowFilterConfig.java
public void addTypeRecursive(String type, Map<String, HollowSchema> schemas) {
        addType(type);
        HollowSchema schema = schemas.get(type);
        switch(schema.getSchemaType()) {
        case OBJECT:
            HollowObjectSchema objSchema = (HollowObjectSchema)schema;
            for(int i=0;i<objSchema.numFields();i++) {
                if(objSchema.getFieldType(i) == FieldType.REFERENCE)
                    addTypeRecursive(objSchema.getReferencedType(i), schemas);
            }
            break;
        case MAP:
            addTypeRecursive(((HollowMapSchema)schema).getKeyType(), schemas);
            addTypeRecursive(((HollowMapSchema)schema).getValueType(), schemas);
            break;
        case LIST:
        case SET:
            addTypeRecursive(((HollowCollectionSchema)schema).getElementType(), schemas);
            break;
        }
    }
public void addTypeRecursive(String type, Map<String, HollowSchema> schemas) {
        addType(type);
        HollowSchema schema = schemas.get(type);
        switch(schema.getSchemaType()) {
        case OBJECT:
            HollowObjectSchema objSchema = (HollowObjectSchema)schema;
            for(int i=0;i<objSchema.numFields();i++) {
                if(objSchema.getFieldType(i) == FieldType.REFERENCE)
                    addTypeRecursive(objSchema.getReferencedType(i), schemas);
            }
            break;
        case MAP:
            addTypeRecursive(((HollowMapSchema)schema).getKeyType(), schemas);
            addTypeRecursive(((HollowMapSchema)schema).getValueType(), schemas);
            break;
        case LIST:
        case SET:
            addTypeRecursive(((HollowCollectionSchema)schema).getElementType(), schemas);
            break;
        }
    }
Add a type, plus recursively add any directly or transitively referenced types.

All fields in these types will be either excluded or included, depending on whether
this is an exclude or include filter, respectively.


@param type A type from the data model.
@param schemas A map of typeName to schema including all schemas for this data model.