question: @ SuppressWarnings ( "unchecked" ) private Object fromReflectionType ( final Object value ) { FieldDescriptor descriptor = getDescriptor ( ) ; if ( descriptor . isRepeated ( ) ) { if ( descriptor . getJavaType ( ) == FieldDescriptor . JavaType . MESSAGE || descriptor . getJavaType ( ) == FieldDescriptor . JavaType . ENUM ) { final List result = new ArrayList ( ) ; for ( final Object element : ( List ) value ) { result . add ( singularFromReflectionType ( element ) ) ; } return result ; } else { return value ; } } else { return singularFromReflectionType ( value ) ; } }
target:  Convert from the type used by the reflection accessors to the type used by native accessors.  E.g., for enums, the reflection accessors use EnumValueDescriptors but the native accessors use the generated enum type.