code: private static MethodRef getGetterMethod(FieldDescriptor descriptor) {
      Preconditions.checkArgument(
          !descriptor.isExtension(), "extensions do not have getter methods. %s", descriptor);
      TypeInfo message = messageRuntimeType(descriptor.getContainingType());
      boolean isProto3Enum = isProto3EnumField(descriptor);
      return MethodRef.createInstanceMethod(
              message,
              new Method(
                  "get"
                      + getFieldName(descriptor, true)
                      // For proto3 enums we access the Value field
                      + (isProto3Enum ? "Value" : ""),
                  isProto3Enum ? Type.INT_TYPE : getRuntimeType(descriptor),
                  NO_METHOD_ARGS))
          // All protos are guaranteed to never return null
          .asNonNullable()
          .asCheap();
    }
docs: Returns the {@link MethodRef} for the generated getter method.