bean-discovery-mode attribute within beans.xml. If a
* beans.xml file does not contain the bean-discovery-mode attribute, the value defaults to
- * {@link BeanDiscoveryMode#ALL}.
+ * {@link BeanDiscoveryMode#ANNOTATED}.
*
* @author Jozef Hartinger
*
diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Deployment.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Deployment.java
index ffeadfcb..2cb2b783 100644
--- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Deployment.java
+++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Deployment.java
@@ -140,14 +140,9 @@ public interface Deployment {
/**
* Specifies the extensions this deployment should call observer methods on.
*
- * JSR-299 specifies that extensions should be loaded using Service Providers from the JAR
- * File specification
- *
- * Weld delegates this task to the container, allowing the container to programatically alter the extensions registered. To
- * load extensions, the container could use the {@link ServiceLoader} available in the JDK (since Java 6). In pre Java 6
- * environments, the container must provide the ServiceLoader itself. We provide an example Service Loader here.
+ * CDI extensions are registered as service providers for {@link Extension}.
+ * Weld delegates loading to the container, allowing it to programmatically alter the registered extensions.
+ * The container can use {@link ServiceLoader} to discover extension providers.
*
* @return the extensions to call observer methods on, or an empty list if there are no observers
*/
diff --git a/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java b/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java
index 9945d99c..bd090044 100644
--- a/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java
+++ b/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java
@@ -226,13 +226,15 @@ public interface WeldManager extends BeanManager, ELAwareBeanManager, Serializab
*
* Note that for each scope, there might be more than one {@link Context}, but there can be at most one active at a time.
*
+ * The default implementation returns a snapshot of the active contexts.
+ *
* @return Collection of all currently active {@link Context}s
*/
default Collection
- * This feature is planned to be added into specification as part of
- * this issue.
- *
- * @param scopeType the {@linkplain jakarta.enterprise.context scope}; must not be {@code null}
- * @return immutable collection of {@linkplain Context context objects}; never {@code null}, but may be empty
- */
- Collection
* The configurator behaves in the same manner as {@link BeanConfigurator}. * Configured bean is added automatically at the end of the observer invocation. @@ -52,7 +52,11 @@ public interface WeldAfterBeanDiscovery extends AfterBeanDiscovery { *
* * @return a configurator to configure custom new bean + * @deprecated use {@link AfterBeanDiscovery#addBean()} through the standard {@link AfterBeanDiscovery} interface + * and use {@link BeanConfigurator} as the configurator type. This override only narrows the return type + * and provides no additional functionality. */ + @Deprecated(since = "7.0", forRemoval = true) @Override public
- * Allows to set a priority to an alternative bean hence selecting it globally.
- * Has the same effect as putting {@link Priority} annotation on an actual bean class
- * or implementing {@link Prioritized} interface with custom bean classes.
- * This method has no effect on custom beans which are not alternatives.
- *
- * @param priority the priority of this bean
- * @return self
- */
@Override
WeldBeanConfigurator
- * In the following example we filter out beans which are not {@link Dependent} then sort the beans by priority and use the
- * handler whose bean has the highest
- * priority (according to {@link #getPriorityComparator()}) to obtain the hello string. Note that contextual references for
- * beans with lower priority are not
- * created at all.
+ * In the following example we filter out beans which are not {@link Dependent}, sort the beans by priority, and use the
+ * handle whose bean has the highest priority (according to {@link #getHandlePriorityComparator()}) to obtain the hello string.
+ * Contextual references for beans with lower priority are not created at all.
*
- * The contextual reference is obtained lazily, i.e. when first needed.
- *
- * Note that the returned {@link Iterable} is stateless and so each {@link Iterable#iterator()} produces a new set of
- * handlers.
- *
- * Allows to inspect the metadata of the relevant bean and also to destroy the underlying contextual instance.
- *
- * A key value under which we store interceptor bindings in {@link InvocationContext}
- */
- @Deprecated
- String INTERCEPTOR_BINDINGS_KEY = "org.jboss.weld.interceptor.bindings";
-
- /**
- * @deprecated use {@link #getInterceptorBindings(Class)}
- *
- * @param annotationType type of the interceptor binding annotations
- * @return immutable set of interceptor binding annotations of given type, never null
- * @param
@@ -49,8 +42,8 @@
* WeldInstance<HelloProvider> instance;
*
* String hello() {
- * HelloProvider helloProvider = instance.handlersStream().filter(h -> h.getBean().getScope().equals(Dependent.class))
- * .sorted(instance.getPriorityComparator()).findFirst().map(Handler::get).orElse(null);
+ * HelloProvider helloProvider = instance.handlesStream().filter(h -> h.getBean().getScope().equals(Dependent.class))
+ * .sorted(instance.getHandlePriorityComparator()).findFirst().map(Instance.Handle::get).orElse(null);
* if (helloProvider != null)
* return helloProvider.getHello();
* return "No hello provider found!";
@@ -64,70 +57,6 @@
*/
public interface WeldInstance
- *
- *
- * @return a comparator instance
- */
- @Deprecated
- Comparator
@@ -168,57 +97,4 @@ default Stream extends Handler
- *
- *
- * @see Instance#destroy(Object)
- */
- void destroy();
-
- /**
- * Delegates to {@link #destroy()}.
- */
- @Override
- void close();
-
- }
-
-}
\ No newline at end of file
+}
diff --git a/weld/src/main/java/org/jboss/weld/interceptor/WeldInvocationContext.java b/weld/src/main/java/org/jboss/weld/interceptor/WeldInvocationContext.java
deleted file mode 100644
index ee9d0617..00000000
--- a/weld/src/main/java/org/jboss/weld/interceptor/WeldInvocationContext.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2014, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.interceptor;
-
-import java.lang.annotation.Annotation;
-import java.util.Set;
-
-import jakarta.interceptor.InvocationContext;
-
-/**
- * Represents an enhanced version of {@link InvocationContext}.
- *
- * @author Martin Kouba
- * @see CDI-468
- */
-public interface WeldInvocationContext extends InvocationContext {
-
- /**
- * Deprecated, users are encouraged to use {@link InvocationContext#getInterceptorBindings()} instead.
- *
- * builder.setInstanceLookup()
- * .setArgumentTransformer(0, String.class, "toUpperCase")
- * .setReturnValueTransformer(Transformations.class, "repeatTwice")
+ * builder.withInstanceLookup()
+ * .withArgumentTransformer(0, String.class, "toUpperCase")
+ * .withReturnValueTransformer(Transformations.class, "repeatTwice")
* .build();
*
*
@@ -263,7 +263,7 @@
* deployment, as described in previous sections. Other types are checked during invocation,
* at the very least due to the type checks performed implicitly by the JVM. The lookups,
* transformers and the wrapper must arrange the inputs and outputs so that when the method
- * is eventually invoked, the rules described in
+ * is eventually invoked, the rules described in {@link Invoker#invoke(Object, Object[]) Invoker.invoke()} are satisfied.
*/
public interface WeldInvokerBuilder