use of org.apache.servicecomb.foundation.protobuf.RootDeserializer in project java-chassis by ServiceComb.
the class DeserializerSchemaManager method createRootDeserializer.
@SuppressWarnings({ "rawtypes", "unchecked" })
public <T> RootDeserializer<T> createRootDeserializer(Message message, Type type) {
if (ProtoUtils.isAnyMessage(message)) {
SchemaEx<Object> messageSchema = new AnyEntrySchema(protoMapper, type);
return new RootDeserializer(messageSchema);
}
JavaType javaType = TypeFactory.defaultInstance().constructType(type);
SchemaEx<T> messageSchema = getOrCreateMessageSchema(message, javaType);
return new RootDeserializer<>(messageSchema);
}
use of org.apache.servicecomb.foundation.protobuf.RootDeserializer in project incubator-servicecomb-java-chassis by apache.
the class DeserializerSchemaManager method createRootDeserializer.
@SuppressWarnings({ "rawtypes", "unchecked" })
public <T> RootDeserializer<T> createRootDeserializer(Message message, Type type) {
if (ProtoUtils.isAnyMessage(message)) {
SchemaEx<Object> messageSchema = new AnyEntrySchema(protoMapper, type);
return new RootDeserializer(messageSchema);
}
JavaType javaType = TypeFactory.defaultInstance().constructType(type);
SchemaEx<T> messageSchema = getOrCreateMessageSchema(message, javaType);
return new RootDeserializer<>(messageSchema);
}
Aggregations