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) {
36
36
private predicate isJdkInternal ( J:: CompilationUnit cu ) {
37
37
cu .getPackage ( ) .getName ( ) .matches ( "org.graalvm%" ) or
38
38
cu .getPackage ( ) .getName ( ) .matches ( "com.sun%" ) or
39
- cu .getPackage ( ) .getName ( ) .matches ( "javax.swing%" ) or
40
- cu .getPackage ( ) .getName ( ) .matches ( "java.awt%" ) or
41
39
cu .getPackage ( ) .getName ( ) .matches ( "sun%" ) or
42
40
cu .getPackage ( ) .getName ( ) .matches ( "jdk%" ) or
43
41
cu .getPackage ( ) .getName ( ) .matches ( "java2d%" ) or
@@ -57,12 +55,18 @@ private predicate isJdkInternal(J::CompilationUnit cu) {
57
55
cu .getPackage ( ) .getName ( ) = ""
58
56
}
59
57
58
+ private predicate isInfrequentlyUsed ( J:: CompilationUnit cu ) {
59
+ cu .getPackage ( ) .getName ( ) .matches ( "javax.swing%" ) or
60
+ cu .getPackage ( ) .getName ( ) .matches ( "java.awt%" )
61
+ }
62
+
60
63
/**
61
64
* Holds if it is relevant to generate models for `api`.
62
65
*/
63
66
private predicate isRelevantForModels ( J:: Callable api ) {
64
67
not isInTestFile ( api .getCompilationUnit ( ) .getFile ( ) ) and
65
68
not isJdkInternal ( api .getCompilationUnit ( ) ) and
69
+ not isInfrequentlyUsed ( api .getCompilationUnit ( ) ) and
66
70
not api instanceof J:: MainMethod and
67
71
not api instanceof J:: StaticInitializer and
68
72
not exists ( J:: FunctionalExpr funcExpr | api = funcExpr .asMethod ( ) ) and
You can’t perform that action at this time.
0 commit comments