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

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

# Interface BindingPatternTree

All Superinterfaces:
  `PatternTree`, `Tree`

    public interface BindingPatternTree
    extends PatternTree

This interface is associated with pattern matching for instanceof, a preview feature of the Java language. Preview features may be removed in a future release, or upgraded to permanent features of the Java language.
A binding pattern tree

Since:
  14

- ## Nested Class Summary

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

  `Tree.Kind`

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `Name` | `getBinding()` | A binding variable name.
  `Tree` | `getType()` | Returns the type of the bind variable.

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

  `accept, getKind`

- ## Method Details

  - ### getType

    Tree getType()
    Returns the type of the bind variable.
    Returns:
      the type

  - ### getBinding

    Name getBinding()
    A binding variable name.
    Returns:
      the name of the binding variable