Skip to content

Commit

Permalink
Allow registering BCE in CDI SE without discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
manovotn committed May 21, 2024
1 parent 9cf8fd9 commit 412be04
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -190,22 +191,32 @@ 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<? extends Extension>... 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<? extends BuildCompatibleExtension>... extensions);

/**
* Add interceptor classes to the list of enabled interceptors for the synthetic bean archive.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.lang.annotation.Annotation;
import java.util.Map;

import jakarta.enterprise.inject.build.compatible.spi.BuildCompatibleExtension;
import jakarta.enterprise.inject.se.SeContainer;
import jakarta.enterprise.inject.se.SeContainerInitializer;
import jakarta.enterprise.inject.spi.Extension;
Expand Down Expand Up @@ -64,6 +65,11 @@ public final SeContainerInitializer addExtensions(Class<? extends Extension>...
return null;
}

@Override
public SeContainerInitializer addBuildCompatibleExtensions(Class<? extends BuildCompatibleExtension>... extensions) {
return null;
}

@Override
public SeContainerInitializer enableInterceptors(Class<?>... interceptorClasses) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.lang.annotation.Annotation;
import java.util.Map;

import jakarta.enterprise.inject.build.compatible.spi.BuildCompatibleExtension;
import jakarta.enterprise.inject.se.SeContainer;
import jakarta.enterprise.inject.se.SeContainerInitializer;
import jakarta.enterprise.inject.spi.Extension;
Expand Down Expand Up @@ -64,6 +65,11 @@ public final SeContainerInitializer addExtensions(Class<? extends Extension>...
return null;
}

@Override
public SeContainerInitializer addBuildCompatibleExtensions(Class<? extends BuildCompatibleExtension>... extensions) {
return null;
}

@Override
public SeContainerInitializer enableInterceptors(Class<?>... interceptorClasses) {
return null;
Expand Down

0 comments on commit 412be04

Please sign in to comment.