File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
java/ql/src/utils/modelgenerator/internal Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,6 @@ private predicate isInTestFile(J::File file) {
3636private predicate isJdkInternal ( J:: CompilationUnit cu ) {
3737 cu .getPackage ( ) .getName ( ) .matches ( "org.graalvm%" ) or
3838 cu .getPackage ( ) .getName ( ) .matches ( "com.sun%" ) or
39- cu .getPackage ( ) .getName ( ) .matches ( "javax.swing%" ) or
40- cu .getPackage ( ) .getName ( ) .matches ( "java.awt%" ) or
4139 cu .getPackage ( ) .getName ( ) .matches ( "sun%" ) or
4240 cu .getPackage ( ) .getName ( ) .matches ( "jdk%" ) or
4341 cu .getPackage ( ) .getName ( ) .matches ( "java2d%" ) or
@@ -57,12 +55,18 @@ private predicate isJdkInternal(J::CompilationUnit cu) {
5755 cu .getPackage ( ) .getName ( ) = ""
5856}
5957
58+ private predicate isInfrequentlyUsed ( J:: CompilationUnit cu ) {
59+ cu .getPackage ( ) .getName ( ) .matches ( "javax.swing%" ) or
60+ cu .getPackage ( ) .getName ( ) .matches ( "java.awt%" )
61+ }
62+
6063/**
6164 * Holds if it is relevant to generate models for `api`.
6265 */
6366private predicate isRelevantForModels ( J:: Callable api ) {
6467 not isInTestFile ( api .getCompilationUnit ( ) .getFile ( ) ) and
6568 not isJdkInternal ( api .getCompilationUnit ( ) ) and
69+ not isInfrequentlyUsed ( api .getCompilationUnit ( ) ) and
6670 not api instanceof J:: MainMethod and
6771 not api instanceof J:: StaticInitializer and
6872 not exists ( J:: FunctionalExpr funcExpr | api = funcExpr .asMethod ( ) ) and
You can’t perform that action at this time.
0 commit comments