Skip to content

Commit

Permalink
Add getBeanContainer() method to SeContainer for consistency
Browse files Browse the repository at this point in the history
A new method called getBeanContainer() was added to the CDI type. For consistency this PR adds the same method to the SeContainer interface.
  • Loading branch information
graemerocher authored and manovotn committed Jun 28, 2021
1 parent 97e8e19 commit 6d00f71
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions api/src/main/java/jakarta/enterprise/inject/se/SeContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package jakarta.enterprise.inject.se;

import jakarta.enterprise.inject.Instance;
import jakarta.enterprise.inject.spi.BeanContainer;
import jakarta.enterprise.inject.spi.BeanManager;

/**
Expand All @@ -30,6 +31,7 @@
*
* @author Antoine Sabot-Durand
* @author John D. Ament
* @author Graeme Rocher
* @since 2.0
*/
public interface SeContainer extends Instance<Object>,AutoCloseable {
Expand Down Expand Up @@ -60,4 +62,15 @@ public interface SeContainer extends Instance<Object>,AutoCloseable {
*/
BeanManager getBeanManager();

/**
* Get the CDI {@link BeanContainer} for this container.
*
* Default implementation just forwards the call to {@link #getBeanManager()}.
*
* @return the {@link BeanContainer}
* @since 4.0.0
*/
default BeanContainer getBeanContainer() {
return getBeanManager();
}
}

0 comments on commit 6d00f71

Please sign in to comment.