public class GsonResultElementFactory extends Object implements ResultElementFactory<com.google.gson.JsonElement>
ResultElement
, based on a given JsonElement
.Modifier and Type | Field and Description |
---|---|
protected com.google.gson.GsonBuilder |
gsonBuilder
The
GsonBuilder instance to be used for deserialization. |
Constructor and Description |
---|
GsonResultElementFactory(com.google.gson.GsonBuilder gsonBuilder) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
ResultElement |
create(com.google.gson.JsonElement resultElement)
Creates a
ResultElement based on the given object. |
boolean |
equals(Object o) |
com.google.gson.GsonBuilder |
getGsonBuilder()
The
GsonBuilder instance to be used for deserialization. |
int |
hashCode() |
protected ResultCollection |
newCollection(com.google.gson.JsonElement resultElement) |
protected ResultObject |
newObject(com.google.gson.JsonElement resultElement) |
protected ResultPrimitive |
newPrimitive(com.google.gson.JsonElement resultElement) |
String |
toString() |
@Nonnull protected final com.google.gson.GsonBuilder gsonBuilder
GsonBuilder
instance to be used for deserialization.public GsonResultElementFactory(@Nonnull com.google.gson.GsonBuilder gsonBuilder)
@Nonnull protected ResultPrimitive newPrimitive(@Nonnull com.google.gson.JsonElement resultElement)
@Nonnull protected ResultObject newObject(@Nonnull com.google.gson.JsonElement resultElement)
@Nonnull protected ResultCollection newCollection(@Nonnull com.google.gson.JsonElement resultElement)
@Nullable public ResultElement create(@Nullable com.google.gson.JsonElement resultElement) throws IllegalArgumentException
ResultElement
based on the given object.create
in interface ResultElementFactory<com.google.gson.JsonElement>
resultElement
- The object to build the ResultElement
from.ResultElement
created from the given object.IllegalArgumentException
- If the given object could not be used to build a ResultElement
.@Nonnull public com.google.gson.GsonBuilder getGsonBuilder()
GsonBuilder
instance to be used for deserialization.Copyright © 2021 SAP SE. All rights reserved.