Java: Add aliases for CodeQL classes with unintuitive name #14555
Marcono1234
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
We did MethodCall, VarWrite, VarRead and NewClassExpr (which is smaller than ClassInstanceExpr, excluding implicit creation) in #14575 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description of the issue
There are CodeQL classes for Java whose name are not that intuitive and which might therefore make it more difficult for users to discover and to understand what they do.
MethodAccess
MethodCall
Call
. And this basically seems to be a "method call". "access" sounds a bit too unspecific, for example a method reference expression is not aMethodAccess
(its synthetic anonymous class has aMethodAccess
though) but one could think it is based on the name.LValue
,RValue
VarWrite
,VarRead
VarAccess
; other subclasses are namedFieldWrite
,FieldRead
. The termsLValue
,RValue
are not / rarely used in the context of Java. The only mention in the JLS seems to be a comparison with C ("in C, this would be called an lvalue").ClassInstanceExpr
NewExpr
?(probably needs a better name since this does not cover creation of arrays which also uses
new
)MemberRefExpr
MethodRefExpr
?What do you think?
This is only a rough suggestion for now, I haven't considered all aspects of this yet such as whether it would make sense to deprecate the existing names eventually, whether the two separate names will increase confusion, or how to deal with subclasses or predicates using the same (unintuitive) name.
I just wanted to generally hear what you think about this.
Beta Was this translation helpful? Give feedback.
All reactions