public final class ResponseConverterUtils
extends java.lang.Object
ResponseConverter
.ResponseConverter
Modifier and Type | Method and Description |
---|---|
static <T> ResponseConverter<T> |
getGenericObject(java.lang.reflect.Type type,
java.lang.String property)
Creates a generic
ResponseConverter for a generic class. |
static ResponseConverter<java.io.InputStream> |
getInputStream()
Creates an
InputStream converter. |
static <T extends ObjectModel> |
getObject(java.lang.Class<? extends T> type)
Creates a generic
ResponseConverter for a POJO class that extends ObjectModel. |
static <T> ResponseConverter<T> |
getObject(java.lang.reflect.Type type)
Creates a generic
ResponseConverter for a POJO class. |
static ResponseConverter<java.lang.String> |
getString()
Creates a generic
ResponseConverter for a String response. |
static <T> ResponseConverter<T> |
getValue(java.lang.Class<? extends T> type)
Creates a generic
ResponseConverter for a non-object response. |
static <T> ResponseConverter<T> |
getValue(java.lang.reflect.Type type)
Creates a generic
ResponseConverter for a response with a Type
instance that describes the type. |
static ResponseConverter<java.lang.Void> |
getVoid()
Gets the void converter.
|
public static <T> ResponseConverter<T> getGenericObject(java.lang.reflect.Type type, java.lang.String property)
ResponseConverter
for a generic class.T
- the generic typetype
- the typeproperty
- the propertypublic static ResponseConverter<java.io.InputStream> getInputStream()
InputStream
converter.public static <T extends ObjectModel> ResponseConverter<T> getObject(java.lang.Class<? extends T> type)
ResponseConverter
for a POJO class that extends ObjectModel.T
- the generic typetype
- the typepublic static <T> ResponseConverter<T> getObject(java.lang.reflect.Type type)
ResponseConverter
for a POJO class.T
- the generic typetype
- a Type instance that describes the typepublic static ResponseConverter<java.lang.String> getString()
ResponseConverter
for a String response.public static <T> ResponseConverter<T> getValue(java.lang.Class<? extends T> type)
ResponseConverter
for a non-object response.T
- the generic typetype
- the typepublic static <T> ResponseConverter<T> getValue(java.lang.reflect.Type type)
ResponseConverter
for a response with a Type
instance that describes the type.T
- the generic typetype
- the typepublic static ResponseConverter<java.lang.Void> getVoid()
Copyright © 2022 IBM Cloud Developer Experience. All rights reserved.