mil.dod.th.ose.shared/src/mil/dod/th/ose/shared/protoconverter/JaxbConverter.java
private static Class<? extends Message> findClass(final String protoFieldName, final Class<?> messageType)
    {
        Class<?> importedClazz = null;
        final Field[] fields = messageType.getDeclaredFields();
        
        for (Field field: fields)
        {
            if (field.getName().matches(IGNORECASE + protoFieldName + UNDERSCORE))
            {
                importedClazz = field.getType();
                if (importedClazz.getSimpleName().equals("List"))
                {
                    final ParameterizedType listType = (ParameterizedType)field.getGenericType();
                    importedClazz = (Class<?>)listType.getActualTypeArguments()[0];
                    break;
                }
            }
        }
        @SuppressWarnings("unchecked")
        final Class<? extends Message> messageClass = (Class<? extends Message>)importedClazz;
        return messageClass; //NOPMD: Unnecessary Local Before Return, needed for suppression
    }
/**
     * This method is responsible for determining the {@link Class} of the specified proto message field given 
     * the string representation of the fields name and the initial class the field was found in.
     * 
     * @param protoFieldName
     *          The string representation of the fields name that references another message class.
     * @param messageType
     *          The class in which field resides.
     * @return
     *          The {@link Class} that is class type of the referenced field.
     */
This method is responsible for determining the  Class of the specified proto message field given
the string representation of the fields name and the initial class the field was found in.

@param protoFieldName
The string representation of the fields name that references another message class.
@param messageType
The class in which field resides.
@return
The  Class that is class type of the referenced field.
This method is responsible for determining the Class of the specified proto message field given the string representation of the fields name and the initial class the field was found in . @param protoFieldName The string representation of the fields name that references another message class . @param messageType The class in which field resides . @return The Class that is class type of the referenced field .
private static Class<? extends Message> findClass(final String protoFieldName, final Class<?> messageType)
    {
        Class<?> importedClazz = null;
        final Field[] fields = messageType.getDeclaredFields();
        for (Field field: fields)
        {
            if (field.getName().matches(IGNORECASE + protoFieldName + UNDERSCORE))
            {
                importedClazz = field.getType();
                if (importedClazz.getSimpleName().equals("List"))
                {
                    final ParameterizedType listType = (ParameterizedType)field.getGenericType();
                    importedClazz = (Class<?>)listType.getActualTypeArguments()[0];
                    break;
                }
            }
        }
        @SuppressWarnings("unchecked")
        final Class<? extends Message> messageClass = (Class<? extends Message>)importedClazz;
        return messageClass; 
    }
private static Class < ? extends Message > findClass ( final String protoFieldName , final Class < ? > messageType ) { Class < ? > importedClazz = null ; final Field [ ] fields = messageType . getDeclaredFields ( ) ; for ( Field field : fields ) { if ( field . getName ( ) . matches ( IGNORECASE + protoFieldName + UNDERSCORE ) ) { importedClazz = field . getType ( ) ; if ( importedClazz . getSimpleName ( ) . equals ( "List" ) ) { final ParameterizedType listType = ( ParameterizedType ) field . getGenericType ( ) ; importedClazz = ( Class < ? > ) listType . getActualTypeArguments ( ) [ 0 ] ; break ; } } } @ SuppressWarnings ( "unchecked" ) final Class < ? extends Message > messageClass = ( Class < ? extends Message > ) importedClazz ; return messageClass ; }
This method is responsible for determining the {@link Class} of the specified proto message field given
 the string representation of the fields name and the initial class the field was found in.
This method is responsible for determining the { @link Class } of the specified proto message field given the string representation of the fields name and the initial class the field was found in .
//NOPMD: Unnecessary Local Before Return, needed for suppression