TypeParameterTree (Compiler Tree API )
Keywords: com.sun.source.tree.TypeParameterTree interface
Date: 2023-01-18

com.sun.source.tree

## Interface TypeParameterTree

- All Superinterfaces:
    Tree

      @Exported
      public interface TypeParameterTree
      extends Tree

  A tree node for a type parameter. For example:

         name

         name extends bounds

         annotations name

  Since:
    1.6
  See The Java™ Language Specification:
    section 4.4

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.sun.source.tree.Tree

      `Tree.Kind`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<? extends AnnotationTree>` | `getAnnotations()` Return annotations on the type parameter declaration.
    `List<? extends Tree>` | `getBounds()`
    `Name` | `getName()`

    - ### Methods inherited from interface com.sun.source.tree.Tree

      `accept, getKind`

- - ### Method Detail

    - #### getName

          Name getName()

    - #### getBounds

          List<? extends Tree> getBounds()

    - #### getAnnotations

          List<? extends AnnotationTree> getAnnotations()

      Return annotations on the type parameter declaration. Annotations need Target meta-annotations of `ElementType.TYPE_PARAMETER` or `ElementType.TYPE_USE` to appear in this position.
      Returns:
        annotations on the type parameter declaration
      Since:
        1.8

Copyright © 2005, 2023, Oracle and/or its affiliates. All rights reserved.