Top Description Methods
com.sun.source.tree

public Interface ClassTree

extends StatementTree
Known Direct Implementers
com.sun.tools.javac.tree.JCTree.JCClassDecl
Imports
java.util.List, javax.lang.model.element.Name

A tree node for a class, interface, enum, record, or annotation type declaration. For example:
  modifiers class simpleName typeParameters
      extends extendsClause
      implements implementsClause
  {
      members
  }
Authors
Peter von der Ahé, Jonathan Gibbons
Since
1.6
Java Language Specification
8.1 Class Declarations, 8.9 Enum Types, 8.10 Record Types, 9.1 Interface Declarations, 9.6 Annotation Types

Method Summary

Modifier and TypeMethod and Description
public Tree

Returns:

the supertype
getExtendsClause
()

Returns the supertype of this type declaration, or null if none is provided.

public List<? extends Tree>

Returns:

the interfaces
getImplementsClause
()

Returns the interfaces implemented by this type declaration.

public List<? extends Tree>

Returns:

the members
getMembers
()

Returns the members declared in this type declaration.

public ModifiersTree

Returns:

the modifiers
getModifiers
()

Returns the modifiers, including any annotations, for this type declaration.

public default List<? extends Tree>

Returns:

the subclasses
getPermitsClause
()

Returns the subclasses permitted by this type declaration.

public Name

Returns:

the simple name
getSimpleName
()

Returns the simple name of this type declaration.

public List<? extends TypeParameterTree>

Returns:

the type parameters
getTypeParameters
()

Returns any type parameters of this type declaration.

Method Detail

getExtendsClauseback to summary
public Tree getExtendsClause()

Returns the supertype of this type declaration, or null if none is provided.

Returns:Tree

the supertype

getImplementsClauseback to summary
public List<? extends Tree> getImplementsClause()

Returns the interfaces implemented by this type declaration.

Returns:List<? extends Tree>

the interfaces

getMembersback to summary
public List<? extends Tree> getMembers()

Returns the members declared in this type declaration.

Returns:List<? extends Tree>

the members

getModifiersback to summary
public ModifiersTree getModifiers()

Returns the modifiers, including any annotations, for this type declaration.

Returns:ModifiersTree

the modifiers

getPermitsClauseback to summary
public default List<? extends Tree> getPermitsClause()

Returns the subclasses permitted by this type declaration.

Implementation Specification

this implementation returns an empty list

Returns:List<? extends Tree>

the subclasses

Since
17
getSimpleNameback to summary
public Name getSimpleName()

Returns the simple name of this type declaration.

Returns:Name

the simple name

getTypeParametersback to summary
public List<? extends TypeParameterTree> getTypeParameters()

Returns any type parameters of this type declaration.

Returns:List<? extends TypeParameterTree>

the type parameters