Check out my Bean annotations
http://code.google.com/p/javadude/wiki/Annotations
Things like
@Bean(
cloneable=true,
defineSimpleEqualsAndHashCode=true,
properties={
@Property(name="name", bound=true),
@Property(name="age", type=int.class, bound=true),
@Property(name="friend", type=Person.class, kind=PropertyKind.LIST)
},
observers={
@Observer(type=FeverListener.class)
}
)
public class Person extends PersonGen { }
The annotation processor generates the PersonGen superclass.
Note that I'm currently working on a major change to them and the API is changing (I'll still leave the current version available, but the 3.x.x version stream will be breaking)
I'm trying to get the new version done in the next couple of weeks.