Java: Explicit import of needed classes from stream and some improvements to comments.

This commit is contained in:
Michael Nebel
2022-11-01 10:02:08 +01:00
parent 62603dd2bc
commit 4cb82ad5a7
2 changed files with 10 additions and 1 deletions

View File

@@ -2,8 +2,14 @@ package p;
import java.util.*;
import java.util.function.*;
import java.util.stream.*;
import java.util.stream.LongStream;
import java.util.stream.IntStream;
import java.util.stream.DoubleStream;
import java.util.stream.Collector;
/**
* This is a stub implementation of the Java Stream API.
*/
public class Stream<T> {
// MaD=p;Stream;true;iterator;();;Argument[-1].Element;ReturnValue.Element;value;generated

View File

@@ -19,6 +19,9 @@ public class TypeBasedComplex<T> {
return null;
}
// A method that doesn't mention `T` in its type signature.
// This is for testing that we don't generate a summary that involves the
// implicit field for `T`.
// MaD=p;TypeBasedComplex;true;apply2;(Object,Function);;Argument[0];Argument[1].Parameter[0];value;generated
// MaD=p;TypeBasedComplex;true;apply2;(Object,Function);;Argument[1].ReturnValue;ReturnValue;value;generated
public <T1, T2> T2 apply2(T1 x, Function<T1, T2> f) {