Interface CompilationIDAttribute
- All Superinterfaces:
Attribute<CompilationIDAttribute>
,ClassElement
,ClassFileElement
public sealed interface CompilationIDAttribute
extends Attribute<CompilationIDAttribute>, ClassElement
Models the
CompilationID
attribute (@@@ need reference), which can
appear on classes and records the compilation time of the class. Delivered
as a ClassElement
when traversing the elements of
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:
- 24
-
Method Summary
Modifier and TypeMethodDescriptionReturns the compilation ID.static CompilationIDAttribute
Returns aCompilationID
attribute.static CompilationIDAttribute
Returns aCompilationID
attribute.Methods declared in interface java.lang.classfile.Attribute
attributeMapper, attributeName
-
Method Details
-
compilationId
Utf8Entry compilationId()Returns the compilation ID. The compilation ID is the value ofSystem.currentTimeMillis()
when the classfile is generated.- Returns:
- the compilation ID
-
of
Returns aCompilationID
attribute.- Parameters:
id
- the compilation ID- Returns:
- a
CompilationID
attribute
-
of
Returns aCompilationID
attribute.- Parameters:
id
- the compilation ID- Returns:
- a
CompilationID
attribute
-