Mass-rename MethodAccess -> MethodCall

This commit is contained in:
Chris Smowton
2023-10-24 10:30:26 +01:00
committed by GitHub
parent a10731c591
commit f552a15aae
404 changed files with 1147 additions and 1138 deletions

View File

@@ -19,7 +19,7 @@ VarAccess valueAccess(EnumConstant e) {
(
exists(Call c |
c.getAnArgument() = valueFlow+(result) or
c.(MethodAccess).getQualifier() = valueFlow+(result)
c.(MethodCall).getQualifier() = valueFlow+(result)
)
or
exists(Assignment a | a.getSource() = valueFlow+(result))
@@ -47,14 +47,14 @@ predicate exception(EnumConstant e) {
)
or
// A method iterates over the values of an enum.
exists(MethodAccess values | values.getMethod().getDeclaringType() = t |
exists(MethodCall values | values.getMethod().getDeclaringType() = t |
values.getParent() instanceof EnhancedForStmt or
values.getParent().(MethodAccess).getMethod().hasName("findThisIn")
values.getParent().(MethodCall).getMethod().hasName("findThisIn")
)
or
// The `valueOf` method is called, meaning that depending on the string any constant
// could be retrieved.
exists(MethodAccess valueOf | valueOf.getMethod().getDeclaringType() = t |
exists(MethodCall valueOf | valueOf.getMethod().getDeclaringType() = t |
valueOf.getMethod().hasName("valueOf")
)
or

View File

@@ -142,7 +142,7 @@ deprecated class JAXAnnotationReflectivelyConstructedClass =
class DeserializedClass extends ReflectivelyConstructedClass {
DeserializedClass() {
exists(CastingExpr cast, ReadObjectMethod readObject |
cast.getExpr().(MethodAccess).getMethod() = readObject
cast.getExpr().(MethodCall).getMethod() = readObject
|
hasDescendant(cast.getType(), this)
)
@@ -164,7 +164,7 @@ class NewInstanceCall extends EntryPoint, NewInstance {
/**
* A call to either `Class.getMethod(...)` or `Class.getDeclaredMethod(...)`.
*/
class ReflectiveMethodAccessEntryPoint extends EntryPoint, ReflectiveMethodAccess {
class ReflectiveMethodCallEntryPoint extends EntryPoint, ReflectiveMethodCall {
override Method getALiveCallable() {
result = this.inferAccessedMethod() and
// The `getMethod(...)` call must be used in a live context.