CollectFieldData field, TypeParameterLookup typeParamLookup, int[] nextEnumOrdinal,
TypeOracleBuildContext context) {
Map<Class<? extends Annotation>, Annotation> declaredAnnotations = Maps.newHashMap();
resolveAnnotations(logger, field.getAnnotations(), declaredAnnotations);
String name = field.getName();
JField jfield;
if ((field.getAccess() & Opcodes.ACC_ENUM) != 0) {
assert (unresolvedType.isEnum() != null);
jfield = newEnumConstant(unresolvedType, name, declaredAnnotations, nextEnumOrdinal[0]++);
} else {
JField newField = newField(unresolvedType, name, declaredAnnotations);
jfield = newField;
}
// Get modifiers.
addModifierBits(jfield, mapBits(ASM_TO_SHARED_MODIFIERS, field.getAccess()));