Superclass (Java SE 23 & JDK 23)
Description: declaration: module: java.base, package: java.lang.classfile, interface: Superclass
Keywords: java.lang.classfile.Superclass interface

# Interface Superclass

All Superinterfaces:
  `ClassElementPREVIEW`, `ClassFileElementPREVIEW`

public sealed interface Superclass extends ClassElementPREVIEW
`Superclass` is a preview API of the Java platform.
Programs can only use `Superclass` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models the superclass of a class. Delivered as a `ClassElement`PREVIEW when traversing a `ClassModel`PREVIEW.

Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static SuperclassPREVIEW`
  `of(ClassEntryPREVIEW superclassEntry)`
  Returns a SuperclassPREVIEW element.
  `ClassEntryPREVIEW`
  `superclassEntry()`
  Returns the superclass.

- ## Method Details

  - ### superclassEntry

    ClassEntryPREVIEW superclassEntry()
    Returns the superclass.
    Returns:
      the superclass

  - ### of

    static SuperclassPREVIEW of(ClassEntryPREVIEW superclassEntry)
    Returns a SuperclassPREVIEW element.
    Parameters:
      `superclassEntry` - the superclass
    Returns:
      a SuperclassPREVIEW element