Interface TypeSerializer.Annotated<V>

    • Method Detail

      • emptyValue

        default @Nullable V emptyValue​(java.lang.reflect.AnnotatedType specificType,
                                       ConfigurationOptions options)
        Description copied from interface: TypeSerializer
        Create an empty value of the appropriate type.

        This method is for the most part designed to create empty collection types, though it may be useful for scalars in limited cases.

        Specified by:
        emptyValue in interface TypeSerializer<V>
        Parameters:
        specificType - specific annotated subtype to create an empty value of
        options - options used from the loading node
        Returns:
        new empty value
      • emptyValue

        default @Nullable V emptyValue​(java.lang.reflect.Type specificType,
                                       ConfigurationOptions options)
        Description copied from interface: TypeSerializer
        Create an empty value of the appropriate type.

        This method is for the most part designed to create empty collection types, though it may be useful for scalars in limited cases.

        Specified by:
        emptyValue in interface TypeSerializer<V>
        Parameters:
        specificType - specific subtype to create an empty value of
        options - options used from the loading node
        Returns:
        new empty value