Interface SourceIDAttribute
- All Superinterfaces:
AttributePREVIEW<SourceIDAttribute>, ClassElementPREVIEW, ClassFileElement
public sealed interface SourceIDAttribute
extends AttributePREVIEW<SourceIDAttribute>, ClassElementPREVIEW
Models the
SourceID attribute, which records
the last modified time 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.
This attribute is not predefined in the Java SE Platform. This is a
JDK-specific nonstandard attribute produced by the reference implementation
of the system Java compiler, defined by the jdk.compiler module.
- Since:
- 24
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic SourceIDAttributeReturns aSourceIDattribute.static SourceIDAttributeReturns aSourceIDattribute.sourceId()Returns the source id.Methods declared in interface AttributePREVIEW
attributeMapper, attributeNameModifier and TypeMethodDescriptionReturns theAttributeMapperassociated with this attribute.Returns the name of the attribute.
-
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 file system, in milliseconds) when thisclassfile is compiled.- Returns:
- the source id
-
of
Returns aSourceIDattribute.- Parameters:
sourceId- the source id- Returns:
- a
SourceIDattribute
-
of
Returns aSourceIDattribute.- Parameters:
sourceId- the source id- Returns:
- a
SourceIDattribute
-