We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 246d904 commit 9df2ee0Copy full SHA for 9df2ee0
java/ql/lib/semmle/code/java/Member.qll
@@ -379,6 +379,19 @@ class SrcCallable extends Callable {
379
this.isProtected() and not tsub.isFinal()
380
)
381
}
382
+
383
+ /**
384
+ * Holds if this callable is implicitly public in the sense that it can be the
385
+ * target of virtual dispatch by a call from outside the codebase.
386
+ */
387
+ predicate isImplicitlyPublic() {
388
+ this.isEffectivelyPublic()
389
+ or
390
+ exists(SrcMethod m |
391
+ m.(SrcCallable).isEffectivelyPublic() and
392
+ m.getAPossibleImplementationOfSrcMethod() = this
393
+ )
394
+ }
395
396
397
/** Gets the erasure of `t1` if it is a raw type, or `t1` itself otherwise. */
0 commit comments