src/jdk.compiler/share/classes/com/sun/source/tree/TypeParameterTree.java

Print this page




  29 import javax.lang.model.element.Name;
  30 
  31 /**
  32  * A tree node for a type parameter.
  33  *
  34  * For example:
  35  * <pre>
  36  *   <em>name</em>
  37  *
  38  *   <em>name</em> extends <em>bounds</em>
  39  *
  40  *   <em>annotations</em> <em>name</em>
  41  * </pre>
  42  *
  43  * @jls section 4.4
  44  *
  45  * @author Peter von der Ah&eacute;
  46  * @author Jonathan Gibbons
  47  * @since 1.6
  48  */
  49 @jdk.Exported
  50 public interface TypeParameterTree extends Tree {
  51     /**
  52      * Returns the name of the type parameter.
  53      * @return the name
  54      */
  55     Name getName();
  56 
  57     /**
  58      * Returns the bounds of the type parameter.
  59      * @return the bounds
  60      */
  61     List<? extends Tree> getBounds();
  62 
  63     /**
  64      * Returns annotations on the type parameter declaration.
  65      *
  66      * Annotations need Target meta-annotations of
  67      * {@link java.lang.annotation.ElementType#TYPE_PARAMETER} or
  68      * {@link java.lang.annotation.ElementType#TYPE_USE}
  69      * to appear in this position.


  29 import javax.lang.model.element.Name;
  30 
  31 /**
  32  * A tree node for a type parameter.
  33  *
  34  * For example:
  35  * <pre>
  36  *   <em>name</em>
  37  *
  38  *   <em>name</em> extends <em>bounds</em>
  39  *
  40  *   <em>annotations</em> <em>name</em>
  41  * </pre>
  42  *
  43  * @jls section 4.4
  44  *
  45  * @author Peter von der Ah&eacute;
  46  * @author Jonathan Gibbons
  47  * @since 1.6
  48  */

  49 public interface TypeParameterTree extends Tree {
  50     /**
  51      * Returns the name of the type parameter.
  52      * @return the name
  53      */
  54     Name getName();
  55 
  56     /**
  57      * Returns the bounds of the type parameter.
  58      * @return the bounds
  59      */
  60     List<? extends Tree> getBounds();
  61 
  62     /**
  63      * Returns annotations on the type parameter declaration.
  64      *
  65      * Annotations need Target meta-annotations of
  66      * {@link java.lang.annotation.ElementType#TYPE_PARAMETER} or
  67      * {@link java.lang.annotation.ElementType#TYPE_USE}
  68      * to appear in this position.