Top Description Methods
java.lang.classfile.attribute

public sealed Interface RecordComponentInfo

extends AttributedElement
Known Direct Implementers
jdk.internal.classfile.impl.BoundRecordComponentInfo, jdk.internal.classfile.impl.UnboundAttribute.UnboundRecordComponentInfo
Annotations
@PreviewFeature
feature:CLASSFILE_API
Imports
java.lang.constant.ClassDesc, java.util.List, java.lang.classfile.Attribute, .AttributedElement, java.lang.classfile.constantpool.Utf8Entry, jdk.internal.classfile.impl.BoundRecordComponentInfo, .TemporaryConstantPool, .UnboundAttribute, jdk.internal.javac.PreviewFeature

Preview

Second Preview of ClassFile API (JEP 466).

Programs can only use RecordComponentInfo when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.

Models a single record component in the java.lang.classfile.attribute.RecordAttribute.
Since
22

Method Summary

Modifier and TypeMethod and Description
public Utf8Entry

Returns:

the field descriptor of this component
descriptor
()

Returns the field descriptor of this component.

public default ClassDesc

Returns:

the field descriptor of this component, as a ClassDesc
descriptorSymbol
()

Returns the field descriptor of this component, as a ClassDesc.

public Utf8Entry

Returns:

the name of this component
name
()

Returns the name of this component.

public static RecordComponentInfo

Returns:

a record component description
of
(Utf8Entry
the component name
name
,
Utf8Entry
the component field descriptor
descriptor
,
List<Attribute<?>>
the component attributes
attributes
)

Returns a record component description.

public static RecordComponentInfo

Returns:

a record component description
of
(Utf8Entry
the component name
name
,
Utf8Entry
the component field descriptor
descriptor
,
Attribute<?>...
the component attributes
attributes
)

Returns a record component description.

public static RecordComponentInfo

Returns:

a record component description
of
(String
the component name
name
,
ClassDesc
the component field descriptor
descriptor
,
List<Attribute<?>>
the component attributes
attributes
)

Returns a record component description.

public static RecordComponentInfo

Returns:

a record component description
of
(String
the component name
name
,
ClassDesc
the component field descriptor
descriptor
,
Attribute<?>...
the component attributes
attributes
)

Returns a record component description.

Inherited from java.lang.classfile.AttributedElement:
attributesfindAttributefindAttributes

Method Detail

descriptorback to summary
public Utf8Entry descriptor()

Returns the field descriptor of this component.

Returns:Utf8Entry

the field descriptor of this component

descriptorSymbolback to summary
public default ClassDesc descriptorSymbol()

Returns the field descriptor of this component, as a ClassDesc.

Returns:ClassDesc

the field descriptor of this component, as a ClassDesc

nameback to summary
public Utf8Entry name()

Returns the name of this component.

Returns:Utf8Entry

the name of this component

ofback to summary
public static RecordComponentInfo of(Utf8Entry name, Utf8Entry descriptor, List<Attribute<?>> attributes)

Returns a record component description.

Parameters
name:Utf8Entry

the component name

descriptor:Utf8Entry

the component field descriptor

attributes:List<Attribute<?>>

the component attributes

Returns:RecordComponentInfo

a record component description

ofback to summary
public static RecordComponentInfo of(Utf8Entry name, Utf8Entry descriptor, Attribute<?>... attributes)

Returns a record component description.

Parameters
name:Utf8Entry

the component name

descriptor:Utf8Entry

the component field descriptor

attributes:Attribute<?>[]

the component attributes

Returns:RecordComponentInfo

a record component description

ofback to summary
public static RecordComponentInfo of(String name, ClassDesc descriptor, List<Attribute<?>> attributes)

Returns a record component description.

Parameters
name:String

the component name

descriptor:ClassDesc

the component field descriptor

attributes:List<Attribute<?>>

the component attributes

Returns:RecordComponentInfo

a record component description

ofback to summary
public static RecordComponentInfo of(String name, ClassDesc descriptor, Attribute<?>... attributes)

Returns a record component description.

Parameters
name:String

the component name

descriptor:ClassDesc

the component field descriptor

attributes:Attribute<?>[]

the component attributes

Returns:RecordComponentInfo

a record component description