Class ProtoTypeMap

java.lang.Object
com.salesforce.jprotoc.ProtoTypeMap

public final class ProtoTypeMap extends Object
ProtoTypeMap maintains a dictionary for looking up Java type names when given proto types.
  • Method Details

    • of

      public static ProtoTypeMap of(@Nonnull Collection<com.google.protobuf.DescriptorProtos.FileDescriptorProto> fileDescriptorProtos)
      Returns an instance of ProtoTypeMap based on the given FileDescriptorProto instances.
      Parameters:
      fileDescriptorProtos - the full collection of files descriptors from the code generator request
    • toJavaTypeName

      public String toJavaTypeName(@Nonnull String protoTypeName)
      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: