- All Superinterfaces:
Attribute<SourceFileAttribute>,ClassElement,ClassFileElement,WritableElement<SourceFileAttribute>
- All Known Implementing Classes:
BoundAttribute.BoundSourceFileAttribute,UnboundAttribute.UnboundSourceFileAttribute
public sealed interface SourceFileAttribute
extends Attribute<SourceFileAttribute>, ClassElement
permits 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 Summary
Modifier and TypeMethodDescriptionstatic SourceFileAttributeReturns a source file attribute.static SourceFileAttributeReturns a source file attribute.Returns the name of the source file from which this class was compiled.Methods inherited from interface org.glavo.classfile.Attribute
attributeMapper, attributeNameMethods inherited from interface org.glavo.classfile.WritableElement
writeTo
-
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
Returns a source file attribute.- Parameters:
sourceFile- the source file name- Returns:
- a source file attribute
-
of
Returns a source file attribute.- Parameters:
sourceFile- the source file name- Returns:
- a source file attribute
-