com.google.protobuf.DescriptorProtos.MessageOptions Java Examples
The following examples show how to use
com.google.protobuf.DescriptorProtos.MessageOptions.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OpenApiDefinitionHandler.java From grpc-swagger with MIT License | 5 votes |
private void parseNestModelType(List<Descriptor> descriptors) { if (CollectionUtils.isEmpty(descriptors)) { return; } descriptors.forEach(d -> { boolean isMap = ofNullable(d.getOptions()).map(MessageOptions::getMapEntry).orElse(false); if (isMap) { return; } typeLookupTable.put(d.getFullName(), buildDefinitionType(d)); }); }
Example #2
Source File: OpenApiDefinitionHandler.java From grpc-swagger with MIT License | 5 votes |
private void parseNestModelType(List<Descriptor> descriptors) { if (CollectionUtils.isEmpty(descriptors)) { return; } descriptors.forEach(d -> { boolean isMap = ofNullable(d.getOptions()).map(MessageOptions::getMapEntry).orElse(false); if (isMap) { return; } typeLookupTable.put(d.getFullName(), buildDefinitionType(d)); }); }
Example #3
Source File: DescriptorGenerator.java From api-compiler with Apache License 2.0 | 4 votes |
private MessageOptions generateMessageOptions(Type type) { MessageOptions.Builder builder = MessageOptions.newBuilder(); setOptions(builder, type.getOptionsList(), TYPE_OPTION_NAME_PREFIX); return builder.build(); }
Example #4
Source File: Descriptors.java From play-store-api with GNU General Public License v3.0 | 4 votes |
/** Get the {@code MessageOptions}, defined in {@code descriptor.proto}. */ public MessageOptions getOptions() { return proto.getOptions(); }