mil.dod.th.ose.jaxb.proto.converter/src/mil/dod/th/ose/jaxbprotoconverter/JaxbClassParser.java
private ProtoField handleXmlElement(final ProtoMessage message, final Field field) throws JaxbProtoConvertException
    {
        final XmlElement element = field.getAnnotation(XmlElement.class);
        final ProtoField entry = new ProtoField(message);
        if (element.name().equals("##default"))
        {
            entry.setName(field.getName());
        }
        else
        {
            entry.setName(element.name());
        }
        
        //Fields of the Protocol Buffer type repeated are compiled into Java lists.
        if (field.getType().equals(List.class))
        {
            handleListType(entry, field);
        }
        else
        {
            entry.setType(getBasicType(field.getType()));
            if (entry.getType() == null)
            {
                handleReference(field.getType(), entry);    
            }
            final XmlElement att = field.getAnnotation(XmlElement.class);
            entry.setRule(att.required() ? ProtoField.Rule.Required : ProtoField.Rule.Optional);
        }
        
        return entry;
    }
/**
     * Method for converting a JAXB class field annotated with an XML element annotation into a protocol buffer
     * field.
     *
     * @param message
     *      Proto message the field resides in.
     * @param field
     *      Field that contains information about the XML element.
     * @return
     *      The created protocol buffer field based off the JAXB class field.
     * @throws JaxbProtoConvertException
     *      Thrown if an error occurs handling the XML element.
     */
Method for converting a JAXB class field annotated with an XML element annotation into a protocol buffer
field.

@param message
Proto message the field resides in.
@param field
Field that contains information about the XML element.
@return
The created protocol buffer field based off the JAXB class field.
@throws JaxbProtoConvertException
Thrown if an error occurs handling the XML element.
Method for converting a JAXB class field annotated with an XML element annotation into a protocol buffer field . @param message Proto message the field resides in . @param field Field that contains information about the XML element . @return The created protocol buffer field based off the JAXB class field . @throws JaxbProtoConvertException Thrown if an error occurs handling the XML element .
private ProtoField handleXmlElement(final ProtoMessage message, final Field field) throws JaxbProtoConvertException
    {
        final XmlElement element = field.getAnnotation(XmlElement.class);
        final ProtoField entry = new ProtoField(message);
        if (element.name().equals("##default"))
        {
            entry.setName(field.getName());
        }
        else
        {
            entry.setName(element.name());
        }
        if (field.getType().equals(List.class))
        {
            handleListType(entry, field);
        }
        else
        {
            entry.setType(getBasicType(field.getType()));
            if (entry.getType() == null)
            {
                handleReference(field.getType(), entry);    
            }
            final XmlElement att = field.getAnnotation(XmlElement.class);
            entry.setRule(att.required() ? ProtoField.Rule.Required : ProtoField.Rule.Optional);
        }
        return entry;
    }
private ProtoField handleXmlElement ( final ProtoMessage message , final Field field ) throws JaxbProtoConvertException { final XmlElement element = field . getAnnotation ( XmlElement . class ) ; final ProtoField entry = new ProtoField ( message ) ; if ( element . name ( ) . equals ( "##default" ) ) { entry . setName ( field . getName ( ) ) ; } else { entry . setName ( element . name ( ) ) ; } if ( field . getType ( ) . equals ( List . class ) ) { handleListType ( entry , field ) ; } else { entry . setType ( getBasicType ( field . getType ( ) ) ) ; if ( entry . getType ( ) == null ) { handleReference ( field . getType ( ) , entry ) ; } final XmlElement att = field . getAnnotation ( XmlElement . class ) ; entry . setRule ( att . required ( ) ? ProtoField . Rule . Required : ProtoField . Rule . Optional ) ; } return entry ; }
Method for converting a JAXB class field annotated with an XML element annotation into a protocol buffer
 field.
Method for converting a JAXB class field annotated with an XML element annotation into a protocol buffer field .
//Fields of the Protocol Buffer type repeated are compiled into Java lists.