Interface StreamedFieldsProvider

All Known Implementing Classes:
PublicStreamedFieldsProvider
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface StreamedFieldsProvider
  • Method Summary

    Modifier and Type
    Method
    Description
    List of all "declared" streamed fields for a given class ("declared" fields does not include fields in parent classes).
  • Method Details

    • getDeclaredStreamedFields

      List<Field> getDeclaredStreamedFields(Class<?> clazz)
      List of all "declared" streamed fields for a given class ("declared" fields does not include fields in parent classes).

      Fields will be (de)serialized in same order as they present inside returned list.

      Note: it is not recommended to rely on the order of fields as they are returned by Class.getDeclaredFields(). Reason is because this method does not guarantee any order which would affect the (de)serialization process (for example Android 14 JVM returns fields in a different order than OpenJDK 17).