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) {
5252 cu .getPackage ( ) .getName ( ) = ""
5353}
5454
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+
5560/**
5661 * Holds if it is relevant to generate models for `api`.
5762 */
5863private predicate isRelevantForModels ( J:: Callable api ) {
5964 not isInTestFile ( api .getCompilationUnit ( ) .getFile ( ) ) and
6065 not isJdkInternal ( api .getCompilationUnit ( ) ) and
6166 not api instanceof J:: MainMethod and
62- not api instanceof J:: StaticInitializer
67+ not api instanceof J:: StaticInitializer and
68+ not isParameterlessConstructor ( api )
6369}
6470
6571/**
You can’t perform that action at this time.
0 commit comments