public T create ( final Class < T > klass ) { T obj ; try { obj = ( T ) klass . newInstance ( ) ; } catch ( IllegalAccessException e ) { throw new DocrepException ( e ) ; } catch ( InstantiationException e ) { throw new DocrepException ( e ) ; } add ( obj ) ; return obj ; }
Creates a new annotation instance adds it to the store and returns the instance . This is simply a convenience method to save the user from creating and adding to the store separately .