private void handleEmbeddedType(Element element, Set<TypeElement> elements) {
        TypeMirror type = element.asType();
        if (element.getKind() == ElementKind.METHOD) {
            type = ((ExecutableElement) element).getReturnType();
        }
        String typeName = type.toString();

        if (typeName.startsWith(Collection.class.getName())
         || typeName.startsWith(List.class.getName())
         || typeName.startsWith(Set.class.getName())) {
            type = ((DeclaredType) type).getTypeArguments().get(0);

        } else if (typeName.startsWith(Map.class.getName())) {
            type = ((DeclaredType) type).getTypeArguments().get(1);
        }

        TypeElement typeElement = typeExtractor.visit(type);

        if (typeElement != null && !TypeUtils.hasAnnotationOfType(typeElement, conf.getEntityAnnotations())) {
            if (!typeElement.getQualifiedName().toString().startsWith("java.")) {
                elements.add(typeElement);
            }
        }
    }
{@code AbstractQuerydslProcessor} is the base class for Querydsl annotation processors and
contains the main processing logic. The subclasses just provide the configuration.

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