WildcardTree (Java SE 22 & JDK 22)
Description: declaration: module: jdk.compiler, package: com.sun.source.tree, interface: WildcardTree
Keywords: com.sun.source.tree.WildcardTree interface

Module jdk.compiler
Package com.sun.source.tree

# Interface WildcardTree

All Superinterfaces:
  `Tree`

public interface WildcardTree extends Tree
A tree node for a wildcard type argument. Use `getKind` to determine the kind of bound. For example:

       ?

       ? extends bound

       ? super bound

See Java Language Specification:
  4.5.1 Type Arguments of Parameterized Types
Since:
  1.6

- ## Nested Class Summary

  ### Nested classes/interfaces declared in interface com.sun.source.tree.Tree

  `Tree.Kind`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Tree`
  `getBound()`
  Returns the bound of the wildcard.

  ### Methods declared in interface com.sun.source.tree.Tree

  `accept, getKind`

- ## Method Details

  - ### getBound

    Tree getBound()
    Returns the bound of the wildcard.
    Returns:
      the bound