From 1fda29b555158b55d197a8511b0f7822bb474e6a Mon Sep 17 00:00:00 2001 From: Matej Novotny Date: Tue, 21 May 2024 13:19:34 +0200 Subject: [PATCH] Allow registering BCE in CDI SE without discovery --- .../inject/se/SeContainerInitializer.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/jakarta/enterprise/inject/se/SeContainerInitializer.java b/api/src/main/java/jakarta/enterprise/inject/se/SeContainerInitializer.java index cbf5056f..ef49ca54 100644 --- a/api/src/main/java/jakarta/enterprise/inject/se/SeContainerInitializer.java +++ b/api/src/main/java/jakarta/enterprise/inject/se/SeContainerInitializer.java @@ -20,6 +20,7 @@ import java.util.ServiceConfigurationError; import java.util.ServiceLoader; +import jakarta.enterprise.inject.build.compatible.spi.BuildCompatibleExtension; import jakarta.enterprise.inject.spi.Extension; /** @@ -190,22 +191,31 @@ private static SeContainerInitializer findSeContainerInitializer() { public abstract SeContainerInitializer addPackages(boolean scanRecursively, Package... packages); /** - * Add extensions to the set of extensions. + * Add portable extensions to the set of extensions. * - * @param extensions extensions to use in the container + * @param extensions portable extensions to use in the container * @return self */ public abstract SeContainerInitializer addExtensions(Extension... extensions); /** - * Add extensions to the set of extensions. + * Add portable extensions to the set of extensions. * - * @param extensions extensions class to use in the container + * @param extensions portable extension classes to use in the container * @return self */ @SuppressWarnings("unchecked") public abstract SeContainerInitializer addExtensions(Class... extensions); + /** + * Add build compatible extensions to the set of extensions. + * + * @param extensions build compatible extension classes to use in the container + * @return self + */ + @SuppressWarnings("unchecked") + public abstract SeContainerInitializer addBuildCompatibleExtensions(Class... extensions); + /** * Add interceptor classes to the list of enabled interceptors for the synthetic bean archive. *