@@ -59,12 +59,26 @@ private predicate isInternal(CompilationUnit cu) {
59
59
cu .getPackage ( ) .getName ( ) .matches ( "%internal%" )
60
60
}
61
61
62
+ /** A method relating to lambda flow. */
63
+ private class LambdaFlowMethod extends Method {
64
+ LambdaFlowMethod ( ) {
65
+ this .hasQualifiedName ( "java.lang" , "Runnable" , "run" ) or
66
+ this .hasQualifiedName ( "java.util" , "Comparator" , "comparing" ) or
67
+ this .hasQualifiedName ( "java.util.function" , "BiConsumer" , "accept" ) or
68
+ this .hasQualifiedName ( "java.util.function" , "BiFunction" , "apply" ) or
69
+ this .hasQualifiedName ( "java.util.function" , "Consumer" , "accept" ) or
70
+ this .hasQualifiedName ( "java.util.function" , "Function" , "apply" ) or
71
+ this .hasQualifiedName ( "java.util.function" , "Supplier" , "get" )
72
+ }
73
+ }
74
+
62
75
/** Holds if the given callable is not worth modeling. */
63
76
predicate isUninterestingForModels ( Callable c ) {
64
77
isInTestFile ( c .getCompilationUnit ( ) .getFile ( ) ) or
65
78
isInternal ( c .getCompilationUnit ( ) ) or
66
79
c instanceof MainMethod or
67
80
c instanceof ToStringMethod or
81
+ c instanceof LambdaFlowMethod or
68
82
c instanceof StaticInitializer or
69
83
exists ( FunctionalExpr funcExpr | c = funcExpr .asMethod ( ) ) or
70
84
c .getDeclaringType ( ) instanceof TestLibrary or
0 commit comments