remove some of the biggest frameworks from application mode consideration

This commit is contained in:
Stephan Brandauer
2023-05-25 17:06:02 +02:00
parent db77c6b9a3
commit 5ca2221097

View File

@@ -277,6 +277,29 @@ private class ArgumentToLocalCall extends CharacteristicsImpl::UninterestingToMo
}
}
/**
* A characteristic that avoids modeling endpoint that are passed to frameworks
* in application mode.
*
* It's much more economical to use framework mode for those.
*/
private class SkipFrameworkModeling extends CharacteristicsImpl::UninterestingToModelCharacteristic {
SkipFrameworkModeling() { this = "skip modeling of large frameworks" }
override predicate appliesToEndpoint(Endpoint e) {
ApplicationCandidatesImpl::getCallable(e)
.getDeclaringType()
.getPackage()
.getName()
.matches([
"com.google%", //
"java.%", //
"javax.%", //
"org.apache%", //
])
}
}
/**
* A Characteristic that marks endpoints as uninteresting to model, according to the Java ModelExclusions module.
*/