BinaryTree (Compiler Tree API )
Keywords: com.sun.source.tree.BinaryTree interface
Date: 2026-03-29

com.sun.source.tree

## Interface BinaryTree

- All Superinterfaces:
    ExpressionTree, Tree

      @Exported
      public interface BinaryTree
      extends ExpressionTree

  A tree node for a binary expression. Use `getKind` to determine the kind of operator. For example:

         leftOperand operator rightOperand

  Since:
    1.6
  See The Java™ Language Specification:
    sections 15.17 to 15.24

- - ### 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
    --- | ---
    `ExpressionTree` | `getLeftOperand()`
    `ExpressionTree` | `getRightOperand()`

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

      `accept, getKind`

- - ### Method Detail

    - #### getLeftOperand

          ExpressionTree getLeftOperand()

    - #### getRightOperand

          ExpressionTree getRightOperand()

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