List<JavaElementArrangementEntry> (@NotNull PsiElement root, @Nullable Document document, @NotNull Collection<? extends TextRange> ranges, @NotNull ArrangementSettings settings) { // Following entries are subject to arrangement: class, interface, field, method. JavaArrangementParseInfo parseInfo = new JavaArrangementParseInfo(); root.accept(new JavaArrangementVisitor(parseInfo, document, ranges, settings, true)); for (ArrangementGroupingRule rule : settings.getGroupings()) { if (GETTERS_AND_SETTERS.equals(rule.getGroupingType())) { setupGettersAndSetters(parseInfo); } else if (DEPENDENT_METHODS.equals(rule.getGroupingType())) { setupUtilityMethods(parseInfo, rule.getOrderType()); } else if (OVERRIDDEN_METHODS.equals(rule.getGroupingType())) { setupOverriddenMethods(parseInfo); } } List<ArrangementEntryDependencyInfo> fieldDependencyRoots = parseInfo.getFieldDependencyRoots(); if (!fieldDependencyRoots.isEmpty()) { setupFieldInitializationDependencies(fieldDependencyRoots, settings, parseInfo); } return parseInfo.getEntries(); }