Interface RecordComponentInfo
- All Superinterfaces:
AttributedElement, ClassFileElement
public sealed interface RecordComponentInfo extends AttributedElement
RecordAttribute. SignatureAttribute, RuntimeVisibleAnnotationsAttribute, RuntimeInvisibleAnnotationsAttribute, RuntimeVisibleTypeAnnotationsAttribute, and RuntimeInvisibleTypeAnnotationsAttribute are the only predefined attributes that may exist on record components.
- See Java Virtual Machine Specification:
- 4.7.30 The
RecordAttribute
- Since:
- 24
- See Also:
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
Utf8Entry |
descriptor() |
Returns the field descriptor string of this component. |
default ClassDesc |
descriptorSymbol() |
Returns the symbolic field descriptor of this component. |
Utf8Entry |
name() |
Returns the name of this component. |
static RecordComponentInfo |
of |
Returns a record component description. |
static RecordComponentInfo |
of |
Returns a record component description. |
static RecordComponentInfo |
of |
Returns a record component description. |
static RecordComponentInfo |
of |
Returns a record component description. |
Methods declared in interface AttributedElement
attributes, findAttribute, findAttributes
Method Details
name
Utf8Entry name()
- Returns:
- the name of this component
- See Also:
descriptor
Utf8Entry descriptor()
- API Note:
- A record component may have a generic type; this information is stored in the
Signatureattribute in this component. - Returns:
- the field descriptor string of this component
- See Also:
descriptorSymbol
default ClassDesc descriptorSymbol()
- API Note:
- A record component may have a generic type; this information is stored in the
Signatureattribute in this component. - Returns:
- the symbolic field descriptor of this component
- See Also:
of
static RecordComponentInfo of(Utf8Entry name, Utf8Entry descriptor, List<Attribute<?>> attributes)
- Parameters:
-
name- the component name -
descriptor- the component field descriptor string -
attributes- the component attributes - Returns:
- a record component description
of
static RecordComponentInfo of(Utf8Entry name, Utf8Entry descriptor, Attribute<?>... attributes)
- Parameters:
-
name- the component name -
descriptor- the component field descriptor sting -
attributes- the component attributes - Returns:
- a record component description
of
static RecordComponentInfo of(String name, ClassDesc descriptor, List<Attribute<?>> attributes)
- Parameters:
-
name- the component name -
descriptor- the component symbolic field descriptor -
attributes- the component attributes - Returns:
- a record component description
of
static RecordComponentInfo of(String name, ClassDesc descriptor, Attribute<?>... attributes)
- Parameters:
-
name- the component name -
descriptor- the component symbolic field descriptor -
attributes- the component attributes - Returns:
- a record component description
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/classfile/attribute/RecordComponentInfo.html