I played with repeatable annotations for another project and what we had in mind works basically, but a compiler <= 7 raises a warning at build time due to the @Repeatable meta-annotation not being present. So I asked on the compiler dev mailing list about this and learned that a repeatable annotation type is not supposed to be used on older versions in the way we hoped it could be done.
So one would either have to release a new version of such a library which uses JDK 8 as baseline, or one would have to provide two versions of such a repeatable annotation - e.g. via classified JARs - , one using the old style and one marked as repeatable in the Java 8 style. Given that we can't change the BV annotations in the scope of this task anyways, I suggest we give up on it for the HV custom constraints for now as well, as both options don't really seem appealing just for the handful of custom constraints we offer.
|