Interface SourceIDAttribute

All Superinterfaces:
Attribute<SourceIDAttribute>, ClassElement, ClassfileElement, WritableElement<SourceIDAttribute>
All Known Implementing Classes:
BoundAttribute.BoundSourceIDAttribute, UnboundAttribute.UnboundSourceIDAttribute

Models the SourceFile attribute (@@@ reference needed), which can appear on classes. Delivered as a ClassElement when traversing a ClassModel.
  • 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