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.
SourceFile Attribute
Attributes#sourceFile()
| Modifier and Type | Method and Description |
|---|---|
| public static SourceFileAttribute | |
| public static SourceFileAttribute | |
| public Utf8Entry | Returns: the name of the source file from which this class was compiledReturns the name of the source file from which this class was compiled. |
| of | back to summary |
|---|---|
| public static SourceFileAttribute of(String sourceFile) Returns a source file attribute.
| |
| of | back to summary |
|---|---|
| public static SourceFileAttribute of(Utf8Entry sourceFile) Returns a source file attribute.
| |
| sourceFile | back to summary |
|---|---|
| public Utf8Entry sourceFile() Returns the name of the source file from which this class was compiled.
| |