Interface DataFormat

All Known Subinterfaces:
CollectionDataFormat, MapDataFormat

public interface DataFormat
An object that describes the data format of a type.
Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static DataFormat
    enumType(Type type)
    Returns a new enum data format for the given type.
    Returns the fields encapsulated by this format.
    Returns the Java type for this format.
    default boolean
    Returns whether this data format represents an enum.
    static DataFormat
    of(Type type, List<DataFormatField> fields)
    Returns a new data format for the given type and fields.
  • Method Details

    • getType

      Type getType()
      Returns the Java type for this format.
      Returns:
      the Java type for this format
    • getFields

      List<DataFormatField> getFields()
      Returns the fields encapsulated by this format.
      Returns:
      the fields encapsulated by this format
    • isEnum

      default boolean isEnum()
      Returns whether this data format represents an enum.
      Returns:
      whether this data format represents an enum.
    • of

      static DataFormat of(Type type, List<DataFormatField> fields)
      Returns a new data format for the given type and fields.
      Parameters:
      type - The type
      fields - The fields of the type
      Returns:
      the data format
    • enumType

      static DataFormat enumType(Type type)
      Returns a new enum data format for the given type.
      Parameters:
      type - The enum type
      Returns:
      the data format