MCPcopy Create free account
hub / github.com/LFYSec/MScan / main

Method main

src/test/resources/pta/lambda/LambdaConstructor.java:7–22  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

5public class LambdaConstructor {
6
7 public static void main(String[] args) {
8 Supplier<A> noArg = A::new;
9 A a1 = noArg.get();
10 B b1 = a1.b;
11 use(b1);
12
13 Function<B, A> oneArg = A::new;
14 A a2 = oneArg.apply(b1());
15 B b2 = a2.b;
16 use(b2);
17
18 BiFunction<B, B, A> twoArgs = A::new;
19 A a3 = twoArgs.apply(b2(), b3());
20 B b3 = a3.b;
21 use(b3);
22 }
23
24 static B b1() {
25 return new B();

Callers

nothing calls this directly

Calls 6

useMethod · 0.95
b1Method · 0.95
b2Method · 0.95
b3Method · 0.95
getMethod · 0.65
applyMethod · 0.65

Tested by

no test coverage detected