private Type createInterfaceType(DeclaredType declaredType, TypeElement typeElement, boolean deep) {
        // entity type
        for (Class<? extends Annotation> entityAnn : entityAnnotations) {
            if (typeElement.getAnnotation(entityAnn) != null) {
                return createType(typeElement, TypeCategory.ENTITY, declaredType.getTypeArguments(), deep);
            }
        }

        Iterator<? extends TypeMirror> i = declaredType.getTypeArguments().iterator();

        if (isAssignable(declaredType, mapType)) {
            return createMapType(i, deep);

        } else if (isAssignable(declaredType, listType)) {
            return createCollectionType(Types.LIST, i, deep);

        } else if (isAssignable(declaredType, setType)) {
            return createCollectionType(Types.SET, i, deep);

        } else if (isAssignable(declaredType, collectionType)) {
            return createCollectionType(Types.COLLECTION, i, deep);

        } else {
            String name = typeElement.getQualifiedName().toString();
            return createType(typeElement, TypeCategory.get(name), declaredType.getTypeArguments(), deep);
        }
    }
{@code ExtendedTypeFactory} is a factory for APT-based inspection {@link Type} creation

@author tiwe
querydsl-apt/src/main/java/com/querydsl/apt/ExtendedTypeFactory.java