Package org.apache.bcel.classfile

# Class RecordComponentInfo

java.lang.Object
org.apache.bcel.classfile.RecordComponentInfo

All Implemented Interfaces:
  `Node`

public class RecordComponentInfo extends Object implements Node
Record component info from a record. Instances from this class maps every component from a given record.

Since:
  6.9.0
See Also:
  - The Java Virtual Machine Specification, Java SE 14 Edition, Records (preview)

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RecordComponentInfo(DataInput input, ConstantPool constantPool)`
  Constructs a new instance from an input stream.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `accept(Visitor v)`
  `void`
  `dump(DataOutputStream file)`
  Dumps contents into a file stream in binary format.
  `Attribute[]`
  `getAttributes()`
  Gets all attributes.
  `ConstantPool`
  `getConstantPool()`
  Gets the constant pool.
  `int`
  `getDescriptorIndex()`
  Gets the description index.
  `int`
  `getIndex()`
  Gets the name index.
  `String`
  `toString()`
  Converts this instance to a String suitable for debugging.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### RecordComponentInfo

    public RecordComponentInfo(DataInput input, ConstantPool constantPool) throws IOException
    Constructs a new instance from an input stream.
    Parameters:
      `input` - Input stream
      `constantPool` - Array of constants
    Throws:
      `IOException` - if an I/O error occurs.

- ## Method Details

  - ### accept

    public void accept(Visitor v)
    Specified by:
      `accept` in interface `Node`

  - ### dump

    public void dump(DataOutputStream file) throws IOException
    Dumps contents into a file stream in binary format.
    Parameters:
      `file` - Output file stream
    Throws:
      `IOException` - if an I/O error occurs.

  - ### getAttributes

    public Attribute[] getAttributes()
    Gets all attributes.
    Returns:
      all attributes.

  - ### getConstantPool

    public ConstantPool getConstantPool()
    Gets the constant pool.
    Returns:
      Constant pool.

  - ### getDescriptorIndex

    public int getDescriptorIndex()
    Gets the description index.
    Returns:
      index in constant pool of this record component descriptor.

  - ### getIndex

    public int getIndex()
    Gets the name index.
    Returns:
      index in constant pool of this record component name.

  - ### toString

    public String toString()
    Converts this instance to a String suitable for debugging.
    Overrides:
      `toString` in class `Object`
    Returns:
      a String suitable for debugging.