I am working on a simple tool for checking Java coding guidelines for a project. One of these recommendations is to make sure that there is no variable declared as "private static ...", only "private static final ..." is allowed.
I am wondering how I can get this result. I wrote this:
pattern = "private\\\s*static\\\s*(?!final)";
But it does not work. How can I get only entries without the keyword "final"?
Thanks, Med.
source
share