core/src/main/java/com/twitter/elephantbird/util/ThriftToDynamicProto.java
private String resolveMessageTypeName(TStructDescriptor descriptor)
    throws DescriptorValidationException {
    String typeName = protoMessageType(descriptor.getThriftClass());

    // Anytime we have a new message typeName, we make sure that we have a builder for it.
    // If not, we create one.
    DescriptorProtos.DescriptorProto.Builder builder = descriptorBuilderMap.get(typeName);
    if (builder == null) {
      builder = DescriptorProtos.DescriptorProto.newBuilder();
      builder.setName(typeName);
      descriptorBuilderMap.put(typeName, builder);
      doSchemaMapping(builder, descriptor);
    }

    return typeName;
  }
private String resolveMessageTypeName(TStructDescriptor descriptor)
    throws DescriptorValidationException {
    String typeName = protoMessageType(descriptor.getThriftClass());

    // Anytime we have a new message typeName, we make sure that we have a builder for it.
    // If not, we create one.
    DescriptorProtos.DescriptorProto.Builder builder = descriptorBuilderMap.get(typeName);
    if (builder == null) {
      builder = DescriptorProtos.DescriptorProto.newBuilder();
      builder.setName(typeName);
      descriptorBuilderMap.put(typeName, builder);
      doSchemaMapping(builder, descriptor);
    }

    return typeName;
  }
For a TStructDescriptor, resolves the typeName and optionally converts and memoizes it's
schema.