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 ImmutableMapFieldGenerator(               field, messageBitIndex, builderBitIndex, context);         } else {           if (IsLazy(field)) {             return new RepeatedImmutableLazyMessageFieldGenerator(                 field, messageBitIndex, builderBitIndex, context);           } else {             return new RepeatedImmutableMessageFieldGenerator(                 field, messageBitIndex, builderBitIndex, context);           }         }       case JAVATYPE_ENUM:         return new RepeatedImmutableEnumFieldGenerator(             field, messageBitIndex, builderBitIndex, context);       case JAVATYPE_STRING:         return new RepeatedImmutableStringFieldGenerator(             field, messageBitIndex, builderBitIndex, context);       default:         return new RepeatedImmutablePrimitiveFieldGenerator(             field, messageBitIndex, builderBitIndex, context);     }   } else {     if (field->containing_oneof()) {       switch (GetJavaType(field)) {         case JAVATYPE_MESSAGE:           if (IsLazy(field)) {             return new ImmutableLazyMessageOneofFieldGenerator(                 field, messageBitIndex, builderBitIndex, context);           } else {             return new ImmutableMessageOneofFieldGenerator(                 field, messageBitIndex, builderBitIndex, context);           }         case JAVATYPE_ENUM:           return new ImmutableEnumOneofFieldGenerator(               field, messageBitIndex, builderBitIndex, context);         case JAVATYPE_STRING:           return new ImmutableStringOneofFieldGenerator(               field, messageBitIndex, builderBitIndex, context);         default:           return new ImmutablePrimitiveOneofFieldGenerator(               field, messageBitIndex, builderBitIndex, context);       }     } else {       switch (GetJavaType(field)) {         case JAVATYPE_MESSAGE:           if (IsLazy(field)) {             return new ImmutableLazyMessageFieldGenerator(                 field, messageBitIndex, builderBitIndex, context);           } else {             return new ImmutableMessageFieldGenerator(                 field, messageBitIndex, builderBitIndex, context);           }         case JAVATYPE_ENUM:           return new ImmutableEnumFieldGenerator(               field, messageBitIndex, builderBitIndex, context);         case JAVATYPE_STRING:           return new ImmutableStringFieldGenerator(               field, messageBitIndex, builderBitIndex, context);         default:           return new ImmutablePrimitiveFieldGenerator(               field, messageBitIndex, builderBitIndex, context);       }     }   } }  