CodeQL library for Java/Kotlin
codeql/java-all 0.11.0 (changelog, source)

Member predicate RefType::hasMethod

Holds if this type declares or inherits method m, which is declared in declaringType. Methods that would be inherited if they were public, but are not inherited due to being package protected, are also included and indicated by hidden being true.

predicate hasMethod(Method m, RefType declaringType, boolean hidden)