CodeQL library for Java/Kotlin
codeql/java-all 0.9.2-dev (changelog, source)
Search

Member predicate Modifiable::hasModifier

Holds if this element has modifier m.

For most purposes, the more specialized predicates isAbstract, isPublic, etc. should be used.

Those specialized predicates also take implicit modifiers into account. For instance, non-default instance methods in interfaces are implicitly abstract, so isAbstract() will hold for them even if hasModifier("abstract") does not.

predicate hasModifier(string m)