[ecj] Patch: FYI: misc. annotation bug fixes

Andrew Haley aph@redhat.com
Wed Oct 18 14:52:00 GMT 2006


Re annotations:

Method.getAnnotation(interface T) indirectly calls
AnnotationInvocationHandler.create(), which creates a new class
Proxy(T) for every annotation on that method.  

This strikes me as absurdly heavyweight.

There is a FIXME on Class.getDeclaredAnnotations() that says "could
cache the value here..."  Well, yeah.  That would be good.  ;-)

Anyway, our current implementation of Proxy is very inefficient.  It
occurs to me that if we are going to be using Proxies so heavily it
might make sense to write an efficient version of that class for gcj.
It wouldn't be hard.

Thoughts?

Andrew.



More information about the Java mailing list