Package com.salesforce.jprotoc
Class ProtoTypeMap
java.lang.Object
com.salesforce.jprotoc.ProtoTypeMap
ProtoTypeMap maintains a dictionary for looking up Java type names when given proto types.-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetJavaOuterClassname(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 ProtoTypeMapof(Collection<com.google.protobuf.DescriptorProtos.FileDescriptorProto> fileDescriptorProtos) Returns an instance ofProtoTypeMapbased on the given FileDescriptorProto instances.toJavaTypeName(String protoTypeName) Returns the full Java type name for the given proto type.
-
Method Details
-
of
public static ProtoTypeMap of(@Nonnull Collection<com.google.protobuf.DescriptorProtos.FileDescriptorProto> fileDescriptorProtos) Returns an instance ofProtoTypeMapbased on the given FileDescriptorProto instances.- Parameters:
fileDescriptorProtos- the full collection of files descriptors from the code generator request
-
toJavaTypeName
Returns the full Java type name for the given proto type.- Parameters:
protoTypeName- the proto type to be converted to a Java type
-
getJavaOuterClassname
public 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.- Parameters:
fileDescriptor-- Returns:
-