Example usage for org.springframework.core ReactiveAdapter isNoValue

List of usage examples for org.springframework.core ReactiveAdapter isNoValue

Introduction

In this page you can find the example usage for org.springframework.core ReactiveAdapter isNoValue.

Prototype

public boolean isNoValue() 

Source Link

Document

Shortcut for getDescriptor().isNoValue() .

Usage

From source file:org.springframework.messaging.handler.invocation.reactive.AbstractEncoderMethodReturnValueHandler.java

private ResolvableType getElementType(ReactiveAdapter adapter, ResolvableType type) {
    if (adapter.isNoValue()) {
        return VOID_RESOLVABLE_TYPE;
    } else if (type != ResolvableType.NONE) {
        return type;
    } else {//w w  w  . ja va 2 s .  c  om
        return OBJECT_RESOLVABLE_TYPE;
    }
}

From source file:org.springframework.web.reactive.result.method.HandlerMethodArgumentResolverSupport.java

private void assertHasValues(ReactiveAdapter adapter, MethodParameter param) {
    if (adapter.isNoValue()) {
        throw new IllegalArgumentException(
                "No value reactive types not supported: " + param.getGenericParameterType());
    }//w w w .ja  va2 s.co  m
}