File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
java/ql/src/utils/modelgenerator/internal Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -52,14 +52,20 @@ private predicate isJdkInternal(J::CompilationUnit cu) {
52
52
cu .getPackage ( ) .getName ( ) = ""
53
53
}
54
54
55
+ /** Holds if the given API is a constructor without parameters. */
56
+ private predicate isParameterlessConstructor ( J:: Callable api ) {
57
+ api instanceof J:: Constructor and api .getNumberOfParameters ( ) = 0
58
+ }
59
+
55
60
/**
56
61
* Holds if it is relevant to generate models for `api`.
57
62
*/
58
63
private predicate isRelevantForModels ( J:: Callable api ) {
59
64
not isInTestFile ( api .getCompilationUnit ( ) .getFile ( ) ) and
60
65
not isJdkInternal ( api .getCompilationUnit ( ) ) and
61
66
not api instanceof J:: MainMethod and
62
- not api instanceof J:: StaticInitializer
67
+ not api instanceof J:: StaticInitializer and
68
+ not isParameterlessConstructor ( api )
63
69
}
64
70
65
71
/**
You can’t perform that action at this time.
0 commit comments