Preview
Second Preview of ClassFile API (JEP 466).
Programs can only use SourceIDAttribute
when preview features are enabled.
Preview features may be removed in a future release,
or upgraded to permanent features of the Java platform.
SourceID
attribute, which can
appear on classes. Delivered as a java.lang.classfile.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.
Modifier and Type | Method and Description |
---|---|
public static SourceIDAttribute | |
public static SourceIDAttribute | |
public Utf8Entry | Returns: the source idReturns the source id. The source id is the last modified time of the source file (as reported by the filesystem, in milliseconds) when the classfile is compiled. |
of | back to summary |
---|---|
public static SourceIDAttribute of(Utf8Entry sourceId) Returns a
|
of | back to summary |
---|---|
public static SourceIDAttribute of(String sourceId) Returns a
|
sourceId | back to summary |
---|---|
public Utf8Entry sourceId() Returns the source id. The source id is the last modified time of the source file (as reported by the filesystem, in milliseconds) when the classfile is compiled.
|