Set<MetricEvent> () { Set<MetricEvent> result = new HashSet<>(); JavaRefactoringSettings settings = JavaRefactoringSettings.getInstance(); JavaRefactoringSettings defaultSettings = new JavaRefactoringSettings(); addBoolIfDiffers(result, settings, defaultSettings, s -> s.RENAME_SEARCH_IN_COMMENTS_FOR_FIELD, RENAME_SEARCH_IN_COMMENTS_FOR_FIELD); addBoolIfDiffers(result, settings, defaultSettings, s -> s.RENAME_SEARCH_IN_COMMENTS_FOR_METHOD, RENAME_SEARCH_IN_COMMENTS_FOR_METHOD); addBoolIfDiffers(result, settings, defaultSettings, s -> s.RENAME_SEARCH_IN_COMMENTS_FOR_CLASS, RENAME_SEARCH_IN_COMMENTS_FOR_CLASS); addBoolIfDiffers(result, settings, defaultSettings, s -> s.RENAME_SEARCH_IN_COMMENTS_FOR_PACKAGE, RENAME_SEARCH_IN_COMMENTS_FOR_PACKAGE); addBoolIfDiffers(result, settings, defaultSettings, s -> s.RENAME_SEARCH_IN_COMMENTS_FOR_VARIABLE, RENAME_SEARCH_IN_COMMENTS_FOR_VARIABLE); addBoolIfDiffers(result, settings, defaultSettings, s -> s.RENAME_SEARCH_FOR_TEXT_FOR_FIELD, RENAME_SEARCH_FOR_TEXT_FOR_FIELD); addBoolIfDiffers(result, settings, defaultSettings, s -> s.RENAME_SEARCH_FOR_TEXT_FOR_METHOD, RENAME_SEARCH_FOR_TEXT_FOR_METHOD); addBoolIfDiffers(result, settings, defaultSettings, s -> s.RENAME_SEARCH_FOR_TEXT_FOR_CLASS, RENAME_SEARCH_FOR_TEXT_FOR_CLASS); addBoolIfDiffers(result, settings, defaultSettings, s -> s.RENAME_SEARCH_FOR_TEXT_FOR_PACKAGE, RENAME_SEARCH_FOR_TEXT_FOR_PACKAGE); addBoolIfDiffers(result, settings, defaultSettings, s -> s.RENAME_SEARCH_FOR_TEXT_FOR_VARIABLE, RENAME_SEARCH_FOR_TEXT_FOR_VARIABLE); addBoolIfDiffers(result, settings, defaultSettings, s -> s.RENAME_INHERITORS, RENAME_AUTO_INHERITORS); addBoolIfDiffers(result, settings, defaultSettings, s -> s.RENAME_OVERLOADS, RENAME_AUTO_OVERLOADS); addBoolIfDiffers(result, settings, defaultSettings, s -> s.RENAME_TESTS, RENAME_AUTO_TESTS); addBoolIfDiffers(result, settings, defaultSettings, s -> s.RENAME_VARIABLES, RENAME_AUTO_VARIABLES); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INTRODUCE_LOCAL_CREATE_FINALS, INTRODUCE_LOCAL_CREATE_FINALS); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INTRODUCE_LOCAL_CREATE_VAR_TYPE, INTRODUCE_LOCAL_USE_VAR); addBoolIfDiffers(result, settings, defaultSettings, s -> s.MOVE_SEARCH_IN_COMMENTS, MOVE_SEARCH_IN_COMMENTS); addBoolIfDiffers(result, settings, defaultSettings, s -> s.MOVE_SEARCH_FOR_TEXT, MOVE_SEARCH_FOR_TEXT); addBoolIfDiffers(result, settings, defaultSettings, s -> s.ENCAPSULATE_FIELDS_USE_ACCESSORS_WHEN_ACCESSIBLE, ENCAPSULATE_FIELDS_USE_ACCESSORS); addMetricIfDiffers(result, settings, defaultSettings, s -> getReplaceGettersOption(s.INTRODUCE_PARAMETER_REPLACE_FIELDS_WITH_GETTERS), javadoc -> INTRODUCE_PARAMETER_REPLACE_FIELDS_WITH_GETTERS.metric(javadoc)); addJavadoc(result, settings, defaultSettings, EXTRACT_INTERFACE_JAVADOC, s -> s.EXTRACT_INTERFACE_JAVADOC); addJavadoc(result, settings, defaultSettings, EXTRACT_SUPERCLASS_JAVADOC, s -> s.EXTRACT_SUPERCLASS_JAVADOC); addJavadoc(result, settings, defaultSettings, PULL_UP_MEMBERS_JAVADOC, s -> s.PULL_UP_MEMBERS_JAVADOC); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INTRODUCE_PARAMETER_DELETE_LOCAL_VARIABLE, INTRODUCE_PARAMETER_DELETE_LOCAL); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INTRODUCE_PARAMETER_USE_INITIALIZER, INTRODUCE_PARAMETER_USE_INITIALIZER); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INTRODUCE_PARAMETER_CREATE_FINALS, INTRODUCE_PARAMETER_CREATE_FINALS); addMetricIfDiffers(result, settings, defaultSettings, s -> getVisibility(s.INTRODUCE_FIELD_VISIBILITY), javadoc -> INTRODUCE_FIELD_VISIBILITY.metric(VISIBILITY.with(javadoc))); addMetricIfDiffers(result, settings, defaultSettings, s -> getVisibility(s.INTRODUCE_CONSTANT_VISIBILITY), javadoc -> INTRODUCE_CONSTANT_VISIBILITY.metric(VISIBILITY.with(javadoc))); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INTRODUCE_CONSTANT_REPLACE_ALL, INTRODUCE_CONSTANT_REPLACE_ALL); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INLINE_METHOD_THIS, INLINE_METHOD_THIS_ONLY_CHOICE); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INLINE_METHOD_KEEP, INLINE_METHOD_ALL_AND_KEEP_CHOICE); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INLINE_SUPER_CLASS_THIS, INLINE_SUPER_CLASS_THIS_ONLY_CHOICE); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INLINE_FIELD_THIS, INLINE_FIELD_THIS_ONLY_CHOICE); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INLINE_FIELD_KEEP, INLINE_FIELD_ALL_AND_KEEP_CHOICE); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INLINE_LOCAL_THIS, INLINE_LOCAL_THIS_ONLY_CHOICE); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INHERITANCE_TO_DELEGATION_DELEGATE_OTHER, INHERITANCE_TO_DELEGATION_DELEGATE_OTHER); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INLINE_CLASS_SEARCH_IN_COMMENTS, INLINE_CLASS_SEARCH_IN_COMMENTS); addBoolIfDiffers(result, settings, defaultSettings, s -> s.INLINE_CLASS_SEARCH_IN_NON_JAVA, INLINE_CLASS_SEARCH_IN_NON_JAVA); return result; }