The annotations as you posted them look good to me.
public @interface TableGeneratorExtension { String name(); String optimizerName() default ""; boolean perEntity() default false; } public @interface SequenceGeneratorExtension { String name(); String optimizerName() default ""; String perEntitySuffix() default "_SEQ"; }
How about making name() optional though and resolve the name based on where the annotation is placed?