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

parseProjectTypes() — spring-boot Function Reference

Architecture documentation for the parseProjectTypes() function in InitializrServiceMetadata.java from the spring-boot codebase.

Function java GradlePlugin AotProcessing calls 9 called by 1

Entity Profile

Dependency Diagram

graph TD
  e721633d_ad67_37e4_3e15_bcafca31adc2["parseProjectTypes()"]
  5e73729f_45b6_854c_8e3b_855cb22017ae["InitializrServiceMetadata()"]
  5e73729f_45b6_854c_8e3b_855cb22017ae -->|calls| e721633d_ad67_37e4_3e15_bcafca31adc2
  bce510cf_7d62_2e24_bead_369f8b5a84e7["has()"]
  e721633d_ad67_37e4_3e15_bcafca31adc2 -->|calls| bce510cf_7d62_2e24_bead_369f8b5a84e7
  34a3cce4_cf3e_ddb5_4b68_b2f3a09e83d5["parseType()"]
  e721633d_ad67_37e4_3e15_bcafca31adc2 -->|calls| 34a3cce4_cf3e_ddb5_4b68_b2f3a09e83d5
  b8f2ff6b_308a_b73a_6428_a5a640b32ac0["getContent()"]
  e721633d_ad67_37e4_3e15_bcafca31adc2 -->|calls| b8f2ff6b_308a_b73a_6428_a5a640b32ac0
  5495b54b_8367_16ae_b97b_da3b72a0a1e9["setDefaultItem()"]
  e721633d_ad67_37e4_3e15_bcafca31adc2 -->|calls| 5495b54b_8367_16ae_b97b_da3b72a0a1e9
  3128ccd0_28ac_1273_dfe1_db2bf2f8d7d9["getJSONObject()"]
  e721633d_ad67_37e4_3e15_bcafca31adc2 -->|calls| 3128ccd0_28ac_1273_dfe1_db2bf2f8d7d9
  6e420626_9c66_5f20_7665_83a5a7322d32["getJSONArray()"]
  e721633d_ad67_37e4_3e15_bcafca31adc2 -->|calls| 6e420626_9c66_5f20_7665_83a5a7322d32
  5f0b7260_2ffb_2128_1491_90aaaa4c2740["getString()"]
  e721633d_ad67_37e4_3e15_bcafca31adc2 -->|calls| 5f0b7260_2ffb_2128_1491_90aaaa4c2740
  962a1b8e_5945_fd2e_b3a6_b6f25d6bc0b1["length()"]
  e721633d_ad67_37e4_3e15_bcafca31adc2 -->|calls| 962a1b8e_5945_fd2e_b3a6_b6f25d6bc0b1
  e3be2238_5db5_c42d_7dea_fc316e36c89c["put()"]
  e721633d_ad67_37e4_3e15_bcafca31adc2 -->|calls| e3be2238_5db5_c42d_7dea_fc316e36c89c
  style e721633d_ad67_37e4_3e15_bcafca31adc2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrServiceMetadata.java lines 144–161

	private MetadataHolder<String, ProjectType> parseProjectTypes(JSONObject root) throws JSONException {
		MetadataHolder<String, ProjectType> result = new MetadataHolder<>();
		if (!root.has(TYPE_EL)) {
			return result;
		}
		JSONObject type = root.getJSONObject(TYPE_EL);
		JSONArray array = type.getJSONArray(VALUES_EL);
		String defaultType = (type.has(DEFAULT_ATTRIBUTE) ? type.getString(DEFAULT_ATTRIBUTE) : null);
		for (int i = 0; i < array.length(); i++) {
			JSONObject typeJson = array.getJSONObject(i);
			ProjectType projectType = parseType(typeJson, defaultType);
			result.getContent().put(projectType.getId(), projectType);
			if (projectType.isDefaultType()) {
				result.setDefaultItem(projectType);
			}
		}
		return result;
	}

Domain

Subdomains

Frequently Asked Questions

What does parseProjectTypes() do?
parseProjectTypes() is a function in the spring-boot codebase.
What does parseProjectTypes() call?
parseProjectTypes() calls 9 function(s): getContent, getJSONArray, getJSONObject, getString, has, length, parseType, put, and 1 more.
What calls parseProjectTypes()?
parseProjectTypes() is called by 1 function(s): InitializrServiceMetadata.

Analyze Your Own Codebase

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

Try Supermodel Free