All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.protostream.impl.parser.mappers.OneOfMapper Maven / Gradle / Ivy

Go to download

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();
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy