org.infinispan.protostream.impl.parser.mappers.OneOfMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protostream Show documentation
Show all versions of protostream Show documentation
ProtoStream is a serialization library based on Protocol buffers format for serializing structured data.
The newest version!
package org.infinispan.protostream.impl.parser.mappers;
import org.infinispan.protostream.descriptors.OneOfDescriptor;
import com.squareup.protoparser.OneOfElement;
/**
* @author [email protected]
* @since 3.1
*/
final class OneOfMapper implements Mapper {
@Override
public OneOfDescriptor map(OneOfElement oneof) {
return new OneOfDescriptor.Builder()
.withName(oneof.name())
.withDocumentation(oneof.documentation())
.withFields(Mappers.FIELD_LIST_MAPPER.map(oneof.fields()))
.build();
}
}