I need a Regex that will match a java method declaration. I have come up with one that will match a method declaration, but it requires the opening bracket of the method to
I found seba229's answer useful, it captures most of the scenarios, but not the following,
public T name(final Class x, final T y)
This regex will capture that also.
((public|private|protected|static|final|native|synchronized|abstract|transient)+\s)+[\$_\w\<\>\w\s\[\]]*\s+[\$_\w]+\([^\)]*\)?\s*
Hope this helps.