CodeQL library for Java

Member predicate Modifiable::hasModifier

Holds if this element has modifier m.

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

Both this method and those specialized predicates 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)