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

# Interface ModuleResolutionAttribute

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

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

public sealed interface ModuleResolutionAttribute extends AttributePREVIEW <ModuleResolutionAttribute>, ClassElementPREVIEW
Models the `ModuleResolution` attribute, which can appear on classes that represent module descriptors, to capture resolution metadata for modules.

The specification of the `ModuleResolution` attribute is:

     ModuleResolution_attribute {
       u2 attribute_name_index;    // "ModuleResolution"
       u4 attribute_length;        // 2
       u2 resolution_flags;

     The value of the resolution_flags item is a mask of flags used to denote
     properties of module resolution. The flags are as follows:

      // Optional
      0x0001 (DO_NOT_RESOLVE_BY_DEFAULT)

      // At most one of:
      0x0002 (WARN_DEPRECATED)
      0x0004 (WARN_DEPRECATED_FOR_REMOVAL)
      0x0008 (WARN_INCUBATING)
     }

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

This attribute is not predefined in the Java SE Platform. This is a JDK-specific nonstandard attribute produced by the `jdk.jlink` module, which defines the `jlink` and `jmod` tools.

Since:
  24
See Also:
  - `Attributes.moduleResolution()`
  - `ModuleHashesAttribute`
  - `ModuleTargetAttribute`

## Methods

- =
  public static java.lang.classfile.attribute.ModuleResolutionAttribute of(int arg0)
- =
  public abstract int resolutionFlags()

## Summary

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