@Override
    protected void collectTypes() throws IOException, XMLStreamException, ClassNotFoundException,
        NoSuchMethodException {

        Map<ManagedType<?>, EntityType> types = new HashMap<>();
        for (ManagedType<?> managedType : metamodel.getManagedTypes()) {
            if (managedType instanceof MappedSuperclassType) {
                types.put(managedType, createSuperType(managedType.getJavaType()));
            } else if (managedType instanceof javax.persistence.metamodel.EntityType) {
                types.put(managedType, createEntityType(managedType.getJavaType()));
            } else if (managedType instanceof EmbeddableType) {
                types.put(managedType, createEmbeddableType(managedType.getJavaType()));
            } else {
                throw new IllegalArgumentException("Unknown type " + managedType);
            }
        }

        // handle properties
        for (Map.Entry<ManagedType<?>, EntityType> entry : types.entrySet()) {
            EntityType entityType = entry.getValue();
            for (Attribute<?,?> attribute : entry.getKey().getDeclaredAttributes()) {
                handleProperty(entityType, entityType.getJavaClass(), attribute);
            }
        }

    }
Create a new JPADomainExporter instance

@param namePrefix name prefix (default: Q)
@param nameSuffix name suffix (default: empty)
@param targetFolder target folder
@param serializerConfig serializer config
@param metamodel metamodel
@param charset charset (default: system charset)
querydsl-jpa-codegen/src/main/java/com/querydsl/jpa/codegen/JPADomainExporter.java