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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextract(ResultElement resultElement) Extracts the value of the givenResultElementas the typeT.
-
Constructor Details
-
PrimitiveBasedObjectExtractor
-
-
Method Details
-
extract
Description copied from interface:ObjectExtractorExtracts the value of the givenResultElementas the typeT.- Specified by:
extractin interfaceObjectExtractor<T>- Parameters:
resultElement- TheResultElementto transform.- Returns:
- The
resultElementas the given type.
-