Preview
Second Preview of ClassFile API (JEP 466).
Programs can only use ModulePackagesAttribute
when preview features are enabled.
Preview features may be removed in a future release,
or upgraded to permanent features of the Java platform.
ModulePackages
attribute 4.7.26, 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 static ModulePackagesAttribute | Returns: aModulePackages attributethe packages packages)Returns a |
public static ModulePackagesAttribute | Returns: aModulePackages attributethe packages packages)Returns a |
public static ModulePackagesAttribute | Returns: aModulePackages attributethe packages packages)Returns a |
public static ModulePackagesAttribute | Returns: aModulePackages attributethe packages packages)Returns a |
public List | Returns: the packages that are opened or exported by this moduleReturns the packages that are opened or exported by this module. |
of | back to summary |
---|---|
public static ModulePackagesAttribute of(List<PackageEntry> packages) Returns a
|
of | back to summary |
---|---|
public static ModulePackagesAttribute of(PackageEntry... packages) Returns a
|
ofNames | back to summary |
---|---|
public static ModulePackagesAttribute ofNames(List<PackageDesc> packages) Returns a
|
ofNames | back to summary |
---|---|
public static ModulePackagesAttribute ofNames(PackageDesc... packages) Returns a
|
packages | back to summary |
---|---|
public List Returns the packages that are opened or exported by this module.
|