-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Java: Add MemberType #5591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java: Add MemberType #5591
Conversation
bfa12f5 to
498e30e
Compare
|
Perhaps your warning about inner classes should mention that there can be more than one layer of nesting -- for example, what might in source be written |
498e30e to
9c17762
Compare
|
The documentation comments about Do you think it suffices like this? |
|
The docs look ok to me. Bear in mind though that there is QL code that we don't control, e.g. codebase-specific customisations made by customers. We would need a solution here that doesn't change the meaning of the existing type |
The effective behavior of import java
from NestedType n
where n instanceof Member
select nDue to how the characteristics predicate of I am a little bit skeptical about a "solution here that doesn't change the meaning of the existing type Member". The JLS section referenced in the description of this pull request (as well as other JLS sections) explicitly call these nested classes "members". Though feel free to propose your solution. |
|
Problem with this: If we have However now you have |
9c17762 to
6f06eba
Compare
|
Thanks for pointing that out and sorry for the trouble! My previous changes indeed completely broke matching member types at all. I have reverted the changes to |
|
Test suite failures: These should be reproducible with a local |
6f06eba to
d853f0c
Compare
|
The problem was that I have also modified the documentation for the qualified name predicates to explain in more detail which structure the qualified name has. |
|
As example for a qualified name of a member type I chose |
Map<>$Entry currently has odd generic notation that may be about to change.
smowton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added change note; changed example to Thread$State
Resolves #3708
Adds the class
MemberTypeextendingNestedTypewhich models a member class or member interface as specified by JLS 16 §8.5.This might also require some follow-up work for predicates which currently only consider
FieldorCallableas member, see also #5596.(Though the documentation changes might need some tweaking when #5564 is handled.)