public @Nullable List<StructRecordComponent> getRecordComponents() {
    StructRecordAttribute recordAttr = getAttribute(StructGeneralAttribute.ATTRIBUTE_RECORD);
    if (recordAttr == null) {
      // If our class extends j.l.Record but also has no components, it's probably malformed.
      // Force processing as a record anyway, in the hopes that we can come to a better result.
      if (this.superClass != null && this.superClass.getString().equals("java/lang/Record")) {
        return new ArrayList<>();
      }

      return null;
    }
    return recordAttr.getComponents();
  }
@return list of record components; null if this class is not a record
src/org/jetbrains/java/decompiler/struct/StructClass.java