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

# Interface AnyPatternTree

All Superinterfaces:
  `PatternTree, Tree`

public interface AnyPatternTree extends PatternTree
A tree node for a binding pattern that matches a pattern with a variable of any name and a type of the match candidate; an unnamed pattern. For example the use of underscore `_` below:

      if (r instanceof R(_)) {}

See Java Language Specification:
  14.30.1 Kinds of Patterns
Since:
  22

- ## Nested Class Summary

  ### Nested classes/interfaces declared in interface Tree

  `Tree.Kind`
  Modifier and Type
  Interface
  Description
  `static enum`
  `Tree.Kind`
  Enumerates all kinds of trees.

- ## Method Summary

  ### Methods declared in interface Tree

  `accept, getKind`
  Modifier and Type
  Method
  Description
  `<R,D> R`
  `accept(TreeVisitor<R,D> visitor, D data)`
  Accept method used to implement the visitor pattern.
  `Tree.Kind`
  `getKind()`
  Returns the kind of this tree.