Home / Type/ Type Type — spring-boot Architecture

Type Type — spring-boot Architecture

Architecture documentation for the Type type/interface in Profiles.java from the spring-boot codebase.

Entity Profile

Source Code

core/spring-boot/src/main/java/org/springframework/boot/context/config/Profiles.java lines 227–267

	private enum Type {

		ACTIVE(AbstractEnvironment.ACTIVE_PROFILES_PROPERTY_NAME, Environment::getActiveProfiles, true,
				Collections.emptySet()),

		DEFAULT(AbstractEnvironment.DEFAULT_PROFILES_PROPERTY_NAME, Environment::getDefaultProfiles, false,
				Collections.singleton("default"));

		private final Function<Environment, String[]> getter;

		private final boolean mergeWithEnvironmentProfiles;

		private final String name;

		private final Set<String> defaultValue;

		Type(String name, Function<Environment, String[]> getter, boolean mergeWithEnvironmentProfiles,
				Set<String> defaultValue) {
			this.name = name;
			this.getter = getter;
			this.mergeWithEnvironmentProfiles = mergeWithEnvironmentProfiles;
			this.defaultValue = defaultValue;
		}

		String getName() {
			return this.name;
		}

		String[] get(Environment environment) {
			return this.getter.apply(environment);
		}

		Set<String> getDefaultValue() {
			return this.defaultValue;
		}

		boolean isMergeWithEnvironmentProfiles() {
			return this.mergeWithEnvironmentProfiles;
		}

	}

Analyze Your Own Codebase

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

Try Supermodel Free