Interface SourceFileAttribute

All Superinterfaces:
Attribute<SourceFileAttribute>, ClassElement, ClassFileElement, WritableElement<SourceFileAttribute>
All Known Implementing Classes:
BoundAttribute.BoundSourceFileAttribute, UnboundAttribute.UnboundSourceFileAttribute

Models the SourceFile 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:
22
  • Method Details

    • sourceFile

      Utf8Entry sourceFile()
      Returns the name of the source file from which this class was compiled.
      Returns:
      the name of the source file from which this class was compiled
    • of

      static SourceFileAttribute of(String sourceFile)
      Returns a source file attribute.
      Parameters:
      sourceFile - the source file name
      Returns:
      a source file attribute
    • of

      static SourceFileAttribute of(Utf8Entry sourceFile)
      Returns a source file attribute.
      Parameters:
      sourceFile - the source file name
      Returns:
      a source file attribute