[ecj] Patch: FYI: misc. annotation bug fixes
Tom Tromey
tromey@redhat.com
Wed Oct 18 16:36:00 GMT 2006
>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
Andrew> Method.getAnnotation(interface T) indirectly calls
Andrew> AnnotationInvocationHandler.create(), which creates a new class
Andrew> Proxy(T) for every annotation on that method.
Andrew> This strikes me as absurdly heavyweight.
Yes, it is.
Andrew> There is a FIXME on Class.getDeclaredAnnotations() that says "could
Andrew> cache the value here..." Well, yeah. That would be good. ;-)
Yeah. Annotations are immutable so this isn't too hard. I just
didn't get around to implementing the cache yet.
Andrew> Anyway, our current implementation of Proxy is very inefficient. It
Andrew> occurs to me that if we are going to be using Proxies so heavily it
Andrew> might make sense to write an efficient version of that class for gcj.
Andrew> It wouldn't be hard.
Andrew> Thoughts?
Seems reasonable.
Tom
More information about the Java
mailing list