import org.jspecify.annotations.NonNull; import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.Nullable; import java.util.Collections; import java.util.List; interface Super { List test1(List param); List<@NonNull String> test2(List<@NonNull String> param); List<@Nullable String> test3(List<@Nullable String> param); @NonNull List test4(@NonNull List param); @NonNull List<@NonNull String> test5(@NonNull List<@NonNull String> param); @NonNull List<@Nullable String> test6(@NonNull List<@Nullable String> param); @Nullable List test7(@Nullable List param); @Nullable List<@NonNull String> test8(@Nullable List<@NonNull String> param); @Nullable List<@Nullable String> test9(@Nullable List<@Nullable String> param); } @NullMarked public class SubClass implements Super { @Override public List test1(List param) { return Collections.emptyList(); } @Override public List test2(List param) { return Collections.emptyList(); } @Override public List<@Nullable String> test3(List<@Nullable String> param) { return Collections.emptyList(); } @Override public List test4(List param) { return Collections.emptyList(); } @Override public List test5(List param) { return Collections.emptyList(); } @Override public List<@Nullable String> test6(List<@Nullable String> param) { return Collections.emptyList(); } @Override public @Nullable List test7(@Nullable List param) { return Collections.emptyList(); } @Override public @Nullable List test8(@Nullable List param) { return Collections.emptyList(); } @Override public @Nullable List<@Nullable String> test9(@Nullable List<@Nullable String> param) { return Collections.emptyList(); } }