package test;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;

public class TypeParameterBoundExample {
    // extends Runnable produces T::List signature, so
    // @Nullable targets index=1 (optional class bound always counts)
    public static class ListConsumer<T extends @Nullable List<?>>
            implements Consumer<T> {
        @Override
        public void accept(T t) {
        }
    }

    // extends Runnable produces T:ArrayList signature since ArrayList is class
    public static class ArrayListConsumer<T extends @Nullable ArrayList<?>>
            implements Consumer<T> {
        @Override
        public void accept(T t) {
        }
    }

    // extends Runnable produces T:ArrayList signature since ArrayList is class
    public static class SerializableListConsumer<T extends @Nullable List<?> & @Untainted Serializable>
            implements Consumer<T> {
        @Override
        public void accept(T t) {
        }
    }

    // extends Runnable produces T:ArrayList signature since ArrayList is class
    public static class SerializableListConsumerDoubleA<T extends @Nullable @Untainted List<?> & @Untainted Serializable>
            implements Consumer<T> {
        @Override
        public void accept(T t) {
        }
    }
}

package test;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Supplier;

public class TypeParameterBoundExample {
    // extends Runnable produces T::List signature, so
    // @Nullable targets index=1 (optional class bound always counts)
    public static class ListConsumer<T extends @Nullable List<?>>
            implements Consumer<T> {
        @Override
        public void accept(T t) {
        }
    }

    // extends Runnable produces T:ArrayList signature since ArrayList is class
    public static class ArrayListConsumer<T extends @Nullable ArrayList<?>>
            implements Consumer<T> {
        @Override
        public void accept(T t) {
        }
    }

    // extends Runnable produces T:ArrayList signature since ArrayList is class
    public static class SerializableListConsumer<T extends @Nullable List<?> & @Untainted Serializable>
            implements Consumer<T> {
        @Override
        public void accept(T t) {
        }
    }

    // extends Runnable produces T:ArrayList signature since ArrayList is class
    public static class SerializableListConsumerDoubleA<T extends @Nullable @Untainted List<?> & @Untainted Serializable>
            implements Consumer<T> {
        @Override
        public void accept(T t) {
        }
    }

    public static class IteratorSupplier implements Supplier<Consumer<@Nullable Object[]>> {
        @Override
        public Consumer<@Nullable Object[]> get() {
            return new Consumer<@Nullable Object[]>() {
                @Override
                public void accept(@Nullable Object[] objects) {
                }
            };
        }
    }
}

Add cless extends type param example
Add cless extends type param example
