Package com.sap.cloud.sdk.result
Class PrimitiveBasedObjectExtractor<T>
java.lang.Object
com.sap.cloud.sdk.result.PrimitiveBasedObjectExtractor<T>
- Type Parameters:
T
- class type of target object for extraction (deserialization)
- All Implemented Interfaces:
ObjectExtractor<T>
This class implements the basic
ObjectExtractor
interface, offering a method to create an object by
extracting arbitrary input data of type ResultElement
. The created object will be of the same target type as
declared in the PrimitiveBasedObjectExtractor
class constructor. The target type will be dynamically checked
for parametrized constructors which fit the given input data. A fitting constructor will be used for object creation.
This implementation will only support extraction of ResultPrimitive
.
Constructors with primitive parameters are prioritized.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionextract
(ResultElement resultElement) Extracts the value of the givenResultElement
as the typeT
.
-
Constructor Details
-
PrimitiveBasedObjectExtractor
-
-
Method Details
-
extract
Description copied from interface:ObjectExtractor
Extracts the value of the givenResultElement
as the typeT
.- Specified by:
extract
in interfaceObjectExtractor<T>
- Parameters:
resultElement
- TheResultElement
to transform.- Returns:
- The
resultElement
as the given type.
-