@@ -26,8 +26,8 @@ class MethodDecl extends AbstractFunctionDecl {
26
26
}
27
27
28
28
/**
29
- * Holds if this function is called `funcName` and its a member of a
30
- * class, struct, extension, enum or protocol call `typeName`.
29
+ * Holds if this function is called `funcName` and is a member of a
30
+ * class, struct, extension, enum or protocol called `typeName`.
31
31
*/
32
32
cached
33
33
predicate hasQualifiedName ( string typeName , string funcName ) {
@@ -46,12 +46,17 @@ class MethodDecl extends AbstractFunctionDecl {
46
46
}
47
47
48
48
/**
49
- * Holds if this function is called `funcName` and its a member of a
50
- * class, struct, extension, enum or protocol call `typeName` in a module
49
+ * Holds if this function is called `funcName` and is a member of a
50
+ * class, struct, extension, enum or protocol called `typeName` in a module
51
51
* called `moduleName`.
52
52
*/
53
53
predicate hasQualifiedName ( string moduleName , string typeName , string funcName ) {
54
54
this .hasQualifiedName ( typeName , funcName ) and
55
55
this .getModule ( ) .getFullName ( ) = moduleName
56
56
}
57
+
58
+ /**
59
+ * Holds if this function is a `static` or `class` method, as opposed to an instance method.
60
+ */
61
+ predicate isStatic ( ) { this .getSelfParam ( ) .getType ( ) instanceof MetatypeType }
57
62
}
0 commit comments