mil.dod.th.ose.jaxb.proto.converter/src/mil/dod/th/ose/jaxbprotoconverter/JaxbClassParser.java
private void handleListType(final ProtoField entry, final Field field) throws JaxbProtoConvertException
    {
        entry.setRule(ProtoField.Rule.Repeated);
        if (field.getGenericType() instanceof ParameterizedType) 
        {  
            final ParameterizedType pt = (ParameterizedType) field.getGenericType();
            if (pt.getActualTypeArguments().length != 1)
            {
                throw new IllegalArgumentException(
                        String.format("Field %s is a list, expecting one type arguement, found %d", 
                                field.getName(), pt.getActualTypeArguments().length));
            }
            final Class<?> type = (Class<?>)pt.getActualTypeArguments()[0];
            entry.setType(getBasicType(type));
            if (entry.getType() == null)
            {
                handleReference(type, entry);
            }
        }
        else
        {
            throw new IllegalArgumentException(
                    String.format("Field %s is a list so must be parameterized", field.getName()));
        }
    }
/**
     * This method is responsible for converting any fields within a JAXB class of the type {@link List} into a
     * protocol buffer compatible field.
     * 
     * @param entry
     *      The {@link ProtoField} the converted field is to be saved to.
     * @param field
     *      The field to be converted from a {@link List} to protocol buffer field type.
     * @throws JaxbProtoConvertException 
     *      Thrown if an error occurs handling the list type.
     */
This method is responsible for converting any fields within a JAXB class of the type  List into a
protocol buffer compatible field.

@param entry
The  ProtoField the converted field is to be saved to.
@param field
The field to be converted from a  List to protocol buffer field type.
@throws JaxbProtoConvertException
Thrown if an error occurs handling the list type.
This method is responsible for converting any fields within a JAXB class of the type List into a protocol buffer compatible field . @param entry The ProtoField the converted field is to be saved to . @param field The field to be converted from a List to protocol buffer field type . @throws JaxbProtoConvertException Thrown if an error occurs handling the list type .
private void handleListType(final ProtoField entry, final Field field) throws JaxbProtoConvertException
    {
        entry.setRule(ProtoField.Rule.Repeated);
        if (field.getGenericType() instanceof ParameterizedType) 
        {  
            final ParameterizedType pt = (ParameterizedType) field.getGenericType();
            if (pt.getActualTypeArguments().length != 1)
            {
                throw new IllegalArgumentException(
                        String.format("Field %s is a list, expecting one type arguement, found %d", 
                                field.getName(), pt.getActualTypeArguments().length));
            }
            final Class<?> type = (Class<?>)pt.getActualTypeArguments()[0];
            entry.setType(getBasicType(type));
            if (entry.getType() == null)
            {
                handleReference(type, entry);
            }
        }
        else
        {
            throw new IllegalArgumentException(
                    String.format("Field %s is a list so must be parameterized", field.getName()));
        }
    }
private void handleListType ( final ProtoField entry , final Field field ) throws JaxbProtoConvertException { entry . setRule ( ProtoField . Rule . Repeated ) ; if ( field . getGenericType ( ) instanceof ParameterizedType ) { final ParameterizedType pt = ( ParameterizedType ) field . getGenericType ( ) ; if ( pt . getActualTypeArguments ( ) . length != 1 ) { throw new IllegalArgumentException ( String . format ( "Field %s is a list, expecting one type arguement, found %d" , field . getName ( ) , pt . getActualTypeArguments ( ) . length ) ) ; } final Class < ? > type = ( Class < ? > ) pt . getActualTypeArguments ( ) [ 0 ] ; entry . setType ( getBasicType ( type ) ) ; if ( entry . getType ( ) == null ) { handleReference ( type , entry ) ; } } else { throw new IllegalArgumentException ( String . format ( "Field %s is a list so must be parameterized" , field . getName ( ) ) ) ; } }
This method is responsible for converting any fields within a JAXB class of the type {@link List} into a
 protocol buffer compatible field.
This method is responsible for converting any fields within a JAXB class of the type { @link List } into a protocol buffer compatible field .