We can certainly make all method parameters final. It's invisible code
anyways, and it's probably technically more correct. I can't think of
any method lombok currently generates that changes any of its
parameters, and I can't think of any code cleanup action in eclipse
that REMOVES 'final' from parameters, so it should be completely
harmless.
You'll have to edit just about every Handle*.java file, both for
eclipse and javac (consistency between the two is important) though
the change is bordering on the trivial: On eclipse, you can check how
e.g. the HandleGetter.java code sets the 'public' flag on methods.
Setting flags on an Argument object is similar. (hint: binary-or the
"flags" field of a LocalDeclaration object with
ClassFileConstants.FINAL).
For javac, you'll have to take the JCVariableDecl object, and sets its
flags.modifiers field (flags = a tuple of a long with bits, along with
a list of annotations. final is not an annotation, so you want the
bits, which is flags.modifiers) with Flags.FINAL. That's really all
there should be to it.
I think we actually set the final flag on the 'final int PRIME = 31;'
local declaration for createHashCode() for both javac and eclipse,
actually. You can look at them to see how to do it. (They are VERY
similar to method arguments - "Argument" is a subclass of
"LocalDeclaration" in eclipse, and on javac, they are BOTH represented
by JCVariableDecl objects!)
I'll gladly apply a patch and add your name to the credit roll if
you're so inclined :)