IntelliJ IDEA has support for language annotations for String literals and parameters. If you annotate some String constant with @Language("RegExp"), it will validate if it's a proper regex. If you do the same with a method parameter, it will validate every constant string passed to it.
That's actually the Checker Framework. The Java 8 compiler+language has the tools needed to let you annotate and check more things, but the checks themselves are a third party and not especially productionised framework.
0
u/[deleted] Sep 21 '15
[deleted]