Interface ModuleResolutionAttribute

All Superinterfaces:
Attribute<ModuleResolutionAttribute>, ClassElement, ClassfileElement, WritableElement<ModuleResolutionAttribute>
All Known Implementing Classes:
BoundAttribute.BoundModuleResolutionAttribute, UnboundAttribute.UnboundModuleResolutionAttribute

Models the ModuleResolution attribute, which can appear on classes that represent module descriptors. This is a JDK-specific * attribute, which captures resolution metadata for modules. Delivered as a ClassElement when traversing the elements of a ClassModel.

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)
  }
  
  • Method Summary

    Modifier and Type
    Method
    Description
    of(int resolutionFlags)
    Returns a ModuleResolution attribute.
    int
    The value of the resolution_flags item is a mask of flags used to denote properties of module resolution.

    Methods inherited from interface org.glavo.classfile.Attribute

    attributeMapper, attributeName

    Methods inherited from interface org.glavo.classfile.WritableElement

    writeTo
  • Method Details

    • resolutionFlags

      int resolutionFlags()
      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)
    • of

      static ModuleResolutionAttribute of(int resolutionFlags)
      Returns a ModuleResolution attribute.
      Parameters:
      resolutionFlags - the resolution falgs
      Returns:
      a ModuleResolution attribute