Interface RecordComponentInfo

All Superinterfaces:
AnnotationTarget, DeclarationInfo

public interface RecordComponentInfo extends DeclarationInfo
A record component, declared in some record.
Since:
4.0
  • Method Details

    • name

      String name()
      Returns the name of this record component.
      Returns:
      the name of this record component, never null
    • type

      Type type()
      Returns the type of this record component.
      Returns:
      the type of this record component, never null
    • field

      FieldInfo field()
      Returns the field corresponding to this record component.
      Returns:
      the field, never null
    • accessor

      MethodInfo accessor()
      Returns the accessor method corresponding to this record component.
      Returns:
      the accessor method, never null
    • declaringRecord

      ClassInfo declaringRecord()
      Returns the record that declares this component.
      Returns:
      the record that declares this component, never null
    • kind

      default DeclarationInfo.Kind kind()
      Description copied from interface: DeclarationInfo
      Returns the kind of this declaration.
      Specified by:
      kind in interface DeclarationInfo
      Returns:
      the kind of this declaration
    • asRecordComponent

      default RecordComponentInfo asRecordComponent()
      Description copied from interface: DeclarationInfo
      Returns this declaration as a record component.
      Specified by:
      asRecordComponent in interface DeclarationInfo
      Returns:
      this record component, never null