From bd2b0d78d89145c489b1cf78e26e3af50e116bf2 Mon Sep 17 00:00:00 2001 From: Matej Novotny Date: Wed, 13 Sep 2023 17:12:35 +0200 Subject: [PATCH] Apply formatter changes --- .gitignore | 1 + pom.xml | 2 +- .../weld/bootstrap/api/CDI11Bootstrap.java | 22 +- .../jboss/weld/bootstrap/api/Environment.java | 3 +- .../weld/bootstrap/api/ServiceRegistry.java | 3 +- .../jboss/weld/bootstrap/api/Singleton.java | 6 +- .../IsolatedStaticSingletonProvider.java | 3 +- .../bootstrap/spi/BeanDeploymentArchive.java | 12 +- .../jboss/weld/bootstrap/spi/BeansXml.java | 5 +- .../spi/ClassAvailableActivation.java | 1 + .../jboss/weld/bootstrap/spi/Deployment.java | 3 +- .../bootstrap/spi/EEModuleDescriptor.java | 18 +- .../org/jboss/weld/bootstrap/spi/Filter.java | 73 ++-- .../jboss/weld/bootstrap/spi/Metadata.java | 2 + .../jboss/weld/bootstrap/spi/Scanning.java | 86 ++--- .../spi/SystemPropertyActivation.java | 2 + .../jboss/weld/bootstrap/spi/WeldFilter.java | 1 + .../spi/ExternalConfiguration.java | 6 +- .../api/AroundConstructCallback.java | 24 +- .../construction/api/ConstructionHandle.java | 3 +- .../api/WeldCreationalContext.java | 18 +- .../weld/ejb/spi/InterceptorBindings.java | 7 +- .../injection/spi/JpaInjectionServices.java | 4 +- .../spi/helpers/AbstractResourceServices.java | 5 +- .../ForwardingResourceInjectionServices.java | 2 +- .../api/WeldInjectionTargetBuilder.java | 29 +- .../api/WeldInjectionTargetFactory.java | 15 +- .../jboss/weld/manager/api/WeldManager.java | 41 ++- .../weld/resources/spi/ClassFileInfo.java | 33 +- .../weld/resources/spi/ClassFileServices.java | 9 +- .../weld/security/spi/SecurityServices.java | 9 +- .../serialization/spi/BeanIdentifier.java | 6 +- .../serialization/spi/ContextualStore.java | 3 +- .../weld/serialization/spi/ProxyServices.java | 25 +- .../spi/helpers/SerializableContextual.java | 3 +- .../SerializableContextualInstance.java | 5 +- .../spi/HttpContextActivationFilter.java | 6 +- .../RegexHttpContextActivationFilter.java | 3 +- .../transaction/spi/TransactionServices.java | 3 +- .../bootstrap/api/test/BootstrapTest.java | 314 +++++++++--------- .../bootstrap/api/test/MockBootstrap.java | 159 ++++----- .../api/test/MockEjbInjectionServices.java | 5 +- .../bootstrap/api/test/MockEjbServices.java | 50 ++- .../bootstrap/api/test/MockJpaServices.java | 5 +- .../api/test/MockResourceFactory.java | 2 +- .../api/test/MockResourceLoader.java | 34 +- .../api/test/MockResourceServices.java | 4 +- .../weld/bootstrap/api/test/MockService.java | 8 +- .../api/test/MockTransactionServices.java | 32 +- .../event/InterceptorConfigurator.java | 6 +- .../weld/context/ApplicationContext.java | 3 +- .../weld/context/ConversationContext.java | 8 +- .../jboss/weld/context/DependentContext.java | 3 +- .../jboss/weld/context/RequestContext.java | 16 +- .../jboss/weld/context/SessionContext.java | 8 +- .../jboss/weld/context/SingletonContext.java | 3 +- .../weld/context/WeldAlterableContext.java | 6 +- .../activator/ActivateRequestContext.java | 3 +- .../org/jboss/weld/context/bound/Bound.java | 12 +- .../weld/context/bound/BoundLiteral.java | 68 ++-- .../java/org/jboss/weld/context/ejb/Ejb.java | 12 +- .../jboss/weld/context/ejb/EjbLiteral.java | 68 ++-- .../org/jboss/weld/context/http/Http.java | 12 +- .../context/http/HttpConversationContext.java | 9 +- .../jboss/weld/context/http/HttpLiteral.java | 68 ++-- .../jboss/weld/context/unbound/Unbound.java | 12 +- .../weld/context/unbound/UnboundLiteral.java | 72 ++-- .../java/org/jboss/weld/events/WeldEvent.java | 10 +- .../weld/events/WeldNotificationOptions.java | 12 +- .../org/jboss/weld/inject/WeldInstance.java | 32 +- 70 files changed, 831 insertions(+), 727 deletions(-) diff --git a/.gitignore b/.gitignore index 0579c6f0..2c844207 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .project .settings .classpath +.cache target *.iml .idea/ diff --git a/pom.xml b/pom.xml index d03bc9ad..c2c13a9f 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.jboss.weld weld-parent - 46 + 47-SNAPSHOT diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/CDI11Bootstrap.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/CDI11Bootstrap.java index ea2dfa7c..a0aba400 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/CDI11Bootstrap.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/CDI11Bootstrap.java @@ -58,8 +58,10 @@ public interface CDI11Bootstrap extends Bootstrap { * *

* The container fires the {@link BeforeBeanDiscovery} event which allows extensions to register scopes and stereotypes. - * The container combines the registered scopes and stereotypes with scopes associated with the built-in contexts and built-in - * stereotypes and makes the resulting set available through {@link TypeDiscoveryConfiguration#getKnownBeanDefiningAnnotations()} + * The container combines the registered scopes and stereotypes with scopes associated with the built-in contexts and + * built-in + * stereotypes and makes the resulting set available through + * {@link TypeDiscoveryConfiguration#getKnownBeanDefiningAnnotations()} *

* *

@@ -83,10 +85,13 @@ public interface CDI11Bootstrap extends Bootstrap { * *

* - *

The resulting set is referred to as bean defining annotations hereafter.

+ *

+ * The resulting set is referred to as bean defining annotations hereafter. + *

* *

* Next, the integrator processes available archives according to these rules. The rules are exclusive. @@ -137,7 +142,8 @@ public interface CDI11Bootstrap extends Bootstrap { * *

* For each explicit bean archive the integrator creates an instance of {@link BeanDeploymentArchive} representing this - * archive. The {@link BeanDeploymentArchive#getBeanClasses()} or {@link BeanDeploymentArchive#getLoadedBeanClasses()} method returns a collection of all types present within the + * archive. The {@link BeanDeploymentArchive#getBeanClasses()} or {@link BeanDeploymentArchive#getLoadedBeanClasses()} + * method returns a collection of all types present within the * archive. Filtering rules defined in {@link BeansXml#getScanning()} are not required to be applied by the integrator and * are applied later on by Weld. The {@link BeanDeploymentArchive#getEjbs()} method returns a collection of EJB descriptors * for EJBs present in the archive. @@ -145,7 +151,8 @@ public interface CDI11Bootstrap extends Bootstrap { * *

* For each implicit bean archive the integrator creates an instance of {@link BeanDeploymentArchive} representing this - * archive. The {@link BeanDeploymentArchive#getBeanClasses()} or {@link BeanDeploymentArchive#getLoadedBeanClasses()} method of the bean archive returns all the types found in the + * archive. The {@link BeanDeploymentArchive#getBeanClasses()} or {@link BeanDeploymentArchive#getLoadedBeanClasses()} + * method of the bean archive returns all the types found in the * archive which are annotated with a bean defining annotations or are Session bean definitions. Filtering rules ( * {@link BeansXml#getScanning()}) are not required to be applied by the integrator. The * {@link BeanDeploymentArchive#getEjbs()} method returns a collection of EJB descriptors for Session beans present in the @@ -176,7 +183,8 @@ public interface CDI11Bootstrap extends Bootstrap { * *

* In addition to {@link Bootstrap#startContainer(Environment, Deployment)}, this method allows an identifier (contextId) to - * be assigned to the container. This identifier will be used to identify this application when invoking {@link Singleton} methods. + * be assigned to the container. This identifier will be used to identify this application when invoking {@link Singleton} + * methods. * * @param contextId the identifier of this application container instance * @param environment the environment in use, by default {@link Environments#EE} diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/Environment.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/Environment.java index c061edcf..bea22882 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/Environment.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/Environment.java @@ -37,7 +37,8 @@ public interface Environment { Set> getRequiredBeanDeploymentArchiveServices(); /** - * Environment aware of EE modules. In such environment each bean archive which belongs to a module should register {@link EEModuleDescriptor} + * Environment aware of EE modules. In such environment each bean archive which belongs to a module should register + * {@link EEModuleDescriptor} * * @return true by default */ diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/ServiceRegistry.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/ServiceRegistry.java index a3f7d35f..b74c9662 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/ServiceRegistry.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/ServiceRegistry.java @@ -47,7 +47,8 @@ public interface ServiceRegistry extends Iterable { * @param the service type to add * @param type the service type to add * @param service the service implementation - * @return null if no service implementation was previously associated with the given service. Otherwise, the previous service implementation is returned. + * @return null if no service implementation was previously associated with the given service. Otherwise, the previous + * service implementation is returned. */ S addIfAbsent(Class type, S service); diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/Singleton.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/Singleton.java index 7280542e..4973ff30 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/Singleton.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/Singleton.java @@ -18,9 +18,11 @@ package org.jboss.weld.bootstrap.api; /** - * Holds a reference to an application singleton. This singleton is used internally by Weld to store various application scoped objects. + * Holds a reference to an application singleton. This singleton is used internally by Weld to store various application scoped + * objects. * - * This allows Weld to operate as a shared library. In a shared mode, the same instance of Weld implementation is used by all the applications in a server + * This allows Weld to operate as a shared library. In a shared mode, the same instance of Weld implementation is used by all + * the applications in a server * environment. In the exclusive mode, each application loads a separate copy of Weld implementation at the application level. * * Alternative implementations of Singleton can be used as required diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/IsolatedStaticSingletonProvider.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/IsolatedStaticSingletonProvider.java index 59812e9e..a6af5c42 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/IsolatedStaticSingletonProvider.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/IsolatedStaticSingletonProvider.java @@ -39,7 +39,8 @@ private static class IsolatedStaticSingleton implements Singleton { public T get(String id) { if (object == null) { - throw new IllegalStateException("Singleton is not set. Is your Thread.currentThread().getContextClassLoader() set correctly?"); + throw new IllegalStateException( + "Singleton is not set. Is your Thread.currentThread().getContextClassLoader() set correctly?"); } return object; } diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/BeanDeploymentArchive.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/BeanDeploymentArchive.java index f3a41d65..d1843c2b 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/BeanDeploymentArchive.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/BeanDeploymentArchive.java @@ -61,7 +61,8 @@ public interface BeanDeploymentArchive { *

* *

- * For an implicit bean archive this method returns all the types found in the archive which are annotated with a bean defining annotation or are Session + * For an implicit bean archive this method returns all the types found in the archive which are annotated with a bean + * defining annotation or are Session * bean definitions. *

* @@ -72,7 +73,8 @@ public interface BeanDeploymentArchive { /** * Get all pre-loaded classes for the bean deployment archive. * - * Weld checks if there is an overlap of FQCNs between the classes returned from this method and class names returned from {@link #getBeanClasses()}. + * Weld checks if there is an overlap of FQCNs between the classes returned from this method and class names returned from + * {@link #getBeanClasses()}. * If two names overlap the class object returned from this method is used. * * @return the classes, empty if no pre-loaded classes are available @@ -83,8 +85,10 @@ default Collection> getLoadedBeanClasses() { } /** - * If possible, return all the classes found in the archive. For explicit bean archive the result of this method should be the same as for - * {@link #getBeanClasses()}. For implicit bean archive this method should also return types which are neither annotated with bean defining annotations nor + * If possible, return all the classes found in the archive. For explicit bean archive the result of this method should be + * the same as for + * {@link #getBeanClasses()}. For implicit bean archive this method should also return types which are neither annotated + * with bean defining annotations nor * are Session bean definitions. * * @return all classes found in the bean deployment archive, empty if no classes are present diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/BeansXml.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/BeansXml.java index 68649077..dd9aefd7 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/BeansXml.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/BeansXml.java @@ -43,7 +43,7 @@ public String getVersion() { return null; } - public boolean isTrimmed(){ + public boolean isTrimmed() { return false; } }; @@ -67,7 +67,8 @@ public boolean isTrimmed(){ * Note that since CDI 4.0, this method returns {@link BeanDiscoveryMode#ANNOTATED} if the file does not declare * discovery mode attribute. * - * @return The value of the bean-discovery-mode attribute or {@link BeanDiscoveryMode#ANNOTATED} if the file does not + * @return The value of the bean-discovery-mode attribute or {@link BeanDiscoveryMode#ANNOTATED} if the file + * does not * contain the bean-discovery-mode attribute. */ BeanDiscoveryMode getBeanDiscoveryMode(); diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/ClassAvailableActivation.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/ClassAvailableActivation.java index 8297bafa..cdf863ec 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/ClassAvailableActivation.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/ClassAvailableActivation.java @@ -14,6 +14,7 @@ public interface ClassAvailableActivation { /** * The name attribute + * * @return the name attribute */ String getClassName(); 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 8a05b59d..7c1cc461 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 @@ -52,7 +52,8 @@ * *

* The BeanDeploymentArchive tree represents the "logical structure" of the deployment; Given two archives A and B, which have a - * transitive closure of accessible archives A' and B', it allowable for the the archives A & B to be represented as a single + * transitive closure of accessible archives A' and B', it allowable for the the archives A & B to be represented as a + * single * BeanDeploymentArchive, assuming that A' and B' are bi-directionally accessible. *

* diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/EEModuleDescriptor.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/EEModuleDescriptor.java index 4d616693..e99cd1ce 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/EEModuleDescriptor.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/EEModuleDescriptor.java @@ -20,8 +20,10 @@ import org.jboss.weld.bootstrap.spi.helpers.EEModuleDescriptorImpl; /** - * In Java EE environment, each {@link BeanDeploymentArchive} should provide a description of the Java EE module it belongs to (WAR, RAR, etc.). This applies to - * physical bean archives deployed within the given module and also to logical bean archives that belong to the module. Bean archives that are not part of a + * In Java EE environment, each {@link BeanDeploymentArchive} should provide a description of the Java EE module it belongs to + * (WAR, RAR, etc.). This applies to + * physical bean archives deployed within the given module and also to logical bean archives that belong to the module. Bean + * archives that are not part of a * Java EE module (e.g. built-in server libraries) are not required to have a {@link EEModuleDescriptor} service registered. * *

@@ -29,8 +31,10 @@ *

* *

- * It is recommended to share an immutable {@link EEModuleDescriptor} instance for all bean deployment archives of the same Java EE module. However, each bean - * deployment archive may register its own {@link EEModuleDescriptor} instance. In this case, all descriptors representing a given EE module must use the same + * It is recommended to share an immutable {@link EEModuleDescriptor} instance for all bean deployment archives of the same Java + * EE module. However, each bean + * deployment archive may register its own {@link EEModuleDescriptor} instance. In this case, all descriptors representing a + * given EE module must use the same * id and type. *

* @@ -47,7 +51,11 @@ public interface EEModuleDescriptor extends Service { * */ public enum ModuleType { - EAR, WEB, EJB_JAR, APPLICATION_CLIENT, CONNECTOR + EAR, + WEB, + EJB_JAR, + APPLICATION_CLIENT, + CONNECTOR } /** diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Filter.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Filter.java index 844fb14f..80f800c9 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Filter.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Filter.java @@ -1,36 +1,39 @@ -package org.jboss.weld.bootstrap.spi; - -import java.util.Collection; - -/** - *

- * {@link Filter} is a data structures representing the <exclude> elements beans.xml (Since CDI 1.1). See the XSD for - * details of the semantics of <exclude>. - *

- * - * @see Beans 1.1 - * - * @author Pete Muir - * @see Scanning - */ -public interface Filter { - - /** - * The name attribute - * @return the name attribute - */ - String getName(); - - /** - * Nested <if-system-property> elements - * @return nested <if-system-property> elements - */ - Collection> getSystemPropertyActivations(); - - /** - * Nested <if-class-available> elements - * @return nested <if-class-available> elements - */ - Collection> getClassAvailableActivations(); - +package org.jboss.weld.bootstrap.spi; + +import java.util.Collection; + +/** + *

+ * {@link Filter} is a data structures representing the <exclude> elements beans.xml (Since CDI 1.1). See the XSD for + * details of the semantics of <exclude>. + *

+ * + * @see Beans 1.1 + * + * @author Pete Muir + * @see Scanning + */ +public interface Filter { + + /** + * The name attribute + * + * @return the name attribute + */ + String getName(); + + /** + * Nested <if-system-property> elements + * + * @return nested <if-system-property> elements + */ + Collection> getSystemPropertyActivations(); + + /** + * Nested <if-class-available> elements + * + * @return nested <if-class-available> elements + */ + Collection> getClassAvailableActivations(); + } \ No newline at end of file diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Metadata.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Metadata.java index a699e636..04e7a88c 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Metadata.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Metadata.java @@ -11,12 +11,14 @@ public interface Metadata { /** * The metadata value + * * @return the metadata value */ T getValue(); /** * The location of the metadata, used in error and log messages + * * @return location of the metadata, used in error and log messages */ String getLocation(); diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Scanning.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Scanning.java index 94b6c5e1..d6fbd1cb 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Scanning.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/Scanning.java @@ -1,44 +1,44 @@ -package org.jboss.weld.bootstrap.spi; - -import static java.util.Collections.emptyList; - -import java.util.Collection; - -/** - *

- * Scanning is a data structures representing the <scan> element in Weld's extensions to beans.xml. See the XSD for Weld's - * extensions to beans.xml for details of the semantics of <scan>. {@link Scanning} contains an include {@link Filter} - * list and an exclude {@link Filter} list. - *

- * - * @author Pete Muir - * - */ -public interface Scanning { - - Scanning EMPTY_SCANNING = new Scanning() { - - public Collection> getIncludes() { - return emptyList(); - } - - public Collection> getExcludes() { - return emptyList(); - } - }; - - /** - * The <include> element - * - * @return the include element - */ - Collection> getIncludes(); - - /** - * The <exclude> element - * - * @return the exclude element - */ - Collection> getExcludes(); - +package org.jboss.weld.bootstrap.spi; + +import static java.util.Collections.emptyList; + +import java.util.Collection; + +/** + *

+ * Scanning is a data structures representing the <scan> element in Weld's extensions to beans.xml. See the XSD for Weld's + * extensions to beans.xml for details of the semantics of <scan>. {@link Scanning} contains an include {@link Filter} + * list and an exclude {@link Filter} list. + *

+ * + * @author Pete Muir + * + */ +public interface Scanning { + + Scanning EMPTY_SCANNING = new Scanning() { + + public Collection> getIncludes() { + return emptyList(); + } + + public Collection> getExcludes() { + return emptyList(); + } + }; + + /** + * The <include> element + * + * @return the include element + */ + Collection> getIncludes(); + + /** + * The <exclude> element + * + * @return the exclude element + */ + Collection> getExcludes(); + } \ No newline at end of file diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/SystemPropertyActivation.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/SystemPropertyActivation.java index 1f0a8fe3..d7c70355 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/SystemPropertyActivation.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/SystemPropertyActivation.java @@ -14,12 +14,14 @@ public interface SystemPropertyActivation { /** * The name attribute + * * @return the name attribute */ String getName(); /** * The value attribute + * * @return the name attribute */ String getValue(); diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/WeldFilter.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/WeldFilter.java index e2080207..ae9815d0 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/WeldFilter.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/spi/WeldFilter.java @@ -32,6 +32,7 @@ public interface WeldFilter extends Filter { /** * The pattern attribute + * * @return the pattern attribute */ String getPattern(); diff --git a/weld-spi/src/main/java/org/jboss/weld/configuration/spi/ExternalConfiguration.java b/weld-spi/src/main/java/org/jboss/weld/configuration/spi/ExternalConfiguration.java index f3338a44..8693d0bd 100644 --- a/weld-spi/src/main/java/org/jboss/weld/configuration/spi/ExternalConfiguration.java +++ b/weld-spi/src/main/java/org/jboss/weld/configuration/spi/ExternalConfiguration.java @@ -21,8 +21,10 @@ import org.jboss.weld.bootstrap.api.Service; /** - * An integrator may provide a map of configuration properties. This map is considered the source with the lowest priority (i.e. it may be overriden by other - * sources such as system properties). The supported keys are declared in the documentation. Entries with unsupported keys are ignored. Invalid property value + * An integrator may provide a map of configuration properties. This map is considered the source with the lowest priority (i.e. + * it may be overriden by other + * sources such as system properties). The supported keys are declared in the documentation. Entries with unsupported keys are + * ignored. Invalid property value * is a deployment problem - initialization will be aborted by the container. * * @see WELD-1791 diff --git a/weld-spi/src/main/java/org/jboss/weld/construction/api/AroundConstructCallback.java b/weld-spi/src/main/java/org/jboss/weld/construction/api/AroundConstructCallback.java index 34fc8de0..bbf7ff72 100644 --- a/weld-spi/src/main/java/org/jboss/weld/construction/api/AroundConstructCallback.java +++ b/weld-spi/src/main/java/org/jboss/weld/construction/api/AroundConstructCallback.java @@ -23,8 +23,10 @@ /** * An implementation of this interface may be registered with a {@link WeldCreationalContext}. Weld will then call the - * {@link #aroundConstruct(ConstructionHandle, AnnotatedConstructor, Object[], Map)} method of the implementation during component creation, allowing an - * integrator to perform additional steps (e.g. invoking interceptors bound using the deployment descriptor) around component construction. + * {@link #aroundConstruct(ConstructionHandle, AnnotatedConstructor, Object[], Map)} method of the implementation during + * component creation, allowing an + * integrator to perform additional steps (e.g. invoking interceptors bound using the deployment descriptor) around component + * construction. * * @author Jozef Hartinger * @@ -35,19 +37,25 @@ public interface AroundConstructCallback { /** - * The method is called during component creation, allowing an integrator to perform additional steps (e.g. invoking interceptors bound using the deployment + * The method is called during component creation, allowing an integrator to perform additional steps (e.g. invoking + * interceptors bound using the deployment * descriptor) around component construction. * * @param handle the handle for controlling the component creation process and retrieving the created instance * @param constructor a representation of the component constructor used for component creation - * @param parameters the parameters that will be passed to the component constructor. These parameters should be made available to {@link jakarta.interceptor.AroundConstruct} - * interceptors through the {@link InvocationContext#getParameters()} method. An implementation is free to modify the parameters or provide a + * @param parameters the parameters that will be passed to the component constructor. These parameters should be made + * available to {@link jakarta.interceptor.AroundConstruct} + * interceptors through the {@link InvocationContext#getParameters()} method. An implementation is free to modify the + * parameters or provide a * different parameter array to the {@link ConstructionHandle}. - * @param data the context data associated with this {@link jakarta.interceptor.AroundConstruct} interception. The data should be made available to {@link jakarta.interceptor.AroundConstruct} - * interceptors through {@link InvocationContext#getContextData()}. An implementation is free to modify the map or to provide a different one to the + * @param data the context data associated with this {@link jakarta.interceptor.AroundConstruct} interception. The data + * should be made available to {@link jakarta.interceptor.AroundConstruct} + * interceptors through {@link InvocationContext#getContextData()}. An implementation is free to modify the map or to + * provide a different one to the * {@link ConstructionHandle}. * @return the created instance * @throws Exception any underlying exception is propagated directly */ - T aroundConstruct(ConstructionHandle handle, AnnotatedConstructor constructor, Object[] parameters, Map data) throws Exception; + T aroundConstruct(ConstructionHandle handle, AnnotatedConstructor constructor, Object[] parameters, + Map data) throws Exception; } diff --git a/weld-spi/src/main/java/org/jboss/weld/construction/api/ConstructionHandle.java b/weld-spi/src/main/java/org/jboss/weld/construction/api/ConstructionHandle.java index 35a11f6b..5db91bc7 100644 --- a/weld-spi/src/main/java/org/jboss/weld/construction/api/ConstructionHandle.java +++ b/weld-spi/src/main/java/org/jboss/weld/construction/api/ConstructionHandle.java @@ -30,7 +30,8 @@ public interface ConstructionHandle { /** - * Proceed to the next {@link AroundConstructCallback}. If there is no next callback, the component is constructed and the component instance is returned + * Proceed to the next {@link AroundConstructCallback}. If there is no next callback, the component is constructed and the + * component instance is returned * from the method. * * @param parameters the parameters to be passed to the component constructor diff --git a/weld-spi/src/main/java/org/jboss/weld/construction/api/WeldCreationalContext.java b/weld-spi/src/main/java/org/jboss/weld/construction/api/WeldCreationalContext.java index 49fb8f2c..8bce7a53 100644 --- a/weld-spi/src/main/java/org/jboss/weld/construction/api/WeldCreationalContext.java +++ b/weld-spi/src/main/java/org/jboss/weld/construction/api/WeldCreationalContext.java @@ -21,7 +21,8 @@ import jakarta.interceptor.Interceptors; /** - * Extended version of {@link CreationalContext} which gives the integrator additional control over the process of constructing an instance. + * Extended version of {@link CreationalContext} which gives the integrator additional control over the process of constructing + * an instance. * * @author Jozef Hartinger * @@ -29,9 +30,12 @@ public interface WeldCreationalContext extends CreationalContext { /** - * By default Weld takes care of {@link AroundConstruct} interceptors of a component instance which are bound to the component using interceptor bindings or - * the {@link Interceptors} annotation. This may not be desired should an integrator want to manage these interceptors themselves. In that case this switch - * may be used to suppress Weld management of {@link AroundConstruct} interceptors. In that case an integrator is responsible for performing + * By default Weld takes care of {@link AroundConstruct} interceptors of a component instance which are bound to the + * component using interceptor bindings or + * the {@link Interceptors} annotation. This may not be desired should an integrator want to manage these interceptors + * themselves. In that case this switch + * may be used to suppress Weld management of {@link AroundConstruct} interceptors. In that case an integrator is + * responsible for performing * {@link AroundConstruct} interception. * * @see #registerAroundConstructCallback(AroundConstructCallback) @@ -50,8 +54,10 @@ public interface WeldCreationalContext extends CreationalContext { boolean isConstructorInterceptionSuppressed(); /** - * Register a callback which is notified of component construction. This callback allows an integrator to perform additional tasks (e.g. invoking - * interceptors bound using the deployment descriptor) around constructor invocation. {@link AroundConstructCallback}s are invoked in the order in which + * Register a callback which is notified of component construction. This callback allows an integrator to perform additional + * tasks (e.g. invoking + * interceptors bound using the deployment descriptor) around constructor invocation. {@link AroundConstructCallback}s are + * invoked in the order in which * they were registered. * * @param callback the callback diff --git a/weld-spi/src/main/java/org/jboss/weld/ejb/spi/InterceptorBindings.java b/weld-spi/src/main/java/org/jboss/weld/ejb/spi/InterceptorBindings.java index ec651659..a1dc2026 100644 --- a/weld-spi/src/main/java/org/jboss/weld/ejb/spi/InterceptorBindings.java +++ b/weld-spi/src/main/java/org/jboss/weld/ejb/spi/InterceptorBindings.java @@ -36,7 +36,8 @@ public interface InterceptorBindings { * This includes class and method-bound interceptors.The purpose of this method is to indicate what interceptors does the * container need to interact with, for a given EJB. * - * Note: in the case of an EJB, the expectation is that the interpretation of {link @jakarta.interceptor.Interceptors} is left + * Note: in the case of an EJB, the expectation is that the interpretation of {link @jakarta.interceptor.Interceptors} is + * left * to the container, and the interceptors provided by the binding are complementary * * @return all interceptors that are bound to an EJB object through the {@link InterceptorBinding} mechanism and are enabled @@ -53,7 +54,7 @@ public interface InterceptorBindings { * @param method - the method that is to be intercepted * @return - an immutable list of interceptors applicable to the method (empty if no such interceptors exist) * @throws IllegalArgumentException if interceptionType is not {@link InterceptionType#AROUND_INVOKE} or - * {@link InterceptionType#AROUND_TIMEOUT} + * {@link InterceptionType#AROUND_TIMEOUT} */ List> getMethodInterceptors(InterceptionType interceptionType, Method method); @@ -66,7 +67,7 @@ public interface InterceptorBindings { * @param interceptionType - the interception type (lifecycle) * @return - an immutable list of interceptors applicable to the method (empty if no such interceptors exist) * @throws IllegalArgumentException if interceptionType not {@link InterceptionType#AROUND_INVOKE} or - * {@link InterceptionType#AROUND_TIMEOUT} + * {@link InterceptionType#AROUND_TIMEOUT} */ List> getLifecycleInterceptors(InterceptionType interceptionType); diff --git a/weld-spi/src/main/java/org/jboss/weld/injection/spi/JpaInjectionServices.java b/weld-spi/src/main/java/org/jboss/weld/injection/spi/JpaInjectionServices.java index 558bde6e..5330bcac 100644 --- a/weld-spi/src/main/java/org/jboss/weld/injection/spi/JpaInjectionServices.java +++ b/weld-spi/src/main/java/org/jboss/weld/injection/spi/JpaInjectionServices.java @@ -43,7 +43,7 @@ public interface JpaInjectionServices extends Service { * @param injectionPoint the injection point metadata * @return factory for obtaining {@link EntityManager} instances * @throws IllegalArgumentException if the injection point is not annotated with {@link PersistenceContext}, - * if the injection point is a method that doesn't follow JavaBean conventions or if the injection + * if the injection point is a method that doesn't follow JavaBean conventions or if the injection * @throws IllegalStateException if no suitable persistence units can be resolved */ ResourceReferenceFactory registerPersistenceContextInjectionPoint(InjectionPoint injectionPoint); @@ -56,7 +56,7 @@ public interface JpaInjectionServices extends Service { * @param injectionPoint the injection point metadata * @return factory for obtaining {@link EntityManagerFactory} instances * @throws IllegalArgumentException if the injection point is not annotated with {@link PersistenceUnit}, or, - * if the injection point is a method that doesn't follow JavaBean conventions + * if the injection point is a method that doesn't follow JavaBean conventions * @throws IllegalStateException if no suitable persistence units can be resolved */ ResourceReferenceFactory registerPersistenceUnitInjectionPoint(InjectionPoint injectionPoint); diff --git a/weld-spi/src/main/java/org/jboss/weld/injection/spi/helpers/AbstractResourceServices.java b/weld-spi/src/main/java/org/jboss/weld/injection/spi/helpers/AbstractResourceServices.java index c34e9be4..587ec9f9 100644 --- a/weld-spi/src/main/java/org/jboss/weld/injection/spi/helpers/AbstractResourceServices.java +++ b/weld-spi/src/main/java/org/jboss/weld/injection/spi/helpers/AbstractResourceServices.java @@ -20,12 +20,13 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; +import javax.naming.Context; +import javax.naming.NamingException; + import jakarta.annotation.Resource; import jakarta.enterprise.inject.spi.Annotated; import jakarta.enterprise.inject.spi.AnnotatedParameter; import jakarta.enterprise.inject.spi.InjectionPoint; -import javax.naming.Context; -import javax.naming.NamingException; import org.jboss.weld.bootstrap.api.Service; import org.jboss.weld.injection.spi.ResourceInjectionServices; diff --git a/weld-spi/src/main/java/org/jboss/weld/injection/spi/helpers/ForwardingResourceInjectionServices.java b/weld-spi/src/main/java/org/jboss/weld/injection/spi/helpers/ForwardingResourceInjectionServices.java index 30aef28a..25926153 100644 --- a/weld-spi/src/main/java/org/jboss/weld/injection/spi/helpers/ForwardingResourceInjectionServices.java +++ b/weld-spi/src/main/java/org/jboss/weld/injection/spi/helpers/ForwardingResourceInjectionServices.java @@ -18,8 +18,8 @@ import jakarta.enterprise.inject.spi.InjectionPoint; -import org.jboss.weld.injection.spi.ResourceReferenceFactory; import org.jboss.weld.injection.spi.ResourceInjectionServices; +import org.jboss.weld.injection.spi.ResourceReferenceFactory; public abstract class ForwardingResourceInjectionServices implements ResourceInjectionServices { diff --git a/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldInjectionTargetBuilder.java b/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldInjectionTargetBuilder.java index eda2f794..b5e68735 100644 --- a/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldInjectionTargetBuilder.java +++ b/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldInjectionTargetBuilder.java @@ -23,10 +23,10 @@ *

* By default, the returned {@link WeldInjectionTargetBuilder} instance will support: *

    - *
  • resource injection (e.g. @Resource, @EJB)
  • - *
  • decorators, as long as bean is set
  • - *
  • lifecycle and around-invoke interceptors
  • - *
  • target class lifecycle interceptor callbacks
  • + *
  • resource injection (e.g. @Resource, @EJB)
  • + *
  • decorators, as long as bean is set
  • + *
  • lifecycle and around-invoke interceptors
  • + *
  • target class lifecycle interceptor callbacks
  • *
* * Each of these capabilities may be disabled by calling a corresponding set*Enabled(false) method. @@ -36,37 +36,47 @@ public interface WeldInjectionTargetBuilder { /** - * Enables/disables resource injection in the resulting {@link WeldInjectionTargetBuilder}. By default, this feature is enabled. + * Enables/disables resource injection in the resulting {@link WeldInjectionTargetBuilder}. By default, this feature is + * enabled. + * * @param value enables/disables resource injection * @return the builder */ WeldInjectionTargetBuilder setResourceInjectionEnabled(boolean value); /** - * Enables/disables target class lifecycle callback in the resulting {@link WeldInjectionTargetBuilder}. By default, this feature is enabled. + * Enables/disables target class lifecycle callback in the resulting {@link WeldInjectionTargetBuilder}. By default, this + * feature is enabled. + * * @param value enables/disables target class lifecycle callback * @return the builder */ WeldInjectionTargetBuilder setTargetClassLifecycleCallbacksEnabled(boolean value); /** - * Enables/disables interception support in the resulting {@link WeldInjectionTargetBuilder}. By default, this feature is enabled. + * Enables/disables interception support in the resulting {@link WeldInjectionTargetBuilder}. By default, this feature is + * enabled. + * * @param value enables/disables interception support * @return the builder */ WeldInjectionTargetBuilder setInterceptionEnabled(boolean value); /** - * Enables/disables decoration support in the resulting {@link WeldInjectionTargetBuilder}. By default, this feature is enabled as long + * Enables/disables decoration support in the resulting {@link WeldInjectionTargetBuilder}. By default, this feature is + * enabled as long * as the bean is set. + * * @param value enables/disables decoration support * @return the builder */ WeldInjectionTargetBuilder setDecorationEnabled(boolean value); /** - * Sets the bean that the resulting {@link WeldInjectionTarget} corresponds to. This is an optional attribute of a {@link WeldInjectionTarget} and it + * Sets the bean that the resulting {@link WeldInjectionTarget} corresponds to. This is an optional attribute of a + * {@link WeldInjectionTarget} and it * is ok to leave this unset for any non-contextual component. + * * @param bean the specified bean * @return the builder */ @@ -74,6 +84,7 @@ public interface WeldInjectionTargetBuilder { /** * Returns a newly-created {@code WeldInjectionTarget} based on the contents of this builder. + * * @return newly-created {@code WeldInjectionTarget} */ WeldInjectionTarget build(); diff --git a/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldInjectionTargetFactory.java b/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldInjectionTargetFactory.java index 76fd3108..ff7fafb1 100644 --- a/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldInjectionTargetFactory.java +++ b/weld-spi/src/main/java/org/jboss/weld/manager/api/WeldInjectionTargetFactory.java @@ -33,11 +33,15 @@ public interface WeldInjectionTargetFactory extends InjectionTargetFactory WeldInjectionTarget createInjectionTarget(Bean bean); /** - * Creates a {@link WeldInjectionTarget} implementation that does not support construction/destruction of instances but provides field/setter injection - * capabilities. Such implementation is often handy for integration with other frameworks in situations when an existing Java object needs to be injected. + * Creates a {@link WeldInjectionTarget} implementation that does not support construction/destruction of instances but + * provides field/setter injection + * capabilities. Such implementation is often handy for integration with other frameworks in situations when an existing + * Java object needs to be injected. * - * {@link InjectionTarget#produce(jakarta.enterprise.context.spi.CreationalContext)} and {@link InjectionTarget#dispose(Object)} methods should not be called on - * the returned instance. The {@link InjectionTarget#produce(jakarta.enterprise.context.spi.CreationalContext)} method of the returned injection target + * {@link InjectionTarget#produce(jakarta.enterprise.context.spi.CreationalContext)} and + * {@link InjectionTarget#dispose(Object)} methods should not be called on + * the returned instance. The {@link InjectionTarget#produce(jakarta.enterprise.context.spi.CreationalContext)} method of + * the returned injection target * throws {@link CreationException} if called. * * @return the injection target @@ -46,7 +50,8 @@ public interface WeldInjectionTargetFactory extends InjectionTargetFactory /** * Create a new injection target for an interceptor bound using {@link Interceptors} or a deployment descriptor. Unlike - * {@link #createInjectionTarget(jakarta.enterprise.inject.spi.Bean)}, the resulting InjectionTarget does not support interception as it is itself an + * {@link #createInjectionTarget(jakarta.enterprise.inject.spi.Bean)}, the resulting InjectionTarget does not support + * interception as it is itself an * interceptor. * * @return the injection target 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 7c7d8dd5..3416cf7f 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 @@ -121,7 +121,8 @@ public interface WeldManager extends BeanManager, Serializable { /** * @see CDI-671 - * @return a new {@link Instance} with required type {@link Object} and no required qualifiers ({@link jakarta.enterprise.inject.Default} is added automatically during resolution if + * @return a new {@link Instance} with required type {@link Object} and no required qualifiers + * ({@link jakarta.enterprise.inject.Default} is added automatically during resolution if * no qualifiers are selected) */ Instance instance(); @@ -135,7 +136,9 @@ public interface WeldManager extends BeanManager, Serializable { Bean getPassivationCapableBean(BeanIdentifier identifier); /** - * Returns a new instance of {@link WeldInjectionTargetBuilder} which can be used to create a new {@link WeldInjectionTarget} for the specified type. + * Returns a new instance of {@link WeldInjectionTargetBuilder} which can be used to create a new + * {@link WeldInjectionTarget} for the specified type. + * * @param the type * @param type the specified type * @return a new {@link WeldInjectionTargetBuilder} instance for the specified type @@ -151,12 +154,15 @@ public interface WeldManager extends BeanManager, Serializable { /** * Obtain an {@link AnnotatedType} that may be used to read the annotations of the given class or interface. *

- * Allows multiple annotated types, based on the same underlying type, to be created. {@link AnnotatedType}s discovered by the container use the fully + * Allows multiple annotated types, based on the same underlying type, to be created. {@link AnnotatedType}s discovered by + * the container use the fully * qualified class name to identify the type. *

- * This method must only be used when creating non-contextual instances, such as Java EE components. It's not designed to work with contextual instances. + * This method must only be used when creating non-contextual instances, such as Java EE components. It's not designed to + * work with contextual instances. *

- * If called after the container bootstrap finished, the client code is required to explicitly call {@link #disposeAnnotatedType(Class, String)} + * If called after the container bootstrap finished, the client code is required to explicitly call + * {@link #disposeAnnotatedType(Class, String)} * as soon as the specified type should be garbage-collected (to avoid memory leaks). * * @param type underlying class for the {@code AnnotatedType} @@ -169,7 +175,8 @@ public interface WeldManager extends BeanManager, Serializable { /** * Dispose the {@link AnnotatedType} created for the identified type. *

- * This method should be explicitly called for each result of {@link #createAnnotatedType(Class, String)} created after the container bootstrap finished. + * This method should be explicitly called for each result of {@link #createAnnotatedType(Class, String)} created after the + * container bootstrap finished. *

* It's not necessary to call this method unless the identified type should be a subject of garbage collection. * @@ -190,7 +197,8 @@ public interface WeldManager extends BeanManager, Serializable { boolean isContextActive(Class scopeType); /** - * Returns an unmodifiable collection of all registered scopes, both built-in and custom. You can then use {@code BeanManager#getContext()} + * Returns an unmodifiable collection of all registered scopes, both built-in and custom. You can then use + * {@code BeanManager#getContext()} * to retrieve the {@link Context}. * The method returns scopes regardless of whether their respective contexts are active or otherwise. * @@ -207,9 +215,9 @@ public interface WeldManager extends BeanManager, Serializable { */ default Collection getActiveContexts() { return getScopes().stream() - .filter(this::isContextActive) - .map(this::getContext) - .collect(Collectors.toSet()); + .filter(this::isContextActive) + .map(this::getContext) + .collect(Collectors.toSet()); } /** @@ -217,17 +225,18 @@ default Collection getActiveContexts() { * This is just a convenient method. * * Note that for each scope, there might be more than one {@link Context}, but there can be at most one active at a time. - * This method can therefore return an incomplete view of all active contexts as not every context implements {@link WeldAlterableContext}. + * This method can therefore return an incomplete view of all active contexts as not every context implements + * {@link WeldAlterableContext}. * * @return Collection of all active contexts implementing {@link WeldAlterableContext} */ default Collection getActiveWeldAlterableContexts() { return getScopes().stream() - .filter(this::isContextActive) - .map(this::getContext) - .filter(t -> t instanceof WeldAlterableContext) - .map(t -> (WeldAlterableContext) t) - .collect(Collectors.toSet()); + .filter(this::isContextActive) + .map(this::getContext) + .filter(t -> t instanceof WeldAlterableContext) + .map(t -> (WeldAlterableContext) t) + .collect(Collectors.toSet()); } /** diff --git a/weld-spi/src/main/java/org/jboss/weld/resources/spi/ClassFileInfo.java b/weld-spi/src/main/java/org/jboss/weld/resources/spi/ClassFileInfo.java index 462d7450..7722971d 100644 --- a/weld-spi/src/main/java/org/jboss/weld/resources/spi/ClassFileInfo.java +++ b/weld-spi/src/main/java/org/jboss/weld/resources/spi/ClassFileInfo.java @@ -20,7 +20,8 @@ import java.lang.annotation.Inherited; /** - * Represents metadata of a Java class. Weld uses this metadata to decide whether the class should be processed by Weld or not without loading the class. + * Represents metadata of a Java class. Weld uses this metadata to decide whether the class should be processed by Weld or not + * without loading the class. * * @author Jozef Hartinger * @@ -50,20 +51,27 @@ public interface ClassFileInfo { boolean isAnnotationDeclared(Class annotationType); /** - * Indicates whether this class contains an annotation of the specified annotation type. A class is said to contain the annotation if any of these applies: + * Indicates whether this class contains an annotation of the specified annotation type. A class is said to contain the + * annotation if any of these applies: * *

    *
  • The annotation or an annotation annotated with the annotation is present on the class
  • - *
  • The annotation or an annotation annotated with the annotation, which is annotated with {@link Inherited}, is present on a direct or indirect + *
  • The annotation or an annotation annotated with the annotation, which is annotated with {@link Inherited}, is present + * on a direct or indirect * superclass of the given class
  • - *
  • The annotation or an annotation annotated with the annotation is present on a field or method declared by the given class or any direct or indirect + *
  • The annotation or an annotation annotated with the annotation is present on a field or method declared by the given + * class or any direct or indirect * superclass of the given class
  • - *
  • The annotation or an annotation annotated with the annotation is present on a parameter of a method declared by the given class or any direct or + *
  • The annotation or an annotation annotated with the annotation is present on a parameter of a method declared by the + * given class or any direct or * indirect superclass of the given class
  • - *
  • The annotation or an annotation annotated with the annotation is present on a default method or a parameter of a default method declared by an interface directly or + *
  • The annotation or an annotation annotated with the annotation is present on a default method or a parameter of a + * default method declared by an interface directly or * indirectly implemented by the given class
  • - *
  • The annotation or an annotation annotated with the annotation is present on a constructor declared by the given class
  • - *
  • The annotation or an annotation annotated with the annotation is present on a parameter of a constructor declared by the given class
  • + *
  • The annotation or an annotation annotated with the annotation is present on a constructor declared by the given + * class
  • + *
  • The annotation or an annotation annotated with the annotation is present on a parameter of a constructor declared by + * the given class
  • *
* * @param annotationType the specified annotation type @@ -72,7 +80,8 @@ public interface ClassFileInfo { boolean containsAnnotation(Class annotationType); /** - * Returns the class access and property modifiers, as defined in http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.1-200-E.1 + * Returns the class access and property modifiers, as defined in + * http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.1-200-E.1 * * @return class access and property modifiers */ @@ -81,7 +90,8 @@ public interface ClassFileInfo { /** * Indicates whether this class has a CDI constructor. * - * @return true if this class has a constructor annotated with {@link jakarta.inject.Inject} or a no-arg constructor, false otherwise + * @return true if this class has a constructor annotated with {@link jakarta.inject.Inject} or a no-arg constructor, false + * otherwise */ boolean hasCdiConstructor(); @@ -104,7 +114,8 @@ public interface ClassFileInfo { /** * Indicates whether this class is vetoed from CDI processing. * - * @return true if the {@link jakarta.enterprise.inject.Vetoed} annotation is present on this class or the class's package, false otherwise + * @return true if the {@link jakarta.enterprise.inject.Vetoed} annotation is present on this class or the class's package, + * false otherwise */ boolean isVetoed(); diff --git a/weld-spi/src/main/java/org/jboss/weld/resources/spi/ClassFileServices.java b/weld-spi/src/main/java/org/jboss/weld/resources/spi/ClassFileServices.java index 2c86fcf2..e3f90ed4 100644 --- a/weld-spi/src/main/java/org/jboss/weld/resources/spi/ClassFileServices.java +++ b/weld-spi/src/main/java/org/jboss/weld/resources/spi/ClassFileServices.java @@ -21,8 +21,10 @@ /** * An optional service that provides fast access to Java class metadata without the need to load the given class. * - * An integrator may use this service to expose its bytecode scanning facility. If a service implementation is present, Weld uses it to optimize the bootstrap - * process. The ClassFileServices implementation is used to determine whether a given Java class fulfills CDI bean requirements instead of loading the class + * An integrator may use this service to expose its bytecode scanning facility. If a service implementation is present, Weld + * uses it to optimize the bootstrap + * process. The ClassFileServices implementation is used to determine whether a given Java class fulfills CDI bean requirements + * instead of loading the class * using a {@link ClassLoader} and examining the result using Java reflection. * * @author Jozef Hartinger @@ -35,7 +37,8 @@ public interface ClassFileServices extends BootstrapService { * * @param className the specified class name * @return the class metadata - * @throws ClassFileInfoException if the service implementation is not able to obtain metadata of a class with the specified name + * @throws ClassFileInfoException if the service implementation is not able to obtain metadata of a class with the specified + * name */ ClassFileInfo getClassFileInfo(String className); } diff --git a/weld-spi/src/main/java/org/jboss/weld/security/spi/SecurityServices.java b/weld-spi/src/main/java/org/jboss/weld/security/spi/SecurityServices.java index 9d9990f7..51b48253 100644 --- a/weld-spi/src/main/java/org/jboss/weld/security/spi/SecurityServices.java +++ b/weld-spi/src/main/java/org/jboss/weld/security/spi/SecurityServices.java @@ -29,7 +29,8 @@ *

* *

- * An integrator should either implement {@link #getSecurityContext()} or {@link #getSecurityContextAssociator()}. By default, the + * An integrator should either implement {@link #getSecurityContext()} or {@link #getSecurityContextAssociator()}. By default, + * the * {@link #getSecurityContextAssociator()} method delegates to {@link #getSecurityContext()}. The container always calls the * {@link #getSecurityContextAssociator()} method. *

@@ -48,7 +49,8 @@ public interface SecurityServices extends Service { Principal getPrincipal(); /** - * Obtain the security context associated with the current thread. This method is used by Weld to propagate the security context of the current thread to + * Obtain the security context associated with the current thread. This method is used by Weld to propagate the security + * context of the current thread to * different threads. * *

@@ -63,7 +65,8 @@ default SecurityContext getSecurityContext() { } /** - * Obtain the security context associated with the current thread and associate this context when an action is performed. This method is used by Weld to propagate the security context of the current thread to + * Obtain the security context associated with the current thread and associate this context when an action is performed. + * This method is used by Weld to propagate the security context of the current thread to * different threads. * *

diff --git a/weld-spi/src/main/java/org/jboss/weld/serialization/spi/BeanIdentifier.java b/weld-spi/src/main/java/org/jboss/weld/serialization/spi/BeanIdentifier.java index bbf81236..8fd6f355 100644 --- a/weld-spi/src/main/java/org/jboss/weld/serialization/spi/BeanIdentifier.java +++ b/weld-spi/src/main/java/org/jboss/weld/serialization/spi/BeanIdentifier.java @@ -25,8 +25,10 @@ public interface BeanIdentifier extends Serializable { String BEAN_ID_SEPARATOR = "%"; /** - * String representation of this identifier. This is required as some parts of the CDI API use String identifiers, for example - * {@link PassivationCapable#getId()}. Unlike {@link Object#toString()}, this method returns a non-verbose canonical string identifier. + * String representation of this identifier. This is required as some parts of the CDI API use String identifiers, for + * example + * {@link PassivationCapable#getId()}. Unlike {@link Object#toString()}, this method returns a non-verbose canonical string + * identifier. * * @return string representation of this identifier */ diff --git a/weld-spi/src/main/java/org/jboss/weld/serialization/spi/ContextualStore.java b/weld-spi/src/main/java/org/jboss/weld/serialization/spi/ContextualStore.java index f9848214..269181f6 100644 --- a/weld-spi/src/main/java/org/jboss/weld/serialization/spi/ContextualStore.java +++ b/weld-spi/src/main/java/org/jboss/weld/serialization/spi/ContextualStore.java @@ -85,5 +85,6 @@ public interface ContextualStore extends Service { * @param creationalContext the creational context of the instance * @return the serializable contextual instance */ - , I> SerializableContextualInstance getSerializableContextualInstance(Contextual contextual, I instance, CreationalContext creationalContext); + , I> SerializableContextualInstance getSerializableContextualInstance( + Contextual contextual, I instance, CreationalContext creationalContext); } diff --git a/weld-spi/src/main/java/org/jboss/weld/serialization/spi/ProxyServices.java b/weld-spi/src/main/java/org/jboss/weld/serialization/spi/ProxyServices.java index 2bc2bb1e..39791f8c 100644 --- a/weld-spi/src/main/java/org/jboss/weld/serialization/spi/ProxyServices.java +++ b/weld-spi/src/main/java/org/jboss/weld/serialization/spi/ProxyServices.java @@ -17,10 +17,10 @@ package org.jboss.weld.serialization.spi; -import org.jboss.weld.bootstrap.api.Service; - import java.security.ProtectionDomain; +import org.jboss.weld.bootstrap.api.Service; + /** *

* Support services related to proxy generation and serialization which are required to be implemented by all containers. @@ -61,7 +61,8 @@ public interface ProxyServices extends Service { * * @throws ClassFormatError If the data did not contain a valid class */ - default Class defineClass(Class originalClass, String className, byte[] classBytes, int off, int len) throws ClassFormatError { + default Class defineClass(Class originalClass, String className, byte[] classBytes, int off, int len) + throws ClassFormatError { return defineClass(originalClass, className, classBytes, off, len, null); } @@ -77,24 +78,26 @@ default Class defineClass(Class originalClass, String className, byte[] cl * Returns the created class object or throws an exception if there data are not valid or if there is any other * problem registering the class with the {@code ClassLoader}. * - * @param originalClass The base type (class or interface) being proxied - * @param className The binary name of the class - * @param classBytes The bytes that make up the class data - * @param off The start offset in classBytes of the class data - * @param len The length of the class data + * @param originalClass The base type (class or interface) being proxied + * @param className The binary name of the class + * @param classBytes The bytes that make up the class data + * @param off The start offset in classBytes of the class data + * @param len The length of the class data * @param protectionDomain The ProtectionDomain of the class or null * @return The {@code Class} object created from the data * @throws ClassFormatError If the data did not contain a valid class */ - default Class defineClass(Class originalClass, String className, byte[] classBytes, int off, int len, ProtectionDomain protectionDomain) throws ClassFormatError { - throw new UnsupportedOperationException("ProxyServices#defineClass(Class, String, byte[], int, int, ProtectionDomain) is not implemented!"); + default Class defineClass(Class originalClass, String className, byte[] classBytes, int off, int len, + ProtectionDomain protectionDomain) throws ClassFormatError { + throw new UnsupportedOperationException( + "ProxyServices#defineClass(Class, String, byte[], int, int, ProtectionDomain) is not implemented!"); } /** * Given a base type (class or interface), attempts to load a proxy of that class. * Integrators should use the base type to determine proper {@code ClassLoader} instance to query. * - * @param originalClass The base type (class or interface) whose proxy we try to load + * @param originalClass The base type (class or interface) whose proxy we try to load * @param classBinaryName The binary name of the class * @return The {@code Class} object for given binary name of the class * @throws ClassNotFoundException If the class was not found diff --git a/weld-spi/src/main/java/org/jboss/weld/serialization/spi/helpers/SerializableContextual.java b/weld-spi/src/main/java/org/jboss/weld/serialization/spi/helpers/SerializableContextual.java index 93b2f2e0..94032d92 100644 --- a/weld-spi/src/main/java/org/jboss/weld/serialization/spi/helpers/SerializableContextual.java +++ b/weld-spi/src/main/java/org/jboss/weld/serialization/spi/helpers/SerializableContextual.java @@ -17,9 +17,10 @@ package org.jboss.weld.serialization.spi.helpers; -import jakarta.enterprise.context.spi.Contextual; import java.io.Serializable; +import jakarta.enterprise.context.spi.Contextual; + /** * A serializable version of contextual that knows how to restore the original bean if necessary. * diff --git a/weld-spi/src/main/java/org/jboss/weld/serialization/spi/helpers/SerializableContextualInstance.java b/weld-spi/src/main/java/org/jboss/weld/serialization/spi/helpers/SerializableContextualInstance.java index 84dfc21e..899dac09 100644 --- a/weld-spi/src/main/java/org/jboss/weld/serialization/spi/helpers/SerializableContextualInstance.java +++ b/weld-spi/src/main/java/org/jboss/weld/serialization/spi/helpers/SerializableContextualInstance.java @@ -16,11 +16,12 @@ */ package org.jboss.weld.serialization.spi.helpers; -import org.jboss.weld.context.api.ContextualInstance; +import java.io.Serializable; import jakarta.enterprise.context.spi.Contextual; import jakarta.enterprise.context.spi.CreationalContext; -import java.io.Serializable; + +import org.jboss.weld.context.api.ContextualInstance; /** * A Serializable wrapper for a {@link ContextualInstance} diff --git a/weld-spi/src/main/java/org/jboss/weld/servlet/spi/HttpContextActivationFilter.java b/weld-spi/src/main/java/org/jboss/weld/servlet/spi/HttpContextActivationFilter.java index 6b528623..30c81042 100644 --- a/weld-spi/src/main/java/org/jboss/weld/servlet/spi/HttpContextActivationFilter.java +++ b/weld-spi/src/main/java/org/jboss/weld/servlet/spi/HttpContextActivationFilter.java @@ -5,8 +5,10 @@ import org.jboss.weld.bootstrap.api.Service; /** - * Enables an integrator to control if CDI contexts should be activated for a particular {@link HttpServletRequest}. An integrator may be interested in filtering - * out requests where CDI is not necessary to eliminate the overhead of context activation/deactivation. For example, an integrator may want to use this filter + * Enables an integrator to control if CDI contexts should be activated for a particular {@link HttpServletRequest}. An + * integrator may be interested in filtering + * out requests where CDI is not necessary to eliminate the overhead of context activation/deactivation. For example, an + * integrator may want to use this filter * to filter out static resource requests from CDI processing. * * This service is optional. If not present, every request is accepted. diff --git a/weld-spi/src/main/java/org/jboss/weld/servlet/spi/helpers/RegexHttpContextActivationFilter.java b/weld-spi/src/main/java/org/jboss/weld/servlet/spi/helpers/RegexHttpContextActivationFilter.java index cb07f89c..f6dd325b 100644 --- a/weld-spi/src/main/java/org/jboss/weld/servlet/spi/helpers/RegexHttpContextActivationFilter.java +++ b/weld-spi/src/main/java/org/jboss/weld/servlet/spi/helpers/RegexHttpContextActivationFilter.java @@ -7,7 +7,8 @@ import org.jboss.weld.servlet.spi.HttpContextActivationFilter; /** - * A helper implementation of {@link HttpContextActivationFilter} that accepts every request that matches a predefined regular expression. + * A helper implementation of {@link HttpContextActivationFilter} that accepts every request that matches a predefined regular + * expression. * * @author Jozef Hartinger * diff --git a/weld-spi/src/main/java/org/jboss/weld/transaction/spi/TransactionServices.java b/weld-spi/src/main/java/org/jboss/weld/transaction/spi/TransactionServices.java index ff5a264f..e1c0a8f8 100644 --- a/weld-spi/src/main/java/org/jboss/weld/transaction/spi/TransactionServices.java +++ b/weld-spi/src/main/java/org/jboss/weld/transaction/spi/TransactionServices.java @@ -51,7 +51,8 @@ public interface TransactionServices extends Service { * * @see jakarta.transaction.Synchronization * @param synchronizedObserver the synchronization - * @throws RuntimeException if a problem occurs during registration, the {@link RuntimeException#getCause()} should return the original exception so that + * @throws RuntimeException if a problem occurs during registration, the {@link RuntimeException#getCause()} should return + * the original exception so that * Weld could easily distinguish possible registration problems */ void registerSynchronization(Synchronization synchronizedObserver); diff --git a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/BootstrapTest.java b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/BootstrapTest.java index 9f6d7ee3..2d14c25a 100644 --- a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/BootstrapTest.java +++ b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/BootstrapTest.java @@ -31,168 +31,156 @@ import org.jboss.weld.transaction.spi.TransactionServices; import org.testng.annotations.Test; -public class BootstrapTest -{ - - /* - * EjbServices is a required bean deployment archive service in this environment. - * For backwards compatibility with older integrators that register EjbServices - * as a deployment service, this check is suppressed. - * - * @see WELD-1685 - */ - @Test(expectedExceptions = IllegalStateException.class, enabled = false) - public void testMissingEjbServices() - { - Bootstrap bootstrap = new MockBootstrap(); - ServiceRegistry deploymentServices = new SimpleServiceRegistry(); - ServiceRegistry bdaServices = new SimpleServiceRegistry(); - deploymentServices.add(TransactionServices.class, new MockTransactionServices()); - deploymentServices.add(SecurityServices.class, new MockSecurityServices()); - - bdaServices.add(JpaInjectionServices.class, new MockJpaServices()); - bdaServices.add(ResourceInjectionServices.class, new MockResourceServices()); - bdaServices.add(EjbInjectionServices.class, new MockEjbInjectionServices()); - bdaServices.add(ResourceLoader.class, new MockResourceLoader()); - - Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); - bootstrap.startContainer(Environments.EE_INJECT, deployment); - } - - @Test(expectedExceptions = IllegalStateException.class) - public void testMissingEjbInjectionServices() - { - Bootstrap bootstrap = new MockBootstrap(); - ServiceRegistry deploymentServices = new SimpleServiceRegistry(); - ServiceRegistry bdaServices = new SimpleServiceRegistry(); - deploymentServices.add(TransactionServices.class, new MockTransactionServices()); - deploymentServices.add(SecurityServices.class, new MockSecurityServices()); - - bdaServices.add(JpaInjectionServices.class, new MockJpaServices()); - bdaServices.add(ResourceInjectionServices.class, new MockResourceServices()); - bdaServices.add(ResourceLoader.class, new MockResourceLoader()); - - Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); - bootstrap.startContainer(Environments.EE_INJECT, deployment); - } - - @Test(expectedExceptions = IllegalStateException.class) - public void testMissingJpaServices() - { - Bootstrap bootstrap = new MockBootstrap(); - ServiceRegistry deploymentServices = new SimpleServiceRegistry(); - deploymentServices.add(TransactionServices.class, new MockTransactionServices()); - deploymentServices.add(SecurityServices.class, new MockSecurityServices()); - deploymentServices.add(EjbServices.class, new MockEjbServices()); - - ServiceRegistry bdaServices = new SimpleServiceRegistry(); - - bdaServices.add(EjbInjectionServices.class, new MockEjbInjectionServices()); - bdaServices.add(ResourceInjectionServices.class, new MockResourceServices()); - bdaServices.add(EjbInjectionServices.class, new MockEjbInjectionServices()); - bdaServices.add(ResourceLoader.class, new MockResourceLoader()); - - Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); - bootstrap.startContainer(Environments.EE_INJECT, deployment); - } - - @Test(expectedExceptions = IllegalStateException.class) - public void testMissingSecurityServices() - { - Bootstrap bootstrap = new MockBootstrap(); - ServiceRegistry deploymentServices = new SimpleServiceRegistry(); - deploymentServices.add(TransactionServices.class, new MockTransactionServices()); - deploymentServices.add(EjbServices.class, new MockEjbServices()); - - ServiceRegistry bdaServices = new SimpleServiceRegistry(); - - bdaServices.add(JpaInjectionServices.class, new MockJpaServices()); - bdaServices.add(ResourceInjectionServices.class, new MockResourceServices()); - bdaServices.add(EjbInjectionServices.class, new MockEjbInjectionServices()); - bdaServices.add(ResourceLoader.class, new MockResourceLoader()); - - Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); - bootstrap.startContainer(Environments.EE_INJECT, deployment); - } - - @Test - public void testEEEnv() - { - Bootstrap bootstrap = new MockBootstrap(); - ServiceRegistry deploymentServices = new SimpleServiceRegistry(); - deploymentServices.add(TransactionServices.class, new MockTransactionServices()); - deploymentServices.add(SecurityServices.class, new MockSecurityServices()); - deploymentServices.add(EjbServices.class, new MockEjbServices()); - - - ServiceRegistry bdaServices = new SimpleServiceRegistry(); - bdaServices.add(EjbInjectionServices.class, new MockEjbInjectionServices()); - bdaServices.add(JpaInjectionServices.class, new MockJpaServices()); - bdaServices.add(ResourceInjectionServices.class, new MockResourceServices()); - bdaServices.add(ResourceLoader.class, new MockResourceLoader()); - - Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); - bootstrap.startContainer(Environments.EE_INJECT, deployment); - } - - @Test(expectedExceptions = IllegalStateException.class) - public void testMissingTxServices() - { - Bootstrap bootstrap = new MockBootstrap(); - ServiceRegistry deploymentServices = new SimpleServiceRegistry(); - deploymentServices.add(SecurityServices.class, new MockSecurityServices()); - deploymentServices.add(EjbServices.class, new MockEjbServices()); - - ServiceRegistry bdaServices = new SimpleServiceRegistry(); - bdaServices.add(EjbInjectionServices.class, new MockEjbInjectionServices()); - bdaServices.add(JpaInjectionServices.class, new MockJpaServices()); - bdaServices.add(ResourceInjectionServices.class, new MockResourceServices()); - bdaServices.add(ResourceLoader.class, new MockResourceLoader()); - - Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); - bootstrap.startContainer(Environments.EE_INJECT, deployment); - } - - @Test(expectedExceptions = IllegalStateException.class) - public void testMissingResourceServices() - { - Bootstrap bootstrap = new MockBootstrap(); - ServiceRegistry deploymentServices = new SimpleServiceRegistry(); - deploymentServices.add(TransactionServices.class, new MockTransactionServices()); - deploymentServices.add(SecurityServices.class, new MockSecurityServices()); - deploymentServices.add(EjbServices.class, new MockEjbServices()); - - ServiceRegistry bdaServices = new SimpleServiceRegistry(); - bdaServices.add(EjbInjectionServices.class, new MockEjbInjectionServices()); - bdaServices.add(JpaInjectionServices.class, new MockJpaServices()); - bdaServices.add(ResourceLoader.class, new MockResourceLoader()); - - Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); - bootstrap.startContainer(Environments.EE_INJECT, deployment); - } - - @Test - public void testSEEnv() - { - Bootstrap bootstrap = new MockBootstrap(); - ServiceRegistry deploymentServices = new SimpleServiceRegistry(); - - ServiceRegistry bdaServices = new SimpleServiceRegistry(); - bdaServices.add(ResourceLoader.class, new MockResourceLoader()); - Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); - bootstrap.startContainer(Environments.SE, deployment); - } - - @Test - public void testServletEnv() - { - Bootstrap bootstrap = new MockBootstrap(); - ServiceRegistry deploymentServices = new SimpleServiceRegistry(); - ServiceRegistry bdaServices = new SimpleServiceRegistry(); - bdaServices.add(ResourceLoader.class, new MockResourceLoader()); - Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); - bootstrap.startContainer(Environments.SERVLET, deployment); - } - +public class BootstrapTest { + + /* + * EjbServices is a required bean deployment archive service in this environment. + * For backwards compatibility with older integrators that register EjbServices + * as a deployment service, this check is suppressed. + * + * @see WELD-1685 + */ + @Test(expectedExceptions = IllegalStateException.class, enabled = false) + public void testMissingEjbServices() { + Bootstrap bootstrap = new MockBootstrap(); + ServiceRegistry deploymentServices = new SimpleServiceRegistry(); + ServiceRegistry bdaServices = new SimpleServiceRegistry(); + deploymentServices.add(TransactionServices.class, new MockTransactionServices()); + deploymentServices.add(SecurityServices.class, new MockSecurityServices()); + + bdaServices.add(JpaInjectionServices.class, new MockJpaServices()); + bdaServices.add(ResourceInjectionServices.class, new MockResourceServices()); + bdaServices.add(EjbInjectionServices.class, new MockEjbInjectionServices()); + bdaServices.add(ResourceLoader.class, new MockResourceLoader()); + + Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); + bootstrap.startContainer(Environments.EE_INJECT, deployment); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testMissingEjbInjectionServices() { + Bootstrap bootstrap = new MockBootstrap(); + ServiceRegistry deploymentServices = new SimpleServiceRegistry(); + ServiceRegistry bdaServices = new SimpleServiceRegistry(); + deploymentServices.add(TransactionServices.class, new MockTransactionServices()); + deploymentServices.add(SecurityServices.class, new MockSecurityServices()); + + bdaServices.add(JpaInjectionServices.class, new MockJpaServices()); + bdaServices.add(ResourceInjectionServices.class, new MockResourceServices()); + bdaServices.add(ResourceLoader.class, new MockResourceLoader()); + + Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); + bootstrap.startContainer(Environments.EE_INJECT, deployment); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testMissingJpaServices() { + Bootstrap bootstrap = new MockBootstrap(); + ServiceRegistry deploymentServices = new SimpleServiceRegistry(); + deploymentServices.add(TransactionServices.class, new MockTransactionServices()); + deploymentServices.add(SecurityServices.class, new MockSecurityServices()); + deploymentServices.add(EjbServices.class, new MockEjbServices()); + + ServiceRegistry bdaServices = new SimpleServiceRegistry(); + + bdaServices.add(EjbInjectionServices.class, new MockEjbInjectionServices()); + bdaServices.add(ResourceInjectionServices.class, new MockResourceServices()); + bdaServices.add(EjbInjectionServices.class, new MockEjbInjectionServices()); + bdaServices.add(ResourceLoader.class, new MockResourceLoader()); + + Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); + bootstrap.startContainer(Environments.EE_INJECT, deployment); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testMissingSecurityServices() { + Bootstrap bootstrap = new MockBootstrap(); + ServiceRegistry deploymentServices = new SimpleServiceRegistry(); + deploymentServices.add(TransactionServices.class, new MockTransactionServices()); + deploymentServices.add(EjbServices.class, new MockEjbServices()); + + ServiceRegistry bdaServices = new SimpleServiceRegistry(); + + bdaServices.add(JpaInjectionServices.class, new MockJpaServices()); + bdaServices.add(ResourceInjectionServices.class, new MockResourceServices()); + bdaServices.add(EjbInjectionServices.class, new MockEjbInjectionServices()); + bdaServices.add(ResourceLoader.class, new MockResourceLoader()); + + Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); + bootstrap.startContainer(Environments.EE_INJECT, deployment); + } + + @Test + public void testEEEnv() { + Bootstrap bootstrap = new MockBootstrap(); + ServiceRegistry deploymentServices = new SimpleServiceRegistry(); + deploymentServices.add(TransactionServices.class, new MockTransactionServices()); + deploymentServices.add(SecurityServices.class, new MockSecurityServices()); + deploymentServices.add(EjbServices.class, new MockEjbServices()); + + ServiceRegistry bdaServices = new SimpleServiceRegistry(); + bdaServices.add(EjbInjectionServices.class, new MockEjbInjectionServices()); + bdaServices.add(JpaInjectionServices.class, new MockJpaServices()); + bdaServices.add(ResourceInjectionServices.class, new MockResourceServices()); + bdaServices.add(ResourceLoader.class, new MockResourceLoader()); + + Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); + bootstrap.startContainer(Environments.EE_INJECT, deployment); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testMissingTxServices() { + Bootstrap bootstrap = new MockBootstrap(); + ServiceRegistry deploymentServices = new SimpleServiceRegistry(); + deploymentServices.add(SecurityServices.class, new MockSecurityServices()); + deploymentServices.add(EjbServices.class, new MockEjbServices()); + + ServiceRegistry bdaServices = new SimpleServiceRegistry(); + bdaServices.add(EjbInjectionServices.class, new MockEjbInjectionServices()); + bdaServices.add(JpaInjectionServices.class, new MockJpaServices()); + bdaServices.add(ResourceInjectionServices.class, new MockResourceServices()); + bdaServices.add(ResourceLoader.class, new MockResourceLoader()); + + Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); + bootstrap.startContainer(Environments.EE_INJECT, deployment); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testMissingResourceServices() { + Bootstrap bootstrap = new MockBootstrap(); + ServiceRegistry deploymentServices = new SimpleServiceRegistry(); + deploymentServices.add(TransactionServices.class, new MockTransactionServices()); + deploymentServices.add(SecurityServices.class, new MockSecurityServices()); + deploymentServices.add(EjbServices.class, new MockEjbServices()); + + ServiceRegistry bdaServices = new SimpleServiceRegistry(); + bdaServices.add(EjbInjectionServices.class, new MockEjbInjectionServices()); + bdaServices.add(JpaInjectionServices.class, new MockJpaServices()); + bdaServices.add(ResourceLoader.class, new MockResourceLoader()); + + Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); + bootstrap.startContainer(Environments.EE_INJECT, deployment); + } + + @Test + public void testSEEnv() { + Bootstrap bootstrap = new MockBootstrap(); + ServiceRegistry deploymentServices = new SimpleServiceRegistry(); + + ServiceRegistry bdaServices = new SimpleServiceRegistry(); + bdaServices.add(ResourceLoader.class, new MockResourceLoader()); + Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); + bootstrap.startContainer(Environments.SE, deployment); + } + + @Test + public void testServletEnv() { + Bootstrap bootstrap = new MockBootstrap(); + ServiceRegistry deploymentServices = new SimpleServiceRegistry(); + ServiceRegistry bdaServices = new SimpleServiceRegistry(); + bdaServices.add(ResourceLoader.class, new MockResourceLoader()); + Deployment deployment = new MockDeployment(deploymentServices, new MockBeanDeploymentArchive(bdaServices)); + bootstrap.startContainer(Environments.SERVLET, deployment); + } } diff --git a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockBootstrap.java b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockBootstrap.java index 16f086e7..f323a076 100644 --- a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockBootstrap.java +++ b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockBootstrap.java @@ -9,7 +9,7 @@ * 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, + * 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. @@ -35,90 +35,75 @@ import org.jboss.weld.bootstrap.spi.Metadata; import org.jboss.weld.manager.api.WeldManager; -public class MockBootstrap implements Bootstrap -{ - - public WeldManager getManager(BeanDeploymentArchive beanDeploymentArchive) - { - return null; - } - - public void shutdown() - { - } - - public Bootstrap deployBeans() - { - return this; - } - - public Bootstrap endInitialization() - { - return this; - } - - public Bootstrap startInitialization() - { - return this; - } - - public Bootstrap validateBeans() - { - return this; - } - - protected static void verifyServices(ServiceRegistry services, Set> requiredServices) - { - for (Class serviceType : requiredServices) - { - if (!services.contains(serviceType)) - { - throw new IllegalStateException("Required service " + serviceType.getName() + " has not been specified"); - } - } - } - - public Bootstrap startContainer(Environment environment, Deployment deployment) - { - verifyServices(deployment.getServices(), environment.getRequiredDeploymentServices()); - verifyServices(deployment.getBeanDeploymentArchives().iterator().next().getServices(), environment.getRequiredBeanDeploymentArchiveServices()); - return this; - } - - public BeansXml parse(URL url) - { - return EMPTY_BEANS_XML; - } - - public BeansXml parse(Iterable urls) - { - return parse(urls, false); - } - - public BeansXml parse(Iterable urls, boolean removeDuplicates) - { - return EMPTY_BEANS_XML; - } - - @Override - public BeansXml parse(URL url, BeanDiscoveryMode emptyBeansXmlDiscoveryMode) { - return EMPTY_BEANS_XML; - } - - @Override - public BeansXml parse(Iterable urls, BeanDiscoveryMode emptyBeansXmlDiscoveryMode) { - return EMPTY_BEANS_XML; - } - - @Override - public BeansXml parse(Iterable urls, boolean removeDuplicates, BeanDiscoveryMode emptyBeansXmlDiscoveryMode) { - return EMPTY_BEANS_XML; - } - - public Iterable> loadExtensions(ClassLoader classLoader) - { - return emptyList(); - } - - +public class MockBootstrap implements Bootstrap { + + public WeldManager getManager(BeanDeploymentArchive beanDeploymentArchive) { + return null; + } + + public void shutdown() { + } + + public Bootstrap deployBeans() { + return this; + } + + public Bootstrap endInitialization() { + return this; + } + + public Bootstrap startInitialization() { + return this; + } + + public Bootstrap validateBeans() { + return this; + } + + protected static void verifyServices(ServiceRegistry services, Set> requiredServices) { + for (Class serviceType : requiredServices) { + if (!services.contains(serviceType)) { + throw new IllegalStateException("Required service " + serviceType.getName() + " has not been specified"); + } + } + } + + public Bootstrap startContainer(Environment environment, Deployment deployment) { + verifyServices(deployment.getServices(), environment.getRequiredDeploymentServices()); + verifyServices(deployment.getBeanDeploymentArchives().iterator().next().getServices(), + environment.getRequiredBeanDeploymentArchiveServices()); + return this; + } + + public BeansXml parse(URL url) { + return EMPTY_BEANS_XML; + } + + public BeansXml parse(Iterable urls) { + return parse(urls, false); + } + + public BeansXml parse(Iterable urls, boolean removeDuplicates) { + return EMPTY_BEANS_XML; + } + + @Override + public BeansXml parse(URL url, BeanDiscoveryMode emptyBeansXmlDiscoveryMode) { + return EMPTY_BEANS_XML; + } + + @Override + public BeansXml parse(Iterable urls, BeanDiscoveryMode emptyBeansXmlDiscoveryMode) { + return EMPTY_BEANS_XML; + } + + @Override + public BeansXml parse(Iterable urls, boolean removeDuplicates, BeanDiscoveryMode emptyBeansXmlDiscoveryMode) { + return EMPTY_BEANS_XML; + } + + public Iterable> loadExtensions(ClassLoader classLoader) { + return emptyList(); + } + } diff --git a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockEjbInjectionServices.java b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockEjbInjectionServices.java index cb429829..f3ff87b7 100644 --- a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockEjbInjectionServices.java +++ b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockEjbInjectionServices.java @@ -9,7 +9,7 @@ * 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, + * 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. @@ -25,8 +25,7 @@ * @author pmuir * */ -public class MockEjbInjectionServices extends MockService implements EjbInjectionServices -{ +public class MockEjbInjectionServices extends MockService implements EjbInjectionServices { public ResourceReferenceFactory registerEjbInjectionPoint(InjectionPoint injectionPoint) { return new MockResourceFactory(); diff --git a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockEjbServices.java b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockEjbServices.java index 82dbc487..4a482aa0 100644 --- a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockEjbServices.java +++ b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockEjbServices.java @@ -9,7 +9,7 @@ * 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, + * 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. @@ -23,32 +23,26 @@ import org.jboss.weld.ejb.spi.EjbServices; import org.jboss.weld.ejb.spi.InterceptorBindings; -public class MockEjbServices extends MockService implements EjbServices -{ - - public Iterable> discoverEjbs() - { - return null; - } - - public SessionObjectReference resolveEjb(EjbDescriptor ejbDescriptor) - { - return null; - } - - public void registerInterceptors(EjbDescriptor ejbDescriptor, InterceptorBindings interceptorBindings) - { - // do nothing - } - - public Object resolveEjb(InjectionPoint injectionPoint) - { - return null; - } - - public Object resolveRemoteEjb(String jndiName, String mappedName, String ejbLink) - { - return null; - } +public class MockEjbServices extends MockService implements EjbServices { + + public Iterable> discoverEjbs() { + return null; + } + + public SessionObjectReference resolveEjb(EjbDescriptor ejbDescriptor) { + return null; + } + + public void registerInterceptors(EjbDescriptor ejbDescriptor, InterceptorBindings interceptorBindings) { + // do nothing + } + + public Object resolveEjb(InjectionPoint injectionPoint) { + return null; + } + + public Object resolveRemoteEjb(String jndiName, String mappedName, String ejbLink) { + return null; + } } diff --git a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockJpaServices.java b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockJpaServices.java index f36d4199..0fc5c919 100644 --- a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockJpaServices.java +++ b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockJpaServices.java @@ -9,7 +9,7 @@ * 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, + * 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. @@ -23,8 +23,7 @@ import org.jboss.weld.injection.spi.JpaInjectionServices; import org.jboss.weld.injection.spi.ResourceReferenceFactory; -public class MockJpaServices extends MockService implements JpaInjectionServices -{ +public class MockJpaServices extends MockService implements JpaInjectionServices { @Override public ResourceReferenceFactory registerPersistenceContextInjectionPoint(InjectionPoint injectionPoint) { diff --git a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockResourceFactory.java b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockResourceFactory.java index f9d755a7..8110f880 100644 --- a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockResourceFactory.java +++ b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockResourceFactory.java @@ -16,8 +16,8 @@ */ package org.jboss.weld.bootstrap.api.test; -import org.jboss.weld.injection.spi.ResourceReferenceFactory; import org.jboss.weld.injection.spi.ResourceReference; +import org.jboss.weld.injection.spi.ResourceReferenceFactory; public class MockResourceFactory implements ResourceReferenceFactory { diff --git a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockResourceLoader.java b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockResourceLoader.java index 6bbe3bcd..4fb3200a 100644 --- a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockResourceLoader.java +++ b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockResourceLoader.java @@ -9,7 +9,7 @@ * 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, + * 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. @@ -21,22 +21,18 @@ import org.jboss.weld.resources.spi.ResourceLoader; -public class MockResourceLoader extends MockService implements ResourceLoader -{ - - public Class classForName(String name) - { - return null; - } - - public URL getResource(String name) - { - return null; - } - - public Collection getResources(String name) - { - return null; - } - +public class MockResourceLoader extends MockService implements ResourceLoader { + + public Class classForName(String name) { + return null; + } + + public URL getResource(String name) { + return null; + } + + public Collection getResources(String name) { + return null; + } + } diff --git a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockResourceServices.java b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockResourceServices.java index 6f216b01..c1a643f9 100644 --- a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockResourceServices.java +++ b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockResourceServices.java @@ -9,7 +9,7 @@ * 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, + * 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. @@ -18,8 +18,8 @@ import jakarta.enterprise.inject.spi.InjectionPoint; -import org.jboss.weld.injection.spi.ResourceReferenceFactory; import org.jboss.weld.injection.spi.ResourceInjectionServices; +import org.jboss.weld.injection.spi.ResourceReferenceFactory; public class MockResourceServices extends MockService implements ResourceInjectionServices { diff --git a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockService.java b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockService.java index 5da2d99d..efd109e6 100644 --- a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockService.java +++ b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockService.java @@ -22,11 +22,9 @@ * @author pmuir * */ -public abstract class MockService implements Service -{ +public abstract class MockService implements Service { - public void cleanup() - { - } + public void cleanup() { + } } diff --git a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockTransactionServices.java b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockTransactionServices.java index 34a78ea7..fd70a883 100644 --- a/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockTransactionServices.java +++ b/weld-spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockTransactionServices.java @@ -9,7 +9,7 @@ * 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, + * 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. @@ -21,21 +21,17 @@ import org.jboss.weld.transaction.spi.TransactionServices; -public class MockTransactionServices extends MockService implements TransactionServices -{ - - public boolean isTransactionActive() - { - return false; - } - - public void registerSynchronization(Synchronization synchronizedObserver) - { - } - - public UserTransaction getUserTransaction() - { - return null; - } - +public class MockTransactionServices extends MockService implements TransactionServices { + + public boolean isTransactionActive() { + return false; + } + + public void registerSynchronization(Synchronization synchronizedObserver) { + } + + public UserTransaction getUserTransaction() { + return null; + } + } diff --git a/weld/src/main/java/org/jboss/weld/bootstrap/event/InterceptorConfigurator.java b/weld/src/main/java/org/jboss/weld/bootstrap/event/InterceptorConfigurator.java index 2db0bdfe..09f61c9d 100644 --- a/weld/src/main/java/org/jboss/weld/bootstrap/event/InterceptorConfigurator.java +++ b/weld/src/main/java/org/jboss/weld/bootstrap/event/InterceptorConfigurator.java @@ -39,14 +39,16 @@ public interface InterceptorConfigurator { * @param interceptorFunction a function holding the interception logic * @return self */ - InterceptorConfigurator intercept(InterceptionType interceptionType, Function interceptorFunction); + InterceptorConfigurator intercept(InterceptionType interceptionType, + Function interceptorFunction); /** * @param interceptionType specifies an interception type, e.g. around invoke, post construct, ... * @param interceptorFunction a function holding the interception logic * @return self */ - InterceptorConfigurator interceptWithMetadata(InterceptionType interceptionType, BiFunction, Object> interceptorFunction); + InterceptorConfigurator interceptWithMetadata(InterceptionType interceptionType, + BiFunction, Object> interceptorFunction); /** * Adds interceptor binding annotation. diff --git a/weld/src/main/java/org/jboss/weld/context/ApplicationContext.java b/weld/src/main/java/org/jboss/weld/context/ApplicationContext.java index d6cf028c..3aa1acb1 100644 --- a/weld/src/main/java/org/jboss/weld/context/ApplicationContext.java +++ b/weld/src/main/java/org/jboss/weld/context/ApplicationContext.java @@ -14,7 +14,8 @@ *

* *
- * @ Inject ApplicationContext applicationContext;
+ * @Inject
+ * ApplicationContext applicationContext;
  * 
* * @author Pete Muir diff --git a/weld/src/main/java/org/jboss/weld/context/ConversationContext.java b/weld/src/main/java/org/jboss/weld/context/ConversationContext.java index 1eef5889..9936af20 100644 --- a/weld/src/main/java/org/jboss/weld/context/ConversationContext.java +++ b/weld/src/main/java/org/jboss/weld/context/ConversationContext.java @@ -22,7 +22,9 @@ *

* *
- * @ Inject @ Http ConversationContext conversationContext;
+ * @Inject
+ * @Http
+ * ConversationContext conversationContext;
  * 
* *

@@ -30,7 +32,9 @@ *

* *
- * @ Inject @ Bound ConversationContext conversationContext;
+ * @Inject
+ * @Bound
+ * ConversationContext conversationContext;
  * 
* * @author Pete Muir diff --git a/weld/src/main/java/org/jboss/weld/context/DependentContext.java b/weld/src/main/java/org/jboss/weld/context/DependentContext.java index fc0ea341..ede28e9f 100644 --- a/weld/src/main/java/org/jboss/weld/context/DependentContext.java +++ b/weld/src/main/java/org/jboss/weld/context/DependentContext.java @@ -13,7 +13,8 @@ *

* *
- * @ Inject DependentContext dependentContext;
+ * @Inject
+ * DependentContext dependentContext;
  * 
* * @author Pete Muir diff --git a/weld/src/main/java/org/jboss/weld/context/RequestContext.java b/weld/src/main/java/org/jboss/weld/context/RequestContext.java index 9b478a1d..aaced843 100644 --- a/weld/src/main/java/org/jboss/weld/context/RequestContext.java +++ b/weld/src/main/java/org/jboss/weld/context/RequestContext.java @@ -22,7 +22,9 @@ *

* *
- * @ Inject @ Http RequestContext requestContext;
+ * @Inject
+ * @Http
+ * RequestContext requestContext;
  * 
* *

@@ -30,7 +32,9 @@ *

* *
- * @ Inject @ Bound RequestContext requestContext;
+ * @Inject
+ * @Bound
+ * RequestContext requestContext;
  * 
* *

@@ -38,7 +42,9 @@ *

* *
- * @ Inject @ Unbound RequestContext requestContext;
+ * @Inject
+ * @Unbound
+ * RequestContext requestContext;
  * 
* *

@@ -47,7 +53,9 @@ * * *

- * @ Inject @ Ejb RequestContext requestContext;
+ * @Inject
+ * @Ejb
+ * RequestContext requestContext;
  * 
* * @author Pete Muir diff --git a/weld/src/main/java/org/jboss/weld/context/SessionContext.java b/weld/src/main/java/org/jboss/weld/context/SessionContext.java index 31be3ed0..0d0a4d54 100644 --- a/weld/src/main/java/org/jboss/weld/context/SessionContext.java +++ b/weld/src/main/java/org/jboss/weld/context/SessionContext.java @@ -19,7 +19,9 @@ *

* *
- * @ Inject @ Http SessionContext sessionContext;
+ * @Inject
+ * @Http
+ * SessionContext sessionContext;
  * 
* *

@@ -27,7 +29,9 @@ *

* *
- * @ Inject @ Bound SessionContext sessionContext;
+ * @Inject
+ * @Bound
+ * SessionContext sessionContext;
  * 
* * @author Pete Muir diff --git a/weld/src/main/java/org/jboss/weld/context/SingletonContext.java b/weld/src/main/java/org/jboss/weld/context/SingletonContext.java index c806d9e6..4eb80b6e 100644 --- a/weld/src/main/java/org/jboss/weld/context/SingletonContext.java +++ b/weld/src/main/java/org/jboss/weld/context/SingletonContext.java @@ -15,7 +15,8 @@ *

* *
- * @ Inject SingletonContext singletonContext;
+ * @Inject
+ * SingletonContext singletonContext;
  * 
* * @author Pete Muir diff --git a/weld/src/main/java/org/jboss/weld/context/WeldAlterableContext.java b/weld/src/main/java/org/jboss/weld/context/WeldAlterableContext.java index 3485b632..fcde0387 100644 --- a/weld/src/main/java/org/jboss/weld/context/WeldAlterableContext.java +++ b/weld/src/main/java/org/jboss/weld/context/WeldAlterableContext.java @@ -34,13 +34,15 @@ public interface WeldAlterableContext extends AlterableContext { /** - * Retrieves set of {@link ContextualInstance} within the context. This entails all instances that were created up to this point - Weld creates + * Retrieves set of {@link ContextualInstance} within the context. This entails all instances that were created up to this + * point - Weld creates * them lazily so unless some beans were already used, they have not been stored. * * @return Set of all {@link ContextualInstance} existing in this context */ default Collection> getAllContextualInstances() { - throw new UnsupportedOperationException("getAllContextualInstances() is not implemented for context " + this.getClass()); + throw new UnsupportedOperationException( + "getAllContextualInstances() is not implemented for context " + this.getClass()); } /** diff --git a/weld/src/main/java/org/jboss/weld/context/activator/ActivateRequestContext.java b/weld/src/main/java/org/jboss/weld/context/activator/ActivateRequestContext.java index d23e7ba3..45c389a6 100644 --- a/weld/src/main/java/org/jboss/weld/context/activator/ActivateRequestContext.java +++ b/weld/src/main/java/org/jboss/weld/context/activator/ActivateRequestContext.java @@ -32,7 +32,8 @@ *

* If the request context is already active then the associated interceptor does nothing. *

- * The interceptor is registered with a priority of {@link jakarta.interceptor.Interceptor.Priority#PLATFORM_BEFORE} + 100. The same value is used for + * The interceptor is registered with a priority of {@link jakarta.interceptor.Interceptor.Priority#PLATFORM_BEFORE} + 100. The + * same value is used for * {@link jakarta.enterprise.context.control.ActivateRequestContext}. * * @author Tomas Remes diff --git a/weld/src/main/java/org/jboss/weld/context/bound/Bound.java b/weld/src/main/java/org/jboss/weld/context/bound/Bound.java index 9cec3ae4..2d00c9e8 100644 --- a/weld/src/main/java/org/jboss/weld/context/bound/Bound.java +++ b/weld/src/main/java/org/jboss/weld/context/bound/Bound.java @@ -1,17 +1,17 @@ package org.jboss.weld.context.bound; -import java.lang.annotation.Documented; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.inject.Qualifier; - import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import jakarta.inject.Qualifier; + /** * Qualifier used with all for all of the bound (map backed) contexts Weld offers. * diff --git a/weld/src/main/java/org/jboss/weld/context/bound/BoundLiteral.java b/weld/src/main/java/org/jboss/weld/context/bound/BoundLiteral.java index 79fcb664..9ba2bebf 100644 --- a/weld/src/main/java/org/jboss/weld/context/bound/BoundLiteral.java +++ b/weld/src/main/java/org/jboss/weld/context/bound/BoundLiteral.java @@ -1,34 +1,34 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2008, 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.context.bound; - -import jakarta.enterprise.util.AnnotationLiteral; - -/** - * Annotation literal for {@link Bound} - * - * @author Pete Muir - */ -@SuppressWarnings("all") -public class BoundLiteral extends AnnotationLiteral implements Bound { - - public static final Bound INSTANCE = new BoundLiteral(); - - private BoundLiteral() { - } - -} +/* + * JBoss, Home of Professional Open Source + * Copyright 2008, 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.context.bound; + +import jakarta.enterprise.util.AnnotationLiteral; + +/** + * Annotation literal for {@link Bound} + * + * @author Pete Muir + */ +@SuppressWarnings("all") +public class BoundLiteral extends AnnotationLiteral implements Bound { + + public static final Bound INSTANCE = new BoundLiteral(); + + private BoundLiteral() { + } + +} diff --git a/weld/src/main/java/org/jboss/weld/context/ejb/Ejb.java b/weld/src/main/java/org/jboss/weld/context/ejb/Ejb.java index dd0b38d4..32db90cd 100644 --- a/weld/src/main/java/org/jboss/weld/context/ejb/Ejb.java +++ b/weld/src/main/java/org/jboss/weld/context/ejb/Ejb.java @@ -1,17 +1,17 @@ package org.jboss.weld.context.ejb; -import java.lang.annotation.Documented; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.inject.Qualifier; - import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import jakarta.inject.Qualifier; + /** * Qualifier used with all for all of the EJB contexts Weld offers. * diff --git a/weld/src/main/java/org/jboss/weld/context/ejb/EjbLiteral.java b/weld/src/main/java/org/jboss/weld/context/ejb/EjbLiteral.java index de2050a5..43a5520f 100644 --- a/weld/src/main/java/org/jboss/weld/context/ejb/EjbLiteral.java +++ b/weld/src/main/java/org/jboss/weld/context/ejb/EjbLiteral.java @@ -1,34 +1,34 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2008, 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.context.ejb; - -import jakarta.enterprise.util.AnnotationLiteral; - -/** - * Annotation literal for {@link Ejb} - * - * @author Pete Muir - */ -@SuppressWarnings("all") -public class EjbLiteral extends AnnotationLiteral implements Ejb { - - public static final Ejb INSTANCE = new EjbLiteral(); - - private EjbLiteral() { - } - -} +/* + * JBoss, Home of Professional Open Source + * Copyright 2008, 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.context.ejb; + +import jakarta.enterprise.util.AnnotationLiteral; + +/** + * Annotation literal for {@link Ejb} + * + * @author Pete Muir + */ +@SuppressWarnings("all") +public class EjbLiteral extends AnnotationLiteral implements Ejb { + + public static final Ejb INSTANCE = new EjbLiteral(); + + private EjbLiteral() { + } + +} diff --git a/weld/src/main/java/org/jboss/weld/context/http/Http.java b/weld/src/main/java/org/jboss/weld/context/http/Http.java index 9c838ee6..3729f8cf 100644 --- a/weld/src/main/java/org/jboss/weld/context/http/Http.java +++ b/weld/src/main/java/org/jboss/weld/context/http/Http.java @@ -1,17 +1,17 @@ package org.jboss.weld.context.http; -import java.lang.annotation.Documented; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.inject.Qualifier; - import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import jakarta.inject.Qualifier; + /** * Qualifier used with all for all of the Servlet backed contexts Weld offers. * diff --git a/weld/src/main/java/org/jboss/weld/context/http/HttpConversationContext.java b/weld/src/main/java/org/jboss/weld/context/http/HttpConversationContext.java index 3845d7d6..469a9778 100644 --- a/weld/src/main/java/org/jboss/weld/context/http/HttpConversationContext.java +++ b/weld/src/main/java/org/jboss/weld/context/http/HttpConversationContext.java @@ -41,12 +41,15 @@ public interface HttpConversationContext extends BoundContext - * Activate the conversation context lazily - neither determine the conversation id, nor initialize the context. The context is only initialized when a - * conversation-scoped bean is accessed for the first time. The callback, if specified, is executed during initialization of a transient conversation. The + * Activate the conversation context lazily - neither determine the conversation id, nor initialize the context. The context + * is only initialized when a + * conversation-scoped bean is accessed for the first time. The callback, if specified, is executed during initialization of + * a transient conversation. The * implementation must throw a {@link RuntimeException} if the lazy initialization is not supported. *

* - * @param transientConversationInitializationCallback the callback which is invoked during initialization of a transient conversation + * @param transientConversationInitializationCallback the callback which is invoked during initialization of a transient + * conversation */ default void activateLazily(Consumer transientConversationInitializationCallback) { throw new UnsupportedOperationException(); diff --git a/weld/src/main/java/org/jboss/weld/context/http/HttpLiteral.java b/weld/src/main/java/org/jboss/weld/context/http/HttpLiteral.java index 7cafa58c..cf2f3a9e 100644 --- a/weld/src/main/java/org/jboss/weld/context/http/HttpLiteral.java +++ b/weld/src/main/java/org/jboss/weld/context/http/HttpLiteral.java @@ -1,34 +1,34 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2008, 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.context.http; - -import jakarta.enterprise.util.AnnotationLiteral; - -/** - * Annotation literal for {@link Http} - * - * @author Pete Muir - */ -@SuppressWarnings("all") -public class HttpLiteral extends AnnotationLiteral implements Http { - - public static final Http INSTANCE = new HttpLiteral(); - - private HttpLiteral() { - } - -} +/* + * JBoss, Home of Professional Open Source + * Copyright 2008, 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.context.http; + +import jakarta.enterprise.util.AnnotationLiteral; + +/** + * Annotation literal for {@link Http} + * + * @author Pete Muir + */ +@SuppressWarnings("all") +public class HttpLiteral extends AnnotationLiteral implements Http { + + public static final Http INSTANCE = new HttpLiteral(); + + private HttpLiteral() { + } + +} diff --git a/weld/src/main/java/org/jboss/weld/context/unbound/Unbound.java b/weld/src/main/java/org/jboss/weld/context/unbound/Unbound.java index 2a0a3d4d..3c3fd8ad 100644 --- a/weld/src/main/java/org/jboss/weld/context/unbound/Unbound.java +++ b/weld/src/main/java/org/jboss/weld/context/unbound/Unbound.java @@ -1,17 +1,17 @@ package org.jboss.weld.context.unbound; -import java.lang.annotation.Documented; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.inject.Qualifier; - import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import jakarta.inject.Qualifier; + /** * Qualifier used with all for all of the unbound contexts Weld offers. * diff --git a/weld/src/main/java/org/jboss/weld/context/unbound/UnboundLiteral.java b/weld/src/main/java/org/jboss/weld/context/unbound/UnboundLiteral.java index e1d8504a..b0fd1b95 100644 --- a/weld/src/main/java/org/jboss/weld/context/unbound/UnboundLiteral.java +++ b/weld/src/main/java/org/jboss/weld/context/unbound/UnboundLiteral.java @@ -1,36 +1,36 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2008, 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.context.unbound; - -import jakarta.enterprise.util.AnnotationLiteral; - -import org.jboss.weld.context.bound.Bound; - -/** - * Annotation literal for {@link Bound} - * - * @author Pete Muir - */ -@SuppressWarnings("all") -public class UnboundLiteral extends AnnotationLiteral implements Unbound { - - public static final Unbound INSTANCE = new UnboundLiteral(); - - private UnboundLiteral() { - } - -} +/* + * JBoss, Home of Professional Open Source + * Copyright 2008, 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.context.unbound; + +import jakarta.enterprise.util.AnnotationLiteral; + +import org.jboss.weld.context.bound.Bound; + +/** + * Annotation literal for {@link Bound} + * + * @author Pete Muir + */ +@SuppressWarnings("all") +public class UnboundLiteral extends AnnotationLiteral implements Unbound { + + public static final Unbound INSTANCE = new UnboundLiteral(); + + private UnboundLiteral() { + } + +} diff --git a/weld/src/main/java/org/jboss/weld/events/WeldEvent.java b/weld/src/main/java/org/jboss/weld/events/WeldEvent.java index 96e5446f..50c46808 100644 --- a/weld/src/main/java/org/jboss/weld/events/WeldEvent.java +++ b/weld/src/main/java/org/jboss/weld/events/WeldEvent.java @@ -35,14 +35,14 @@ public interface WeldEvent extends Event { * {@code Event} where T is {@link java.lang.Object}. *

* - * @param the required type - * @param type a {@link java.lang.reflect.Type} representing the required type + * @param the required type + * @param type a {@link java.lang.reflect.Type} representing the required type * @param qualifiers the additional required qualifiers * @return the child {@code Event} * @throws IllegalArgumentException if passed two instances of the same non repeating qualifier type, or an instance of an - * annotation that is not a qualifier type - * @throws IllegalStateException if invoked on {@code Event} where T is of any other type than - * {@link java.lang.Object} + * annotation that is not a qualifier type + * @throws IllegalStateException if invoked on {@code Event} where T is of any other type than + * {@link java.lang.Object} */ WeldEvent select(Type type, Annotation... qualifiers); diff --git a/weld/src/main/java/org/jboss/weld/events/WeldNotificationOptions.java b/weld/src/main/java/org/jboss/weld/events/WeldNotificationOptions.java index 841c6f2d..21ba3a6b 100644 --- a/weld/src/main/java/org/jboss/weld/events/WeldNotificationOptions.java +++ b/weld/src/main/java/org/jboss/weld/events/WeldNotificationOptions.java @@ -19,7 +19,8 @@ import jakarta.enterprise.event.NotificationOptions; /** - * The {@link jakarta.enterprise.event.Event#fireAsync(Object, NotificationOptions)} method allows to configure the notification of asynchronous observer methods. + * The {@link jakarta.enterprise.event.Event#fireAsync(Object, NotificationOptions)} method allows to configure the notification + * of asynchronous observer methods. *

* Weld defines the following non-portable options: *

    @@ -43,8 +44,10 @@ public interface WeldNotificationOptions extends NotificationOptions { /** * Makes it possible to specify a timeout (in milliseconds) after which the returned completion stage must be completed. *

    - * If the time expires the stage is completed exceptionally with a {@link java.util.concurrent.CompletionException} holding the - * {@link java.util.concurrent.TimeoutException} as its cause. The expiration does not abort the notification of the observers. + * If the time expires the stage is completed exceptionally with a {@link java.util.concurrent.CompletionException} holding + * the + * {@link java.util.concurrent.TimeoutException} as its cause. The expiration does not abort the notification of the + * observers. *

    */ String TIMEOUT = "weld.async.notification.timeout"; @@ -77,7 +80,8 @@ enum NotificationMode { */ SERIAL, /** - * Async observers are notified in parallel assuming that the {@link java.util.concurrent.Executor} used supports parallel execution. + * Async observers are notified in parallel assuming that the {@link java.util.concurrent.Executor} used supports + * parallel execution. */ PARALLEL,; diff --git a/weld/src/main/java/org/jboss/weld/inject/WeldInstance.java b/weld/src/main/java/org/jboss/weld/inject/WeldInstance.java index 55cc92c5..aafea3ba 100644 --- a/weld/src/main/java/org/jboss/weld/inject/WeldInstance.java +++ b/weld/src/main/java/org/jboss/weld/inject/WeldInstance.java @@ -34,8 +34,10 @@ * Represents an enhanced version of {@link Instance}. * *

    - * 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 + * 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. *

    * @@ -66,7 +68,8 @@ public interface WeldInstance extends Instance { * This method is deprecated as a similar functioning method exists in CDI 4.0 and newer. * Users should instead use {@link Instance#getHandle()}. * - * Obtains an initialized contextual reference handler for the bean that has the required type and required qualifiers and is eligible for injection. + * Obtains an initialized contextual reference handler for the bean that has the required type and required qualifiers and + * is eligible for injection. * *

    * The contextual reference is obtained lazily, i.e. when first needed. @@ -83,11 +86,13 @@ public interface WeldInstance extends Instance { * This method is deprecated as a similar functioning method exists in CDI 4.0 and newer. * Users should instead use {@link Instance#handles()}. * - * Allows to iterate over contextual reference handlers for all the beans that have the required type and required qualifiers and are eligible + * Allows to iterate over contextual reference handlers for all the beans that have the required type and required + * qualifiers and are eligible * for injection. * *

    - * Note that the returned {@link Iterable} is stateless and so each {@link Iterable#iterator()} produces a new set of handlers. + * Note that the returned {@link Iterable} is stateless and so each {@link Iterable#iterator()} produces a new set of + * handlers. *

    * * @return a new iterable @@ -112,7 +117,8 @@ default Stream> handlersStream() { * * The returned comparator sorts handlers by priority in descending order. *
      - *
    • A class-based bean whose annotated type has {@code jakarta.annotation.Priority} has the priority of value {@code jakarta.annotation.Priority#value()}
    • + *
    • A class-based bean whose annotated type has {@code jakarta.annotation.Priority} has the priority of value + * {@code jakarta.annotation.Priority#value()}
    • *
    • A custom bean which implements {@link Prioritized} has the priority of value {@link Prioritized#getPriority()}
    • *
    • Any other bean has the priority of value 0
    • *
    @@ -125,7 +131,8 @@ default Stream> handlersStream() { /** * The returned comparator sorts handles by priority in descending order. *
      - *
    • A class-based bean whose annotated type has {@code jakarta.annotation.Priority} has the priority of value {@code jakarta.annotation.Priority#value()}
    • + *
    • A class-based bean whose annotated type has {@code jakarta.annotation.Priority} has the priority of value + * {@code jakarta.annotation.Priority#value()}
    • *
    • A custom bean which implements {@link Prioritized} has the priority of value {@link Prioritized#getPriority()}
    • *
    • Any other bean has the priority of value 0
    • *
    @@ -143,20 +150,21 @@ default Stream> handlersStream() { @Override WeldInstance select(TypeLiteral subtype, Annotation... qualifiers); - /** + /** *

    * Obtains a child {@code Instance} for the given required type and additional required qualifiers. * Must be invoked on {@code Instance} where T is {@link java.lang.Object}. *

    * * @param the required type - * @param subtype a {@link java.lang.reflect.Type} representing the required type + * @param subtype a {@link java.lang.reflect.Type} representing the required type * @param qualifiers the additional required qualifiers * @return the child {@code Instance} * @throws IllegalArgumentException if passed two instances of the same non repeating qualifier type, or an instance of an - * annotation that is not a qualifier type - * @throws IllegalStateException if the container is already shutdown - * @throws IllegalStateException if invoked on {@code Instance} where T is of any other type than {@link java.lang.Object} + * annotation that is not a qualifier type + * @throws IllegalStateException if the container is already shutdown + * @throws IllegalStateException if invoked on {@code Instance} where T is of any other type than + * {@link java.lang.Object} */ WeldInstance select(Type subtype, Annotation... qualifiers);