openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Logemann>
Subject Re: MetaModel creation with -Aopenjpa.generate=true
Date Wed, 23 Mar 2011 15:51:19 GMT
For the time being, how about the following fix in openjpa trunk:

     * The entry point for java compiler.
    public boolean process(Set<? extends TypeElement> annos, RoundEnvironment roundEnv)
        if (active && !roundEnv.processingOver()) {
            Set<? extends Element> elements = roundEnv.getRootElements();
            for (Element e : elements) {
                if (e instanceof TypeElement)
                    process((TypeElement) e);
        return true;

We simply ignore "PackageElement", "ExecutableElement", "TypeParameterElement" and "VariableElement".
(These are the other Subinterfaces of Element)

With this we dont get into trouble and we have time to elaborate on the real problem. roundEnv.getRootElements()
simply can return also PackageElements. Why this is only the case for this package with JAXB
file is something which one need to research. Thats definitely something in the javax.annotation.processing
area of the JDK. But there  must be a reason that getRootElements() returns Element and not
TypeElement ;-)

Marc Logemann

Am 23.03.2011 um 16:41 schrieb Rick Curtis:

>>> still a bit clueless
> Me too. I just started digging into some of the annotation processor code to
> see if I can learn something today.... So when you swallowed the exception
> everything worked fine?
> Thanks,
> Rick

View raw message