AssertTree (Compiler Tree API )
Keywords: com.sun.source.tree.AssertTree interface
Date: 2026-06-25

com.sun.source.tree

## Interface AssertTree

- All Superinterfaces:
    StatementTree, Tree

      @Exported
      public interface AssertTree
      extends StatementTree

  A tree node for an 'assert' statement. For example:

         assert condition ;

         assert condition : detail ;

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

- - ### 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` | `getCondition()`
    `ExpressionTree` | `getDetail()`

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

      `accept, getKind`

- - ### Method Detail

    - #### getCondition

          ExpressionTree getCondition()

    - #### getDetail

          ExpressionTree getDetail()

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