1 /*
   2  * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package pkg1;
  25 
  26 import java.util.List;
  27 
  28 /**
  29  * An implementor
  30  *
  31  */
  32 public class C10 extends UsedClass implements UsedInterface, UsedInterfaceA {
  33 
  34     /**
  35      * Nothing
  36      */
  37     public void doNothing() {}
  38 
  39     /**
  40      * Me too
  41      */
  42     public void doNothingA() {}
  43 
  44     /**
  45      * returns a collection with type param
  46      * @return something
  47      */
  48     public List<? extends UsedClass> foo(){return null;}
  49 
  50     /**
  51      * returns and takes type param variants
  52      * @param <T> yeah
  53      * @return returns a type param
  54      */
  55     public <T extends UsedInterface<? super T>> UsedInterfaceA<T> withTypeParametersOfType(Class<? extends UsedInterface> c){return null;}
  56 
  57     /**
  58      * returns a type param
  59      * @param <T> a param
  60      * @return something
  61      */
  62     public <T extends UsedInterface>T[] withReturningTypeParameters(){return null;}
  63 
  64     /**
  65      * a return a type parameter, as a static method
  66      * @param <T> a type param
  67      * @param enumType something
  68      * @param name something
  69      * @return a trype param
  70      */
  71     public static <T extends UsedInterface<T>> T withReturnVariant(Class<T> enumType, String name){return null;}
  72 
  73     /**
  74      * another variant of a method returning type parameters
  75      * @param <T> something
  76      * @param listenerInterface something
  77      * @param target something
  78      * @param action something
  79      * @return a type param
  80      */
  81     public <T> T create(UsedInterfaceA<T> listenerInterface, UsedInterface target, String action){return null;}
  82 
  83     /**
  84      * input is an array
  85      * @param elements a vararg
  86      */
  87     public void addAll(UsedInterface... elements) {}
  88 }