Home / Function/ getInPriorityOrder() — spring-boot Function Reference

getInPriorityOrder() — spring-boot Function Reference

Architecture documentation for the getInPriorityOrder() function in AutoConfigurationSorter.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  fb65f121_a16c_3774_1533_6a74dc497848["getInPriorityOrder()"]
  7c1a96e5_93c6_439f_4cb2_483f9c88efd3["AutoConfigurationClasses()"]
  fb65f121_a16c_3774_1533_6a74dc497848 -->|calls| 7c1a96e5_93c6_439f_4cb2_483f9c88efd3
  00f5187b_9f25_8e91_e542_b06dd07ee08d["get()"]
  fb65f121_a16c_3774_1533_6a74dc497848 -->|calls| 00f5187b_9f25_8e91_e542_b06dd07ee08d
  a5288eff_2e00_4a9a_d944_aa039b01f252["getOrder()"]
  fb65f121_a16c_3774_1533_6a74dc497848 -->|calls| a5288eff_2e00_4a9a_d944_aa039b01f252
  cefc8180_70b8_c319_e0e6_daa286f852d0["sortByAnnotation()"]
  fb65f121_a16c_3774_1533_6a74dc497848 -->|calls| cefc8180_70b8_c319_e0e6_daa286f852d0
  style fb65f121_a16c_3774_1533_6a74dc497848 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationSorter.java lines 65–82

	List<String> getInPriorityOrder(Collection<String> classNames) {
		// Initially sort alphabetically
		List<String> alphabeticallyOrderedClassNames = new ArrayList<>(classNames);
		Collections.sort(alphabeticallyOrderedClassNames);
		// Then sort by order
		AutoConfigurationClasses classes = new AutoConfigurationClasses(this.metadataReaderFactory,
				this.autoConfigurationMetadata, alphabeticallyOrderedClassNames);
		List<String> orderedClassNames = new ArrayList<>(classNames);
		Collections.sort(orderedClassNames);
		orderedClassNames.sort((o1, o2) -> {
			int i1 = classes.get(o1).getOrder();
			int i2 = classes.get(o2).getOrder();
			return Integer.compare(i1, i2);
		});
		// Then respect @AutoConfigureBefore @AutoConfigureAfter
		orderedClassNames = sortByAnnotation(classes, orderedClassNames);
		return orderedClassNames;
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does getInPriorityOrder() do?
getInPriorityOrder() is a function in the spring-boot codebase.
What does getInPriorityOrder() call?
getInPriorityOrder() calls 4 function(s): AutoConfigurationClasses, get, getOrder, sortByAnnotation.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free