Community
Participate
Working Groups
After bug 96237 fix, it appears that MethodRef DOM/AST node name now may be qualified. As MethodRef 'name' field is currently a SimpleName, there's no way to store all tokens of member class constructor qualified reference... So, this field must be changed to Name instead of SimpleName...
Martin, I saw that JDT/UI relies on the fact that MethodRef.getName() returns a SimpleName. Do you think it would be a great change on your side if we fix this in JDT/Core?
MethodRef.getName() is API, you can't change that! You can't even deprecate it and add a new accessor as implementors of a visitor can expect that they get the same call order. They only way for new API in the AST is to create a new API level, as we did it to introduce the 5.0 contructs. But this issue isn't big enough for this. I think the existing API is good enough. Note that the 'qualifier' on method ref is used for types. 'name' is used for field and method name (after the '#') qualifier#name(parameter)
I agree that correct change should not be change the type of this field and we'll need to add a new API level (something like ConstructorRef for example). Note that bug 148804 I opened about type refactoring needs this change to be complete...
Can you give an example where the method name has to be qualified?
Oh I see '@see pack.Test.A#Test.A()'. Looks really strange and inconsistent that Javadoc requires this. I guess we won't be able to fix this. We can't also add new types to the AST (would break existing visitors again).
bug 103304 was about this 'inconsistent' syntax. However, you're definetely right, and I missed that point, this is a javadoc tool bug (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4288720)... So, obviously agree not to change our API for a bug in javadoc tool, I'll reopen bug 103304 to discuss about our behavior regarding this syntax...