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

# Interface SourceFileAttribute

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

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

public sealed interface SourceFileAttribute extends AttributePREVIEW <SourceFileAttribute>, ClassElementPREVIEW
Models the `SourceFile` attribute (JVMS §4.7.10), which indicates the name of the source file from which this `class` file was compiled.

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

The attribute was introduced in the Java SE Platform version 5.0, major version 49.

See Java Virtual Machine Specification:
  4.7.10 The `SourceFile` Attribute
Since:
  24
See Also:
  - `Attributes.sourceFile()`

## Methods

- =
  public static java.lang.classfile.attribute.SourceFileAttribute of(java.lang.String arg0)
- =
  public static java.lang.classfile.attribute.SourceFileAttribute of(java.lang.classfile.constantpool.Utf8Entry arg0)
- =
  public abstract java.lang.classfile.constantpool.Utf8Entry sourceFile()

## Summary

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