APIdia Launch Partner
Top Description Methods
java.lang.classfile.attribute

public sealed Interface CompilationIDAttribute

extends Attribute<CompilationIDAttribute>, ClassElement
permits BoundCompilationIDAttribute, UnboundCompilationIDAttribute
Known Direct Implementers
jdk.internal.classfile.impl.BoundAttribute.BoundCompilationIDAttribute, jdk.internal.classfile.impl.UnboundAttribute.UnboundCompilationIDAttribute
Imports
java.lang.classfile.Attribute, .AttributeMapper, .AttributeMapper.AttributeStability, .Attributes, .ClassElement, java.lang.classfile.constantpool.Utf8Entry, jdk.internal.classfile.impl.BoundAttribute, .TemporaryConstantPool, .UnboundAttribute

Models the CompilationID attribute, which records the compilation time of the class file.

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
Attributes#compilationId(), CharacterRangeTableAttribute, SourceIDAttribute

Method Summary

Modifier and TypeMethod and Description
public Utf8Entry

Returns:

the compilation ID
compilationId
()

Returns the compilation ID. The compilation ID is the string value of System#currentTimeMillis() when the class file is generated.

public static CompilationIDAttribute

Returns:

a CompilationID attribute
of
(Utf8Entry
the compilation ID
id
)

Returns a CompilationID attribute.

public static CompilationIDAttribute

Returns:

a CompilationID attribute
of
(String
the compilation ID
id
)

Returns a CompilationID attribute.

Inherited from java.lang.classfile.Attribute:
attributeMapperattributeName

Method Detail

compilationIdback to summary
public Utf8Entry compilationId()

Returns the compilation ID. The compilation ID is the string value of System#currentTimeMillis() when the class file is generated.

Returns:Utf8Entry

the compilation ID

ofback to summary
public static CompilationIDAttribute of(Utf8Entry id)

Returns a CompilationID attribute.

Parameters
id:Utf8Entry

the compilation ID

Returns:CompilationIDAttribute

a CompilationID attribute

ofback to summary
public static CompilationIDAttribute of(String id)

Returns a CompilationID attribute.

Parameters
id:String

the compilation ID

Returns:CompilationIDAttribute

a CompilationID attribute