@Override
    protected Configuration createConfiguration(RoundEnvironment roundEnv) {
        Class<? extends Annotation> entities = QueryEntities.class;
        Class<? extends Annotation> entity = Entity.class;
        Class<? extends Annotation> superType = QuerySupertype.class;
        Class<? extends Annotation> embedded = Embedded.class;
        Class<? extends Annotation> skip = Transient.class;
        DefaultConfiguration conf = new DefaultConfiguration(processingEnv, roundEnv,
                Collections.<String>emptySet(),
                entities, entity, superType, null, embedded, skip);
        try {
            @SuppressWarnings("unchecked") // Point is an Expression<Double[]>
            Class<? extends Expression<Double[]>> cl =
                    (Class<? extends Expression<Double[]>>) Class.forName("com.querydsl.mongodb.Point");
            conf.addCustomType(Double[].class, cl);
        } catch (ClassNotFoundException e) {
            throw new IllegalStateException(e);
        }
        return conf;
    }
Annotation processor to create Querydsl query types for Morphia annotated classes

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