I am trying to identify a java function block addition in a diff file (new line start with +
in diff).
For that I am using regular expression.
It is working fine, however I need to identify all (if not, at least maximum) possible combinations of keyword used in java method declarations.
Here is my regular expression written in my java program
Pattern functionPatter = Pattern.compile("\\+\\s*(public|private|protected)?(\\s+static)?(\\s+final)?\\s+\\w+\\s+\\w+\\s*\\(.*?\\)\\s*(throws .*)+\\{.*\\}",Pattern.DOTALL);
Please suggest me if I am missing anything.