mil.dod.th.ose.jaxb.proto.converter/src/mil/dod/th/ose/jaxbprotoconverter/ProtoFileGenerator.java
private void printEnum(final PrintStream outStream, final ProtoEnum enumeration) throws JaxbProtoConvertException
    {
        outStream.format("  enum %s {%n", enumeration.getName());

        if (enumeration.getValues().isEmpty())
        {
            throw new JaxbProtoConvertException(String.format("Empty enumeration %s encountered while printing "
                    + "message %s", enumeration.getType().getSimpleName(), enumeration.getProtoMessage().getName()));
        }
        
        int index = 1;
        for (String value : enumeration.getValues())
        {
            outStream.format("    %s = %d;%n", value, index++); // NOCHECKSTYLE: Duplicate string is more readable
        }

        outStream.println("  }"); // NOCHECKSTYLE: Duplicate string is more readable
    }
/**
     * This method is responsible for taking a specified {@link ProtoEnum} and writing it to the provided
     * {@link PrintStream}.
     * 
     * @param outStream
     *      The output stream the {@link ProtoEnum} will be written to.
     * @param enumeration
     *      The {@link ProtoEnum} that will be written to the {@link PrintStream}.
     * @throws JaxbProtoConvertException
     *      Thrown if the enumeration contains no values.
     */
This method is responsible for taking a specified  ProtoEnum and writing it to the provided
PrintStream.

@param outStream
The output stream the  ProtoEnum will be written to.
@param enumeration
The  ProtoEnum that will be written to the  PrintStream.
@throws JaxbProtoConvertException
Thrown if the enumeration contains no values.
This method is responsible for taking a specified ProtoEnum and writing it to the provided PrintStream . @param outStream The output stream the ProtoEnum will be written to . @param enumeration The ProtoEnum that will be written to the PrintStream . @throws JaxbProtoConvertException Thrown if the enumeration contains no values .
private void printEnum(final PrintStream outStream, final ProtoEnum enumeration) throws JaxbProtoConvertException
    {
        outStream.format("  enum %s {%n", enumeration.getName());
        if (enumeration.getValues().isEmpty())
        {
            throw new JaxbProtoConvertException(String.format("Empty enumeration %s encountered while printing "
                    + "message %s", enumeration.getType().getSimpleName(), enumeration.getProtoMessage().getName()));
        }
        int index = 1;
        for (String value : enumeration.getValues())
        {
            outStream.format("    %s = %d;%n", value, index++); 
        }
        outStream.println("  }"); 
    }
private void printEnum ( final PrintStream outStream , final ProtoEnum enumeration ) throws JaxbProtoConvertException { outStream . format ( "  enum %s {%n" , enumeration . getName ( ) ) ; if ( enumeration . getValues ( ) . isEmpty ( ) ) { throw new JaxbProtoConvertException ( String . format ( "Empty enumeration %s encountered while printing " + "message %s" , enumeration . getType ( ) . getSimpleName ( ) , enumeration . getProtoMessage ( ) . getName ( ) ) ) ; } int index = 1 ; for ( String value : enumeration . getValues ( ) ) { outStream . format ( "    %s = %d;%n" , value , index ++ ) ; } outStream . println ( "  }" ) ; }
This method is responsible for taking a specified {@link ProtoEnum} and writing it to the provided
 {@link PrintStream}.
This method is responsible for taking a specified { @link ProtoEnum } and writing it to the provided { @link PrintStream } .
// NOCHECKSTYLE: Duplicate string is more readable // NOCHECKSTYLE: Duplicate string is more readable