Andrew John Hughes wrote:
> On Fri, 2006-04-21 at 15:23 +0200, Jeroen Frijters wrote:
> > Since we can now support annotations on the trunk I'd like to merge
> > Class/VMClass with the versions from the generics branch 
> > (modulo any 1.5 language feature, of course).
> 
> I thought we agreed that these should be exactly the same, 
> and that new language features shouldn't be part of the runtime
> interface?

Yes, but these were already in the generics version of VMClass, so I
just left them in. I definitely agree that it would be better to take
them out (and also to move getEnumConstants entirely to Class, I don't
see why anyone would want to specialize it).

> > If your VM already supports the generics branch, no changes 
> > should be needed. If you don't yet support it, you need to
> > implement VMClass.getDeclaredAnnotations, if you use a custom
> > version of VMClass, you also need to copy VMClass.getEnumConstants.
> 
> Is implementing getDeclaredAnnotations in full really the best way to
> go?  I'm not saying it isn't (you may have studied this in more detail
> than I), but I was under the impression that some of it may be
> simplified by a gnu.java.lang.annotation.Annotation with native parts.

There's probably room for more Java code and IKVM has a bunch more that
I'd be happy to check into Classpath, but I haven't thought deeply about
it outside of the IKVM context.

I also have annotation serialization support (compatible with the JDK),
but that requires a class in the sun.* package (which I implemented by
looking at the serialized form of an annotation) and I'm not sure if
everyone would agree to that.

Regards,
Jeroen

Reply via email to