eGenerator(     const FieldDescriptor* field, int messageBitIndex, int builderBitIndex,     Context* context) {   if (field->is_repeated()) {     switch (GetJavaType(field)) {       case JAVATYPE_MESSAGE:         if (IsMapEntry(field->message_type())) {           return new ImmutableMapFieldLiteGenerator(               field, messageBitIndex, builderBitIndex, context);         } else {           if (IsLazy(field)) {             return new RepeatedImmutableLazyMessageFieldLiteGenerator(                 field, messageBitIndex, builderBitIndex, context);           } else {             return new RepeatedImmutableMessageFieldLiteGenerator(                 field, messageBitIndex, builderBitIndex, context);           }         }       case JAVATYPE_ENUM:         return new RepeatedImmutableEnumFieldLiteGenerator(             field, messageBitIndex, builderBitIndex, context);       case JAVATYPE_STRING:         return new RepeatedImmutableStringFieldLiteGenerator(             field, messageBitIndex, builderBitIndex, context);       default:         return new RepeatedImmutablePrimitiveFieldLiteGenerator(             field, messageBitIndex, builderBitIndex, context);     }   } else {     if (field->containing_oneof()) {       switch (GetJavaType(field)) {         case JAVATYPE_MESSAGE:           if (IsLazy(field)) {             return new ImmutableLazyMessageOneofFieldLiteGenerator(                 field, messageBitIndex, builderBitIndex, context);           } else {             return new ImmutableMessageOneofFieldLiteGenerator(                 field, messageBitIndex, builderBitIndex, context);           }         case JAVATYPE_ENUM:           return new ImmutableEnumOneofFieldLiteGenerator(               field, messageBitIndex, builderBitIndex, context);         case JAVATYPE_STRING:           return new ImmutableStringOneofFieldLiteGenerator(               field, messageBitIndex, builderBitIndex, context);         default:           return new ImmutablePrimitiveOneofFieldLiteGenerator(               field, messageBitIndex, builderBitIndex, context);       }     } else {       switch (GetJavaType(field)) {         case JAVATYPE_MESSAGE:           if (IsLazy(field)) {             return new ImmutableLazyMessageFieldLiteGenerator(                 field, messageBitIndex, builderBitIndex, context);           } else {             return new ImmutableMessageFieldLiteGenerator(                 field, messageBitIndex, builderBitIndex, context);           }         case JAVATYPE_ENUM:           return new ImmutableEnumFieldLiteGenerator(               field, messageBitIndex, builderBitIndex, context);         case JAVATYPE_STRING:           return new ImmutableStringFieldLiteGenerator(               field, messageBitIndex, builderBitIndex, context);         default:           return new ImmutablePrimitiveFieldLiteGenerator(               field, messageBitIndex, builderBitIndex, context);       }     }   } }  