Module java.base
Package java.lang.classfile

# Interface Interfaces

≠
public abstract sealed interface Interfaces
extends java.lang.classfile.ClassElement
permits jdk.internal.classfile.impl.InterfacesImpl
Comparing master and cf

All Superinterfaces:
  `ClassElement, ClassFileElement`

public sealed interface Interfaces extends ClassElement
Models the interfaces (JVMS 4.1) of a class. Delivered as a `ClassElement` when traversing a `ClassModel` .

Since:
  24

An `Interfaces` appears at most once in a `ClassModel` : if it does not appear, the class has no interfaces, which is equivalent to an `Interfaces` whose `interfaces()` returns an empty list. A `ClassBuilder` sets the interfaces to an empty list if the interfaces is not supplied.

See Java Virtual Machine Specification:
  4.1 The `ClassFile` Structure
Since:
  24
See Also:
  - `ClassModel.interfaces()`
  - `ClassBuilder.withInterfaces(List)`

## Methods

- ≠
  public abstract java.util.List<java.lang.classfile.constantpool.ClassEntry> interfaces()
  Comparing master and cf

  ### interfaces

  List<ClassEntry> interfaces()
  Returns the interfaces of this class, may be empty.
  Returns:
    the interfaces of this class, may be empty
- =
  public static java.lang.classfile.Interfaces of(java.lang.classfile.constantpool.ClassEntry[] arg0)
- =
  public static java.lang.classfile.Interfaces of(java.util.List<java.lang.classfile.constantpool.ClassEntry> arg0)
- =
  public static java.lang.classfile.Interfaces ofSymbols(java.lang.constant.ClassDesc[] arg0)
- ≠
  public static java.lang.classfile.Interfaces ofSymbols(java.util.List<java.lang.constant.ClassDesc> arg0)
  Comparing master and cf

  ### ofSymbols

  static Interfaces ofSymbols (List<ClassDesc> interfaces)
  Returns an Interfaces element.
  Parameters:
    `interfaces` - the interfaces
  Returns:
    an Interfaces element
  Throws:
    `IllegalArgumentException` - if any of `interfaces` is primitive

## Summary

Differences
| Elements | Comments | Descriptions | Total
Added | Changed | Removed | Added | Changed | Removed | Added | Changed | Removed
--- | --- | --- | --- | --- | --- | --- | --- | ---
Interfaces |  |  |  |  |  |  | 5 |  | 5 | 10
interfaces() |  |  |  |  |  |  | 4 |  |  | 4
ofSymbols(List) |  |  |  |  |  |  | 4 |  |  | 4
Total |  |  |  |  |  |  | 13 |  | 5 | 18