diff --git a/api/src/main/java/jakarta/enterprise/inject/spi/BeanManager.java b/api/src/main/java/jakarta/enterprise/inject/spi/BeanManager.java index 071e66949..396d5021b 100644 --- a/api/src/main/java/jakarta/enterprise/inject/spi/BeanManager.java +++ b/api/src/main/java/jakarta/enterprise/inject/spi/BeanManager.java @@ -93,86 +93,7 @@ * @author David Allen * @author Antoine Sabot-Durand */ -public interface BeanManager { - - - /** - *
- * Obtains a contextual reference for a certain {@linkplain Bean bean} and a certain bean type of the bean. - *
- * - * @param bean the {@link Bean} object representing the bean - * @param beanType a bean type that must be implemented by any client proxy that is returned - * @param ctx a {@link CreationalContext} that may be used to destroy any object with scope - * {@link Dependent} that is created - * @return a contextual reference representing the bean - * @throws IllegalArgumentException if the given type is not a bean type of the given bean - * @throws IllegalStateException if called during application initialization, before the {@link AfterDeploymentValidation} - * event is fired. - */ - public Object getReference(Bean> bean, Type beanType, CreationalContext> ctx); - - /** - *- * Obtains an injectable reference for a certain {@linkplain InjectionPoint injection point}. - *
- * - * @param ij the target injection point - * @param ctx a {@link CreationalContext} that may be used to destroy any object with scope - * {@link Dependent} that is created - * @return the injectable reference - * @throws UnsatisfiedResolutionException if typesafe resolution results in an unsatisfied dependency - * @throws AmbiguousResolutionException typesafe resolution results in an unresolvable ambiguous dependency - * @throws IllegalStateException if called during application initialization, before the {@link AfterDeploymentValidation} - * event is fired. - */ - public Object getInjectableReference(InjectionPoint ij, CreationalContext> ctx); - - /** - * Obtain an instance of a {@link CreationalContext} for the given - * {@linkplain Contextual contextual type}, or for a non-contextual object. - * - * @paramBeanManager
was injected or the Java EE component from whose JNDI
- * environment namespace the BeanManager
was obtained, according to the rules of typesafe resolution. If no
- * qualifiers are given, the {@linkplain Default default qualifier} is assumed.
- *
- * Note that when called during invocation of an {@link AfterBeanDiscovery} event observer,
- * this method will only return beans discovered by the container before the {@link AfterBeanDiscovery} event is fired.
- *
- * @param beanType the required bean type
- * @param qualifiers the required qualifiers
- * @return the resulting set of {@linkplain Bean beans}
- * @throws IllegalArgumentException if the given type represents a type variable
- * @throws IllegalArgumentException if two instances of the same non repeating qualifier type are given
- * @throws IllegalArgumentException if an instance of an annotation that is not a qualifier type is given
- * @throws IllegalStateException if called during application initialization, before the {@link AfterBeanDiscovery}
- * event is fired.
- */
- public SetBeanManager
was injected or the Java EE component from whose JNDI environment namespace
- * the BeanManager
was obtained, according to the rules of EL name resolution.
- *
- * Note that when called during invocation of an {@link AfterBeanDiscovery} event observer,
- * this method will only return beans discovered by the container before the {@link AfterBeanDiscovery} event is fired.
- *
- * @param name the EL name
- * @return the resulting set of {@linkplain Bean beans}
- * @throws IllegalStateException if called during application initialization, before the {@link AfterBeanDiscovery}
- * event is fired.
- */
- public SetBeanManager
was
- * injected or the Java EE component from whose JNDI environment namespace the BeanManager
was obtained.
- *
- * Note that when called during invocation of an {@link AfterBeanDiscovery} event observer,
- * this method will only return interceptors discovered by the container before the {@link AfterBeanDiscovery} event is
- * fired.
- *
- * @param type the type of the interception
- * @param interceptorBindings the interceptor bindings
- * @return the resulting set of {@linkplain Interceptor interceptors}
- * @throws IllegalArgumentException if no interceptor binding type is given
- * @throws IllegalArgumentException if two instances of the same interceptor binding type are given
- * @throws IllegalArgumentException if an instance of an annotation that is not an interceptor binding type is given
- * @throws IllegalStateException if called during application initialization, before the {@link AfterBeanDiscovery}
- * event is fired.
- */
- public Listtrue
if the annotation type is a {@linkplain jakarta.enterprise.context normal scope type}
- */
- public boolean isNormalScope(Class extends Annotation> annotationType);
-
/**
* Test the given annotation type to determine if it is a passivating {@linkplain jakarta.enterprise.context scope type}.
*
@@ -299,32 +169,6 @@ public interface BeanManager {
*/
public boolean isPassivatingScope(Class extends Annotation> annotationType);
- /**
- * Test the given annotation type to determine if it is a {@linkplain jakarta.inject.Qualifier qualifier type}.
- *
- * @param annotationType the annotation type
- * @return true
if the annotation type is a {@linkplain jakarta.inject.Qualifier qualifier type}
- */
- public boolean isQualifier(Class extends Annotation> annotationType);
-
- /**
- * Test the given annotation type to determine if it is an {@linkplain jakarta.interceptor.InterceptorBinding interceptor
- * binding type} .
- *
- * @param annotationType the annotation to test
- * @return true
if the annotation type is a {@linkplain jakarta.interceptor.InterceptorBinding interceptor binding
- * type}
- */
- public boolean isInterceptorBinding(Class extends Annotation> annotationType);
-
- /**
- * Test the given annotation type to determine if it is a {@linkplain Stereotype stereotype}.
- *
- * @param annotationType the annotation type
- * @return true
if the annotation type is a {@linkplain Stereotype stereotype}
- */
- public boolean isStereotype(Class extends Annotation> annotationType);
-
/**
* Obtains the set of meta-annotations for a certain {@linkplain jakarta.interceptor.InterceptorBinding interceptor binding
* type} .
@@ -384,17 +228,6 @@ public interface BeanManager {
*/
public int getInterceptorBindingHashCode(Annotation interceptorBinding);
- /**
- * Obtains an active {@linkplain Context context object} for the given
- * {@linkplain jakarta.enterprise.context scope} .
- *
- * @param scopeType the {@linkplain jakarta.enterprise.context scope}
- * @return the {@linkplain Context context object}
- * @throws ContextNotActiveException if there is no active context object for the given scope
- * @throws IllegalArgumentException if there is more than one active context object for the given scope
- */
- public Context getContext(Class extends Annotation> scopeType);
-
/**
* Returns a {@link jakarta.el.ELResolver} that resolves beans by EL name.
*
@@ -590,39 +423,4 @@ public java.lang.Object
and specified qualifier @Default
- * It allows typesafe synchronous or asynchronous event firing without injection of {@link Event} built-in bean requirement.
- *
- * @return a new {@link Event} object whose event type is Object
and qualifier @Default
- * @since 2.0
- */
- Event