Module java.base
Package java.lang.classfile.attribute

# Interface ModuleMainClassAttribute

≠
public abstract sealed interface ModuleMainClassAttribute
extends java.lang.classfile.Attribute<java.lang.classfile.attribute.ModuleMainClassAttribute>, java.lang.classfile.ClassElement
permits jdk.internal.classfile.impl.BoundAttribute.BoundModuleMainClassAttribute, jdk.internal.classfile.impl.UnboundAttribute.UnboundModuleMainClassAttribute
Comparing jdk-master and valhalla-csr-open

All Superinterfaces:
  `AttributePREVIEW <ModuleMainClassAttribute>, ClassElementPREVIEW , ClassFileElement`

public sealed interface ModuleMainClassAttribute extends AttributePREVIEW <ModuleMainClassAttribute>, ClassElementPREVIEW
Models the `ModuleMainClass` attribute (JVMS §4.7.27), which appears on classes that represent module descriptors to indicate the main class of the module.

This attribute only appears on classes, and does not permit multiple instances in a class. It has a data dependency on the constant pool.

The attribute was introduced in the Java SE Platform version 9, major version 53.

See Java Virtual Machine Specification:
  4.7.27 The `ModuleMainClass` Attribute
Since:
  24
See Also:
  - `Attributes.moduleMainClass()`
  - `ModuleDescriptor.mainClass()`

## Methods

- =
  public abstract java.lang.classfile.constantpool.ClassEntry mainClass()
- =
  public static java.lang.classfile.attribute.ModuleMainClassAttribute of(java.lang.classfile.constantpool.ClassEntry arg0)
- =
  public static java.lang.classfile.attribute.ModuleMainClassAttribute of(java.lang.constant.ClassDesc arg0)

## Summary

Differences
| Elements | Comments | Descriptions | Total
Added | Changed | Removed | Added | Changed | Removed | Added | Changed | Removed
--- | --- | --- | --- | --- | --- | --- | --- | ---
ModuleMainClassAttribute |  |  |  |  |  |  | 4 |  |  | 4
Total |  |  |  |  |  |  | 4 |  |  | 4