mil.dod.th.ose.shared/src/mil/dod/th/ose/shared/protoconverter/MessageConverter.java
private static void handleRepeatedField(final Object jaxbObject, final Message protoMsg, 
            final FieldDescriptor fieldDesc) throws ObjectConverterException
    {   
        if (protoMsg.getRepeatedFieldCount(fieldDesc) == 0)
        {
            return;
        }
        
        final String protoFieldName = fieldDesc.getName();
        final int numFields = protoMsg.getRepeatedFieldCount(fieldDesc);
        final Object valuesList = ConverterUtilities.getValue(jaxbObject, protoFieldName, fieldDesc.getType());

        @SuppressWarnings("unchecked")
        final List<Object> list = (List<Object>)valuesList;
        
        for (int i = 0; i < numFields; i++)
        {
            final Object protoFieldValue = protoMsg.getRepeatedField(fieldDesc, i);
            list.add(getJaxbValueForProtoField(fieldDesc.getType(), protoFieldValue));
        } 
    }
/**
     * This method is responsible for handling any repeated fields within the Google Protocol message being converted
     * to an object. Repeated fields in a protocol message is turned into a java.util.List.
     * 
     * @param jaxbObject
     *          The JAXB object being created by the converter.
     * @param protoMsg
     *          The {@link Message} being converted to an object.
     * @param fieldDesc
     *          The {@link FieldDescriptor} of the repeated field being converted.
     *          converted.
     * @throws ObjectConverterException
     *          When the messages repeated fields cannot be converted to a list.
     */
This method is responsible for handling any repeated fields within the Google Protocol message being converted
to an object. Repeated fields in a protocol message is turned into a java.util.List.

@param jaxbObject
The JAXB object being created by the converter.
@param protoMsg
The  Message being converted to an object.
@param fieldDesc
The  FieldDescriptor of the repeated field being converted.
converted.
@throws ObjectConverterException
When the messages repeated fields cannot be converted to a list.
This method is responsible for handling any repeated fields within the Google Protocol message being converted to an object . Repeated fields in a protocol message is turned into a java . util . List . @param jaxbObject The JAXB object being created by the converter . @param protoMsg The Message being converted to an object . @param fieldDesc The FieldDescriptor of the repeated field being converted . converted . @throws ObjectConverterException When the messages repeated fields cannot be converted to a list .
private static void handleRepeatedField(final Object jaxbObject, final Message protoMsg, 
            final FieldDescriptor fieldDesc) throws ObjectConverterException
    {   
        if (protoMsg.getRepeatedFieldCount(fieldDesc) == 0)
        {
            return;
        }
        final String protoFieldName = fieldDesc.getName();
        final int numFields = protoMsg.getRepeatedFieldCount(fieldDesc);
        final Object valuesList = ConverterUtilities.getValue(jaxbObject, protoFieldName, fieldDesc.getType());
        @SuppressWarnings("unchecked")
        final List<Object> list = (List<Object>)valuesList;
        for (int i = 0; i < numFields; i++)
        {
            final Object protoFieldValue = protoMsg.getRepeatedField(fieldDesc, i);
            list.add(getJaxbValueForProtoField(fieldDesc.getType(), protoFieldValue));
        } 
    }
private static void handleRepeatedField ( final Object jaxbObject , final Message protoMsg , final FieldDescriptor fieldDesc ) throws ObjectConverterException { if ( protoMsg . getRepeatedFieldCount ( fieldDesc ) == 0 ) { return ; } final String protoFieldName = fieldDesc . getName ( ) ; final int numFields = protoMsg . getRepeatedFieldCount ( fieldDesc ) ; final Object valuesList = ConverterUtilities . getValue ( jaxbObject , protoFieldName , fieldDesc . getType ( ) ) ; @ SuppressWarnings ( "unchecked" ) final List < Object > list = ( List < Object > ) valuesList ; for ( int i = 0 ; i < numFields ; i ++ ) { final Object protoFieldValue = protoMsg . getRepeatedField ( fieldDesc , i ) ; list . add ( getJaxbValueForProtoField ( fieldDesc . getType ( ) , protoFieldValue ) ) ; } }
This method is responsible for handling any repeated fields within the Google Protocol message being converted
 to an object.
This method is responsible for handling any repeated fields within the Google Protocol message being converted to an object .