Charles Oliver Nutter wrote:
So as you can see we really do have all the necessary requirements to annotate classes. Now what if we just had MyBean be a java.lang.Object extension and stuffed the annotations into the resulting generated class? Bingo, we've got annotation support in JRuby on Java classes too. This should enable things like Hibernate, JPA, and JUnit 4 to work with JRuby's Ruby-based classes. Or at least, I believe it to be possible. It just requires a little work on the Java integration stuff to add annotation information to the resulting classes.

It's also worth noting that with a little extra effort when generating the proxy...namely, creating Java methods for all the Ruby methods we created...we could generate real Java classes with real Java methods on them. This is the holy grail of Ruby class implementation, the ability to have Ruby methods reflected on a Java object instance. With annotations, we not only have the ability to specify annotations (duh) but we can also specify parameter and return types. That is a discussion for another day, however, since we need something static ahead-of-time for Java code to bind to.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to