Preview
Second Preview of ClassFile API (JEP 466).
Programs can only use ModuleMainClassAttribute
when preview features are enabled.
Preview features may be removed in a future release,
or upgraded to permanent features of the Java platform.
ModuleMainClass
attribute 4.7.27, which can
appear on classes that represent module descriptors.
Delivered as a java.lang.classfile.ClassElement
when
traversing the elements of a java.lang.classfile.ClassModel
.
The attribute does not permit multiple instances in a given location. Subsequent occurrence of the attribute takes precedence during the attributed element build or transformation.
The attribute was introduced in the Java SE Platform version 9.
Modifier and Type | Method and Description |
---|---|
public ClassEntry | |
public static ModuleMainClassAttribute | Returns: aModuleMainClass attributethe main class mainClass)Returns a |
public static ModuleMainClassAttribute |
mainClass | back to summary |
---|---|
public ClassEntry mainClass() Returns main class for this module.
|
of | back to summary |
---|---|
public static ModuleMainClassAttribute of(ClassEntry mainClass) Returns a
|
of | back to summary |
---|---|
public static ModuleMainClassAttribute of(ClassDesc mainClass) Returns a
|