mil.dod.th.ose.jaxb.proto.converter/src/mil/dod/th/ose/jaxbprotoconverter/JaxbClassParser.java
private void handleFields(final ProtoMessage message, final Class<?> clazz) 
            throws JaxbProtoConvertException
    {
        final Field[] fields = clazz.getDeclaredFields();
        
        for (Field field : fields)
        {
            //If the field is deprecated then do not generate it.
            if (field.getName().contains("_DEPRECATED_"))
            {
                continue;
            }
            ProtoField entry = null; 
            for (Annotation annotation : field.getAnnotations())
            {
                if (annotation.annotationType().equals(XmlElement.class))
                {
                    entry = handleXmlElement(message, field);
                    break;
                }
                else if (annotation.annotationType().equals(XmlAttribute.class))
                {
                    entry = handleXmlAttribute(message, field);
                    break;
                }
                else if (annotation.annotationType().equals(XmlValue.class))
                {
                    entry = handleXmlValue(message, field);
                    break;
                }
            }
            
            if (entry != null)
            {
                message.getFields().put(entry.getName(), entry);
            }
        }
    }
/**
     * This method is responsible for determining what XML annotation a field uses and the calls the appropriate method
     * for handling a field with that annotation type.
     * 
     * @param message
     *      The {@link ProtoMessage} the converted fields will belong to.
     * @param clazz
     *      The class the with fields that are being converted to proto message fields.
     * @throws JaxbProtoConvertException
     *      Thrown if an error occurs handling a field. 
     */
This method is responsible for determining what XML annotation a field uses and the calls the appropriate method
for handling a field with that annotation type.

@param message
The  ProtoMessage the converted fields will belong to.
@param clazz
The class the with fields that are being converted to proto message fields.
@throws JaxbProtoConvertException
Thrown if an error occurs handling a field.
This method is responsible for determining what XML annotation a field uses and the calls the appropriate method for handling a field with that annotation type . @param message The ProtoMessage the converted fields will belong to . @param clazz The class the with fields that are being converted to proto message fields . @throws JaxbProtoConvertException Thrown if an error occurs handling a field .
private void handleFields(final ProtoMessage message, final Class<?> clazz) 
            throws JaxbProtoConvertException
    {
        final Field[] fields = clazz.getDeclaredFields();
        for (Field field : fields)
        {
            if (field.getName().contains("_DEPRECATED_"))
            {
                continue;
            }
            ProtoField entry = null; 
            for (Annotation annotation : field.getAnnotations())
            {
                if (annotation.annotationType().equals(XmlElement.class))
                {
                    entry = handleXmlElement(message, field);
                    break;
                }
                else if (annotation.annotationType().equals(XmlAttribute.class))
                {
                    entry = handleXmlAttribute(message, field);
                    break;
                }
                else if (annotation.annotationType().equals(XmlValue.class))
                {
                    entry = handleXmlValue(message, field);
                    break;
                }
            }
            if (entry != null)
            {
                message.getFields().put(entry.getName(), entry);
            }
        }
    }
private void handleFields ( final ProtoMessage message , final Class < ? > clazz ) throws JaxbProtoConvertException { final Field [ ] fields = clazz . getDeclaredFields ( ) ; for ( Field field : fields ) { if ( field . getName ( ) . contains ( "_DEPRECATED_" ) ) { continue ; } ProtoField entry = null ; for ( Annotation annotation : field . getAnnotations ( ) ) { if ( annotation . annotationType ( ) . equals ( XmlElement . class ) ) { entry = handleXmlElement ( message , field ) ; break ; } else if ( annotation . annotationType ( ) . equals ( XmlAttribute . class ) ) { entry = handleXmlAttribute ( message , field ) ; break ; } else if ( annotation . annotationType ( ) . equals ( XmlValue . class ) ) { entry = handleXmlValue ( message , field ) ; break ; } } if ( entry != null ) { message . getFields ( ) . put ( entry . getName ( ) , entry ) ; } } }
This method is responsible for determining what XML annotation a field uses and the calls the appropriate method
 for handling a field with that annotation type.
This method is responsible for determining what XML annotation a field uses and the calls the appropriate method for handling a field with that annotation type .
//If the field is deprecated then do not generate it.