I am trying to create a library which depends heavily on annotating class properties. The properties should be able to be annotated via getters or on the actual underlying fields (ala JPA etc.)
Is there some standard for this? Tons of libraries do this (e.g. Hibernate). Do they all just roll their own implementation and conventions? Is there a good library which makes this easy? It seems as though there should be some standard for this.
I could easily just reflect through all of a class's methods and fields and check for the presence of an annotation, but there are lots of subtleties (e.g. "get" or "is" prefixes on getter methods). Anyone have any ideas?