{:sql=>"SELECT * FROM stuff WHERE name = 'foo'"}{:field=>:hello_id}{:field=>:bar_in_table}

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? We can already create real Java classes in this way, but with the above syntax and a little magic in the JRuby Java integration later, we've got annotation support in 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 to add annotation information to the resulting generated classes.

I've planted the seed here and on the JRuby dev list...let's see if it germinates.

Good starter implementation. Unfortunately it gets more complex when defining annotations in modules. Facets' Annotations addressed this. Will that work in JRuby? NOTE The lib will get an official independent release soon. That'll be a good time to try it out.