try {
attributeField = enumClass.getField(attribute.name());
} catch (NoSuchFieldException e) {
throw new AssertionError(e);
}
SerializeAs serializeAs = attributeField.getAnnotation(SerializeAs.class);
Serialization serialization;
if (serializeAs != null) {
serialization = serializeAs.value();
if (!seenSerializations.add(serialization))
throw new RuntimeException("duplicate serialization policy in " + enumClass);
}
else {
serialization = null;