static EnumField newEnumField(EnumGroup enumGroup, Field.Reference fr, Message owner)
    {
        EnumField ef = new EnumField(enumGroup);
        ef.owner = owner;
        ef.packable = true;
        String refName = (String) fr.getDefaultValue();
        if (refName == null)
            ef.defaultValue = enumGroup.getFirstValue();
        else
        {
            ef.defaultValueSet = true;
            ef.defaultValue = enumGroup.getValue(refName);
            if (ef.defaultValue == null)
            {
                throw err("The field: " + ef.name +
                        " contains an unknown enum value: " + refName, owner.getProto());
            }
        }
        copy(fr, ef);
        // System.err.println(owner.getRelativeName() + "." + ef.name +": " + ef.getJavaType());
        return ef;
    }
Represents the message defined in the {@link Proto}.

@author David Yu
@created Dec 19, 2009
protostuff-parser/src/main/java/io/protostuff/parser/Message.java