void () { Field[] commonFields = CommonCodeStyleSettings.class.getFields(); for (Field field : commonFields) { boolean fieldExistsInCustomizable = false; String fieldName = field.getName(); int fieldModifiers = field.getModifiers(); if (Modifier.isPublic(fieldModifiers) && !Modifier.isStatic(fieldModifiers) && !"PARENT_SETTINGS_INSTALLED".equals(fieldName) && !"FORCE_REARRANGE_MODE".equals(fieldName) ) { for (CodeStyleSettingsCustomizable.SpacingOption option : CodeStyleSettingsCustomizable.SpacingOption.values()) { if (option.toString().equals(field.getName())) { fieldExistsInCustomizable = true; break; } } if (!fieldExistsInCustomizable) { for (CodeStyleSettingsCustomizable.WrappingOrBraceOption option : CodeStyleSettingsCustomizable.WrappingOrBraceOption.values()) { if (option.toString().equals(field.getName())) { fieldExistsInCustomizable = true; break; } } } if (!fieldExistsInCustomizable) { for (CodeStyleSettingsCustomizable.BlankLinesOption option : CodeStyleSettingsCustomizable.BlankLinesOption.values()) { if (option.toString().equals(field.getName())) { fieldExistsInCustomizable = true; break; } } } if (!fieldExistsInCustomizable) { for (CodeStyleSettingsCustomizable.CommenterOption option : CodeStyleSettingsCustomizable.CommenterOption.values()) { if (option.toString().equals(field.getName())) { fieldExistsInCustomizable = true; break; } } } assertTrue("Field " + field.getName() + " is not declared in CodeStyleSettingsCustomizable", fieldExistsInCustomizable); } } }