1111import io .quarkus .builder .item .SimpleBuildItem ;
1212import io .quarkus .deployment .BootstrapConfig ;
1313
14+ /**
15+ * A build item used to provide a application dependency model.
16+ *
17+ * @see ApplicationModel
18+ */
1419public final class AppModelProviderBuildItem extends SimpleBuildItem {
1520
1621 private static final Logger log = Logger .getLogger (AppModelProviderBuildItem .class );
1722
1823 private final ApplicationModel appModel ;
24+
1925 private final Supplier <DependencyInfoProvider > depInfoProvider ;
2026
2127 public AppModelProviderBuildItem (ApplicationModel appModel ) {
@@ -27,6 +33,20 @@ public AppModelProviderBuildItem(ApplicationModel appModel, Supplier<DependencyI
2733 this .depInfoProvider = depInfoProvider ;
2834 }
2935
36+ /**
37+ * Validates the platform imports in the application model against the provided bootstrap configuration.
38+ * The behavior in case of misalignment depends on the provided {@link BootstrapConfig#misalignedPlatformImports()}:
39+ * <ul>
40+ * <li><b>ERROR</b>: Throws a {@link RuntimeException}.</li>
41+ * <li><b>WARN</b>: Logs a warning.</li>
42+ * <li><b>IGNORE</b>: Skips validation entirely.</li>
43+ * </ul>
44+ *
45+ * @param config the bootstrap configuration
46+ * @return the validated application model
47+ * @throws RuntimeException if platform imports are misaligned and the configuration is set to {@code ERROR}
48+ * or if the configuration is unrecognized.
49+ */
3050 public ApplicationModel validateAndGet (BootstrapConfig config ) {
3151 final PlatformImports platforms = appModel .getPlatforms ();
3252 if (platforms != null && !BootstrapConfig .MisalignedPlatformImports .IGNORE .equals (config .misalignedPlatformImports ())
0 commit comments