org.springframework.core

## 类 ReactiveTypeDescriptor

- java.lang.Object
- - org.springframework.core.ReactiveTypeDescriptor

-     public class ReactiveTypeDescriptor
      extends Object

  Describes the semantics of a reactive type including boolean checks for `isMultiValue()`, `isNoValue()`, and `supportsEmpty()`.
  从以下版本开始:
    5.0
  作者:
    Rossen Stoyanchev

- - ### 方法概要

    所有方法 静态方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `equals(Object other)`
    `Object` | `getEmptyValue()` Return an empty-value instance for the underlying reactive or async type.
    `Class<?>` | `getReactiveType()` Return the reactive type for this descriptor.
    `int` | `hashCode()`
    `boolean` | `isMultiValue()` Return `true` if the reactive type can produce more than 1 value can be produced and is therefore a good fit to adapt to `Flux`.
    `boolean` | `isNoValue()` Return `true` if the reactive type does not produce any values and only provides completion and error signals.
    `static ReactiveTypeDescriptor` | `multiValue(Class<?> type, Supplier<?> emptySupplier)` Descriptor for a reactive type that can produce 0..N values.
    `static ReactiveTypeDescriptor` | `noValue(Class<?> type, Supplier<?> emptySupplier)` Descriptor for a reactive type that does not produce any values.
    `static ReactiveTypeDescriptor` | `singleOptionalValue(Class<?> type, Supplier<?> emptySupplier)` Descriptor for a reactive type that can produce 0..1 values.
    `static ReactiveTypeDescriptor` | `singleRequiredValue(Class<?> type)` Descriptor for a reactive type that must produce 1 value to complete.
    `boolean` | `supportsEmpty()` Return `true` if the reactive type can complete with no values.

    - ### 从类继承的方法 java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### 方法详细资料

    - #### getReactiveType

          public Class<?> getReactiveType()

      Return the reactive type for this descriptor.

    - #### isMultiValue

          public boolean isMultiValue()

      Return `true` if the reactive type can produce more than 1 value can be produced and is therefore a good fit to adapt to `Flux`. A `false` return value implies the reactive type can produce 1 value at most and is therefore a good fit to adapt to `Mono`.

    - #### isNoValue

          public boolean isNoValue()

      Return `true` if the reactive type does not produce any values and only provides completion and error signals.

    - #### supportsEmpty

          public boolean supportsEmpty()

      Return `true` if the reactive type can complete with no values.

    - #### getEmptyValue

          public Object getEmptyValue()

      Return an empty-value instance for the underlying reactive or async type. Use of this type implies `supportsEmpty()` is true.

    - #### equals

          public boolean equals(@Nullable
                                Object other)

      覆盖:
        `equals` 在类中 `Object`

    - #### hashCode

          public int hashCode()

      覆盖:
        `hashCode` 在类中 `Object`

    - #### multiValue

          public static ReactiveTypeDescriptor multiValue(Class<?> type,
                                                          Supplier<?> emptySupplier)

      Descriptor for a reactive type that can produce 0..N values.
      参数:
        `type` - the reactive type
        `emptySupplier` - a supplier of an empty-value instance of the reactive type

    - #### singleOptionalValue

          public static ReactiveTypeDescriptor singleOptionalValue(Class<?> type,
                                                                   Supplier<?> emptySupplier)

      Descriptor for a reactive type that can produce 0..1 values.
      参数:
        `type` - the reactive type
        `emptySupplier` - a supplier of an empty-value instance of the reactive type

    - #### singleRequiredValue

          public static ReactiveTypeDescriptor singleRequiredValue(Class<?> type)

      Descriptor for a reactive type that must produce 1 value to complete.
      参数:
        `type` - the reactive type

    - #### noValue

          public static ReactiveTypeDescriptor noValue(Class<?> type,
                                                       Supplier<?> emptySupplier)

      Descriptor for a reactive type that does not produce any values.
      参数:
        `type` - the reactive type
        `emptySupplier` - a supplier of an empty-value instance of the reactive type