Adam Lally wrote:
Pushed send a little too quick... I also had another point to make.

Currently getNextIndex() does something strange - it queries the
current Java stack trace to figure out which cover class called it, so
that it knows which index is assigned to which class.  This was added
after-the-fact so as to record this information without having to
change the interface definition.

A cleaner design might be to change this to
JCasRegistry.register(Class).  This would involve some additional work
in my migration script to make these changes to existing cover
classes, but it shouldn't be that difficult.

-Adam


+1 to both of these notes. I would prefer the approach where the JCasGen-erated things directly call the static methods, rather than going through a static final ref in the JCas interface, because it's simpler, and may have some performance implications for the JIT optimizer on some JVMs.

Nice work, Adam :-)

-Marshall


Reply via email to