Interface SourceIDAttribute

All Superinterfaces:
Attribute<SourceIDAttribute>, ClassElement, ClassFileElement

public sealed interface SourceIDAttribute extends Attribute<SourceIDAttribute>, ClassElement
Models the SourceID attribute, which can appear on classes. Delivered as a ClassElement when traversing a 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.

Since:
24
  • Method Details

    • sourceId

      Utf8Entry sourceId()
      Returns the source id. The source id is the last modified time of the source file (as reported by the filesystem, in milliseconds) when the classfile is compiled.
      Returns:
      the source id
    • of

      static SourceIDAttribute of(Utf8Entry sourceId)
      Returns a SourceID attribute.
      Parameters:
      sourceId - the source id
      Returns:
      a SourceID attribute
    • of

      static SourceIDAttribute of(String sourceId)
      Returns a SourceID attribute.
      Parameters:
      sourceId - the source id
      Returns:
      a SourceID attribute