Community
Participate
Working Groups
If the annotation processing supports it, enable accessing the decoded method parameter names during processing of annotations.
Created attachment 234832 [details] Patch for this functionality (contains binary) I haven't worked with the APT stuff before, so the testing strategy is a 'best effort'. I've built the annotations.jar as per the jardesc. The patch is not final, since the VariableElement.getModifiers() method doesn't return the final modifier from MethodParameters yet. Note how ExecutableElementImpl contained filtering of synthetic arguments for enum constructors, but it effectively duplicated the same kind of filtering in BinaryTypeBinding, so I've removed it.
Requesting review of implementation and testing strategy. I figured I could test it in org.eclipse.jdt.compiler.apt.tests.ModelTests as well, but I couldn't quite figure out how the existing tests worked.
Jesper, sorry for the housekeeping burden, could you split this patch into two please, one for the JDT/Core, for which I'll be reviewer and Jay will be the reviewer and committer for APT (I don't think either of us have commit right for APT) Jay, the APT portion will have to go through CQ approval process. Can be taken up after review. We also need to raise a ER against APT and move the relevant portions of the patch there.
Created attachment 234834 [details] JDT part of the patch This is the JDT part of the changes, to support carrying the methodparameters over to the MethodBinding.
Created attachment 234836 [details] APT part of the patch The APT part of the patch, mostly tests. This is the part which should go to CQ review, since it's well over 250 lines. There'll be a few more changes coming when I get to the finishing touches, but it'll be <250 lines -- or you could wait, if you prefer.
(In reply to comment #3) > Jesper, sorry for the housekeeping burden, could you split this patch into > two please, one for the JDT/Core, for which I'll be reviewer and Jay will be > the reviewer and committer for APT (I don't think either of us have commit > right for APT) Done. Will we need to split the bug as well? It's a pity I couldn't finish this entirely (I didn't notice that APT was a separate component), but I'm going to continue on JEP120 while the housekeeping is in progress.
Patch looks good, In BTB, please extract the 4 uses of argumentNames.length into a local, release and resolve this one, Thanks! Yes, I'll raise a separate bug for APT shortly.
(In reply to comment #7) > Yes, I'll raise a separate bug for APT shortly. https://bugs.eclipse.org/bugs/show_bug.cgi?id=416027, Thanks.
BTW, I noticed that your name shows up "Jesper Steen Moeller" in a bunch of copyright text and as "Jesper Steen Moller" in others. Is this a valid alternate spelling or a typo perpetuated by copy + paste ? (Also some of us thought you pronounced your name with a starting "Y" sound during our phone meeting. So is that the right pronunciation ?)
(In reply to comment #6) > It's a pity I couldn't finish this entirely (I didn't notice that APT was a > separate component), but I'm going to continue on JEP120 while the > housekeeping is in progress. APT work may not need CQ review - I'll check with Dani. Before you plunge into JEP 120, can we close the loose ends in 118 JDT/Core work so we can declare done (APT work can happen in due course)
(In reply to comment #7) > Patch looks good, In BTB, please extract the 4 uses of argumentNames.length > into a local, release and resolve this one, Thanks! I went ahead and made this change and released it here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=1ab5591c67cb695048e1591e0a714342e9b9c85b > APT work may not need CQ review - I'll check with Dani. It does not require, but it is better to engage Jay when you are fully done with the finishing touches.