public final class ProtoTypeMap extends Object
ProtoTypeMap maintains a dictionary for looking up Java type names when given proto types.| Modifier and Type | Method and Description |
|---|---|
static String |
getJavaOuterClassname(com.google.protobuf.DescriptorProtos.FileDescriptorProto fileDescriptor)
Computes the Java outer class name for a given FileDescriptorProto, for use when multiple classes are generated
in the same outer class.
|
static ProtoTypeMap |
of(Collection<com.google.protobuf.DescriptorProtos.FileDescriptorProto> fileDescriptorProtos)
Returns an instance of
ProtoTypeMap based on the given FileDescriptorProto instances. |
String |
toJavaTypeName(String protoTypeName)
Returns the full Java type name for the given proto type.
|
public static ProtoTypeMap of(@Nonnull Collection<com.google.protobuf.DescriptorProtos.FileDescriptorProto> fileDescriptorProtos)
ProtoTypeMap based on the given FileDescriptorProto instances.fileDescriptorProtos - the full collection of files descriptors from the code generator requestpublic String toJavaTypeName(@Nonnull String protoTypeName)
protoTypeName - the proto type to be converted to a Java typepublic static String getJavaOuterClassname(com.google.protobuf.DescriptorProtos.FileDescriptorProto fileDescriptor)
fileDescriptor - Copyright © 2023. All rights reserved.