# Interface ClassTree

All Superinterfaces:
  `StatementTree, Tree`

public interface ClassTree extends StatementTree
A tree node for a class, interface, enum, record, or annotation type declaration. For example:

      modifiers class simpleName typeParameters
          extends extendsClause
          implements implementsClause
      {
          members
      }

See Java Language Specification:
  8.1 Class Declarations
  8.9 Enum Classes
  8.10 Record Classes
  9.1 Interface Declarations
  9.6 Annotation Interfaces
Since:
  1.6

- ## 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

  Modifier and Type
  Method
  Description
  `Tree`
  `getExtendsClause()`
  Returns the supertype of this type declaration, or `null` if none is provided.
  `List<? extends Tree>`
  `getImplementsClause()`
  Returns the interfaces implemented by this type declaration.
  `List<? extends Tree>`
  `getMembers()`
  Returns the members declared in this type declaration.
  `ModifiersTree`
  `getModifiers()`
  Returns the modifiers, including any annotations, for this type declaration.
  `default List<? extends Tree>`
  `getPermitsClause()`
  Returns the subclasses permitted by this type declaration.
  `Name`
  `getSimpleName()`
  Returns the simple name of this type declaration.
  `List<? extends TypeParameterTree>`
  `getTypeParameters()`
  Returns any type parameters of this type declaration.

  ### 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.

- ## Method Details

  - ### getModifiers

    ModifiersTree getModifiers()
    Returns the modifiers, including any annotations, for this type declaration.
    Returns:
      the modifiers

  - ### getSimpleName

    Name getSimpleName()
    Returns the simple name of this type declaration.
    Returns:
      the simple name

  - ### getTypeParameters

    List<? extends TypeParameterTree> getTypeParameters()
    Returns any type parameters of this type declaration.
    Returns:
      the type parameters

  - ### getExtendsClause

    Tree getExtendsClause()
    Returns the supertype of this type declaration, or `null` if none is provided.
    Returns:
      the supertype

  - ### getImplementsClause

    List<? extends Tree> getImplementsClause()
    Returns the interfaces implemented by this type declaration.
    Returns:
      the interfaces

  - ### getPermitsClause

    default List<? extends Tree> getPermitsClause()
    Returns the subclasses permitted by this type declaration.
    Implementation Requirements:
      this implementation returns an empty list
    Returns:
      the subclasses
    Since:
      17

  - ### getMembers

    List<? extends Tree> getMembers()
    Returns the members declared in this type declaration.
    Returns:
      the members