From d3e86c94caae03776985291ff7672d9b721fef8a Mon Sep 17 00:00:00 2001 From: Scott M Stark Date: Mon, 26 Feb 2024 16:36:30 -0600 Subject: [PATCH] Correct the javadoc warnings seen under JDK 17 Fixes #719 Signed-off-by: Scott M Stark --- .../enterprise/context/ApplicationScoped.java | 2 +- .../enterprise/context/BeforeDestroyed.java | 11 ++++++++- .../context/BusyConversationException.java | 16 +++++++++++++ .../enterprise/context/ContextException.java | 16 +++++++++++++ .../context/ContextNotActiveException.java | 16 +++++++++++++ .../context/ConversationScoped.java | 2 +- .../jakarta/enterprise/context/Dependent.java | 2 +- .../jakarta/enterprise/context/Destroyed.java | 11 ++++++++- .../enterprise/context/Initialized.java | 11 ++++++++- .../NonexistentConversationException.java | 16 +++++++++++++ .../enterprise/context/RequestScoped.java | 2 +- .../enterprise/context/SessionScoped.java | 2 +- .../enterprise/event/NotificationOptions.java | 15 ++++++++++++ .../enterprise/event/ObserverException.java | 16 +++++++++++++ .../enterprise/inject/Alternative.java | 2 +- .../inject/AmbiguousResolutionException.java | 16 +++++++++++++ .../java/jakarta/enterprise/inject/Any.java | 2 +- .../enterprise/inject/CreationException.java | 16 +++++++++++++ .../jakarta/enterprise/inject/Default.java | 2 +- .../inject/IllegalProductException.java | 16 +++++++++++++ .../enterprise/inject/InjectionException.java | 24 +++++++++++++++---- .../inject/ResolutionException.java | 16 +++++++++++++ .../enterprise/inject/Specializes.java | 2 +- .../enterprise/inject/TransientReference.java | 2 +- .../java/jakarta/enterprise/inject/Typed.java | 11 ++++++++- .../UnproxyableResolutionException.java | 24 +++++++++++++++---- .../UnsatisfiedResolutionException.java | 24 +++++++++++++++---- .../jakarta/enterprise/inject/Vetoed.java | 2 +- .../inject/literal/InjectLiteral.java | 2 +- .../inject/literal/NamedLiteral.java | 8 ++++++- .../inject/literal/QualifierLiteral.java | 2 +- .../inject/literal/SingletonLiteral.java | 2 +- .../enterprise/inject/spi/Annotated.java | 2 +- .../enterprise/inject/spi/AnnotatedType.java | 2 +- .../jakarta/enterprise/inject/spi/CDI.java | 2 ++ .../enterprise/inject/spi/CDIProvider.java | 1 + .../inject/spi/DefinitionException.java | 21 ++++++++++++---- .../inject/spi/DeploymentException.java | 21 ++++++++++++---- .../enterprise/inject/spi/ObserverMethod.java | 2 +- .../inject/spi/WithAnnotations.java | 5 +++- .../enterprise/util/AnnotationLiteral.java | 3 +++ .../jakarta/enterprise/util/Nonbinding.java | 2 +- .../jakarta/enterprise/util/TypeLiteral.java | 3 +++ api/src/main/java/module-info.java | 3 +++ 44 files changed, 334 insertions(+), 44 deletions(-) diff --git a/api/src/main/java/jakarta/enterprise/context/ApplicationScoped.java b/api/src/main/java/jakarta/enterprise/context/ApplicationScoped.java index 6a07d0a1..19c47b9b 100644 --- a/api/src/main/java/jakarta/enterprise/context/ApplicationScoped.java +++ b/api/src/main/java/jakarta/enterprise/context/ApplicationScoped.java @@ -91,7 +91,7 @@ * @since 2.0 */ public final static class Literal extends AnnotationLiteral implements ApplicationScoped { - + /** Default ApplicationScoped literal */ public static final Literal INSTANCE = new Literal(); private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/enterprise/context/BeforeDestroyed.java b/api/src/main/java/jakarta/enterprise/context/BeforeDestroyed.java index 469e5c47..080d4461 100644 --- a/api/src/main/java/jakarta/enterprise/context/BeforeDestroyed.java +++ b/api/src/main/java/jakarta/enterprise/context/BeforeDestroyed.java @@ -54,19 +54,28 @@ * Supports inline instantiation of the {@link BeforeDestroyed} qualifier. */ public final static class Literal extends AnnotationLiteral implements BeforeDestroyed { - + /** Default RequestScoped literal */ public static final Literal REQUEST = of(RequestScoped.class); + /** Default ConversationScoped literal */ public static final Literal CONVERSATION = of(ConversationScoped.class); + /** Default SessionScoped literal */ public static final Literal SESSION = of(SessionScoped.class); + /** Default ApplicationScoped literal */ public static final Literal APPLICATION = of(ApplicationScoped.class); private static final long serialVersionUID = 1L; + /** */ private final Class value; + /** + * Obtain the literal of the provided scope annotation + * @param value - the scope annotation + * @return a new Literal value for the provided scope annotation + */ public static Literal of(Class value) { return new Literal(value); } diff --git a/api/src/main/java/jakarta/enterprise/context/BusyConversationException.java b/api/src/main/java/jakarta/enterprise/context/BusyConversationException.java index 1fcd4e74..f99440f5 100644 --- a/api/src/main/java/jakarta/enterprise/context/BusyConversationException.java +++ b/api/src/main/java/jakarta/enterprise/context/BusyConversationException.java @@ -41,18 +41,34 @@ public class BusyConversationException extends ContextException { private static final long serialVersionUID = -3599813072560026919L; + /** + * default ctor + */ public BusyConversationException() { super(); } + /** + * Create exception with given message + * @param message - context information + */ public BusyConversationException(String message) { super(message); } + /** + * Create exception with given cause + * @param cause - cause of exception + */ public BusyConversationException(Throwable cause) { super(cause); } + /** + * Create exception with given message and cause + * @param message - context information + * @param cause - cause of exception + */ public BusyConversationException(String message, Throwable cause) { super(message, cause); } diff --git a/api/src/main/java/jakarta/enterprise/context/ContextException.java b/api/src/main/java/jakarta/enterprise/context/ContextException.java index 3f1be66e..ac660701 100644 --- a/api/src/main/java/jakarta/enterprise/context/ContextException.java +++ b/api/src/main/java/jakarta/enterprise/context/ContextException.java @@ -26,18 +26,34 @@ public class ContextException extends RuntimeException { private static final long serialVersionUID = -3599813072560026919L; + /** + * default ctor + */ public ContextException() { super(); } + /** + * Create exception with given message and cause + * @param message - context information + */ public ContextException(String message) { super(message); } + /** + * Create exception with given message and cause + * @param cause - cause of exception + */ public ContextException(Throwable cause) { super(cause); } + /** + * Create exception with given message and cause + * @param message - context information + * @param cause - cause of exception + */ public ContextException(String message, Throwable cause) { super(message, cause); } diff --git a/api/src/main/java/jakarta/enterprise/context/ContextNotActiveException.java b/api/src/main/java/jakarta/enterprise/context/ContextNotActiveException.java index 1689c40d..d3046999 100644 --- a/api/src/main/java/jakarta/enterprise/context/ContextNotActiveException.java +++ b/api/src/main/java/jakarta/enterprise/context/ContextNotActiveException.java @@ -32,18 +32,34 @@ public class ContextNotActiveException extends ContextException { private static final long serialVersionUID = -3599813072560026919L; + /** + * Default ctor + */ public ContextNotActiveException() { super(); } + /** + * Create exception with given message + * @param message - context information + */ public ContextNotActiveException(String message) { super(message); } + /** + * Create exception with given cause + * @param cause - cause of exception + */ public ContextNotActiveException(Throwable cause) { super(cause); } + /** + * Create exception with given message and cause + * @param message - context information + * @param cause - cause of exception + */ public ContextNotActiveException(String message, Throwable cause) { super(message, cause); } diff --git a/api/src/main/java/jakarta/enterprise/context/ConversationScoped.java b/api/src/main/java/jakarta/enterprise/context/ConversationScoped.java index e9c081ab..fce2cac4 100644 --- a/api/src/main/java/jakarta/enterprise/context/ConversationScoped.java +++ b/api/src/main/java/jakarta/enterprise/context/ConversationScoped.java @@ -151,7 +151,7 @@ * @since 2.0 */ public final static class Literal extends AnnotationLiteral implements ConversationScoped { - + /** Default ConversationScoped literal */ public static final Literal INSTANCE = new Literal(); private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/enterprise/context/Dependent.java b/api/src/main/java/jakarta/enterprise/context/Dependent.java index f51f30dd..22147ab1 100644 --- a/api/src/main/java/jakarta/enterprise/context/Dependent.java +++ b/api/src/main/java/jakarta/enterprise/context/Dependent.java @@ -108,7 +108,7 @@ * @since 2.0 */ public final static class Literal extends AnnotationLiteral implements Dependent { - + /** Default Dependent literal */ public static final Literal INSTANCE = new Literal(); private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/enterprise/context/Destroyed.java b/api/src/main/java/jakarta/enterprise/context/Destroyed.java index b78bb166..410e426d 100644 --- a/api/src/main/java/jakarta/enterprise/context/Destroyed.java +++ b/api/src/main/java/jakarta/enterprise/context/Destroyed.java @@ -55,19 +55,28 @@ * @author Martin Kouba */ public final static class Literal extends AnnotationLiteral implements Destroyed { - + /** Default RequestScoped literal */ public static final Literal REQUEST = of(RequestScoped.class); + /** Default ConversationScoped literal */ public static final Literal CONVERSATION = of(ConversationScoped.class); + /** Default SessionScoped literal */ public static final Literal SESSION = of(SessionScoped.class); + /** Default ApplicationScoped literal */ public static final Literal APPLICATION = of(ApplicationScoped.class); private static final long serialVersionUID = 1L; + /** */ private final Class value; + /** + * Obtain the literal of the provided scope annotation + * @param value - the scope annotation + * @return a new Literal value for the provided scope annotation + */ public static Literal of(Class value) { return new Literal(value); } diff --git a/api/src/main/java/jakarta/enterprise/context/Initialized.java b/api/src/main/java/jakarta/enterprise/context/Initialized.java index 2bcd934d..161b3a64 100644 --- a/api/src/main/java/jakarta/enterprise/context/Initialized.java +++ b/api/src/main/java/jakarta/enterprise/context/Initialized.java @@ -55,19 +55,28 @@ * @author Martin Kouba */ public final static class Literal extends AnnotationLiteral implements Initialized { - + /** Default RequestScoped literal */ public static final Literal REQUEST = of(RequestScoped.class); + /** Default ConversationScoped literal */ public static final Literal CONVERSATION = of(ConversationScoped.class); + /** Default SessionScoped literal */ public static final Literal SESSION = of(SessionScoped.class); + /** Default ApplicationScoped literal */ public static final Literal APPLICATION = of(ApplicationScoped.class); private static final long serialVersionUID = 1L; + /** */ private final Class value; + /** + * Obtain the literal of the provided scope annotation + * @param value - the scope annotation + * @return a new Literal value for the provided scope annotation + */ public static Literal of(Class value) { return new Literal(value); } diff --git a/api/src/main/java/jakarta/enterprise/context/NonexistentConversationException.java b/api/src/main/java/jakarta/enterprise/context/NonexistentConversationException.java index db571598..96e4813a 100644 --- a/api/src/main/java/jakarta/enterprise/context/NonexistentConversationException.java +++ b/api/src/main/java/jakarta/enterprise/context/NonexistentConversationException.java @@ -38,18 +38,34 @@ public class NonexistentConversationException extends ContextException { private static final long serialVersionUID = -3599813072560026919L; + /** + * Default ctor + */ public NonexistentConversationException() { super(); } + /** + * Create exception with given message + * @param message - context information + */ public NonexistentConversationException(String message) { super(message); } + /** + * Create exception with given cause + * @param cause - cause of exception + */ public NonexistentConversationException(Throwable cause) { super(cause); } + /** + * Create exception with given message and cause + * @param message - context information + * @param cause - cause of exception + */ public NonexistentConversationException(String message, Throwable cause) { super(message, cause); } diff --git a/api/src/main/java/jakarta/enterprise/context/RequestScoped.java b/api/src/main/java/jakarta/enterprise/context/RequestScoped.java index 644f27e3..3caf651d 100644 --- a/api/src/main/java/jakarta/enterprise/context/RequestScoped.java +++ b/api/src/main/java/jakarta/enterprise/context/RequestScoped.java @@ -95,7 +95,7 @@ * @since 2.0 */ public final static class Literal extends AnnotationLiteral implements RequestScoped { - + /** Default RequestScope literal */ public static final Literal INSTANCE = new Literal(); private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/enterprise/context/SessionScoped.java b/api/src/main/java/jakarta/enterprise/context/SessionScoped.java index 64a6a33a..e2bea927 100644 --- a/api/src/main/java/jakarta/enterprise/context/SessionScoped.java +++ b/api/src/main/java/jakarta/enterprise/context/SessionScoped.java @@ -87,7 +87,7 @@ * @since 2.0 */ public final static class Literal extends AnnotationLiteral implements SessionScoped { - + /** Default SessionScoped literal */ public static final Literal INSTANCE = new Literal(); private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/enterprise/event/NotificationOptions.java b/api/src/main/java/jakarta/enterprise/event/NotificationOptions.java index 0b735435..dc27e4cc 100644 --- a/api/src/main/java/jakarta/enterprise/event/NotificationOptions.java +++ b/api/src/main/java/jakarta/enterprise/event/NotificationOptions.java @@ -72,10 +72,25 @@ static Builder builder() { */ interface Builder { + /** + * Set the notification executor + * @param executor - {@linkplain Executor} + * @return this + */ Builder setExecutor(Executor executor); + /** + * Set an option value + * @param optionName - name + * @param optionValue - value + * @return this + */ Builder set(String optionName, Object optionValue); + /** + * Build the notification options + * @return NotificationOptions + */ NotificationOptions build(); } diff --git a/api/src/main/java/jakarta/enterprise/event/ObserverException.java b/api/src/main/java/jakarta/enterprise/event/ObserverException.java index 973ef58a..5c444efb 100644 --- a/api/src/main/java/jakarta/enterprise/event/ObserverException.java +++ b/api/src/main/java/jakarta/enterprise/event/ObserverException.java @@ -26,18 +26,34 @@ public class ObserverException extends RuntimeException { private static final long serialVersionUID = -801836224808304381L; + /** + * Default ctor + */ public ObserverException() { } + /** + * Create exception with given message + * @param message - context information + */ public ObserverException(String message) { super(message); } + /** + * Create exception with given cause + * @param cause - cause of exception + */ public ObserverException(Throwable cause) { super(cause); } + /** + * Create exception with given message and cause + * @param message - context information + * @param cause - cause of exception + */ public ObserverException(String message, Throwable cause) { super(message, cause); } diff --git a/api/src/main/java/jakarta/enterprise/inject/Alternative.java b/api/src/main/java/jakarta/enterprise/inject/Alternative.java index 92999255..184eab06 100644 --- a/api/src/main/java/jakarta/enterprise/inject/Alternative.java +++ b/api/src/main/java/jakarta/enterprise/inject/Alternative.java @@ -71,7 +71,7 @@ * @since 2.0 */ public final static class Literal extends AnnotationLiteral implements Alternative { - + /** Default Alternative literal */ public static final Literal INSTANCE = new Literal(); private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/enterprise/inject/AmbiguousResolutionException.java b/api/src/main/java/jakarta/enterprise/inject/AmbiguousResolutionException.java index 66bac063..3b203ef0 100644 --- a/api/src/main/java/jakarta/enterprise/inject/AmbiguousResolutionException.java +++ b/api/src/main/java/jakarta/enterprise/inject/AmbiguousResolutionException.java @@ -26,17 +26,33 @@ public class AmbiguousResolutionException extends ResolutionException { private static final long serialVersionUID = -2132733164534544788L; + /** + * default ctor + */ public AmbiguousResolutionException() { } + /** + * Create exception with given message and cause + * @param message - context information + * @param throwable - cause of exception + */ public AmbiguousResolutionException(String message, Throwable throwable) { super(message, throwable); } + /** + * Create exception with given message + * @param message - context information + */ public AmbiguousResolutionException(String message) { super(message); } + /** + * Create exception with given cause + * @param throwable - cause of exception + */ public AmbiguousResolutionException(Throwable throwable) { super(throwable); } diff --git a/api/src/main/java/jakarta/enterprise/inject/Any.java b/api/src/main/java/jakarta/enterprise/inject/Any.java index d4f2a907..313a7a1a 100644 --- a/api/src/main/java/jakarta/enterprise/inject/Any.java +++ b/api/src/main/java/jakarta/enterprise/inject/Any.java @@ -83,7 +83,7 @@ * @see Event */ public static final class Literal extends AnnotationLiteral implements Any { - + /** Default Any literal */ public static final Literal INSTANCE = new Literal(); private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/enterprise/inject/CreationException.java b/api/src/main/java/jakarta/enterprise/inject/CreationException.java index fe2a9769..0e8f5c4a 100644 --- a/api/src/main/java/jakarta/enterprise/inject/CreationException.java +++ b/api/src/main/java/jakarta/enterprise/inject/CreationException.java @@ -26,18 +26,34 @@ public class CreationException extends InjectionException { private static final long serialVersionUID = 1002854668862145298L; + /** + * Default ctor + */ public CreationException() { } + /** + * Create exception with given message + * @param message - context information + */ public CreationException(String message) { super(message); } + /** + * Create exception with given cause + * @param cause - cause of exception + */ public CreationException(Throwable cause) { super(cause); } + /** + * Create exception with given message and cause + * @param message - context information + * @param cause - cause of exception + */ public CreationException(String message, Throwable cause) { super(message, cause); } diff --git a/api/src/main/java/jakarta/enterprise/inject/Default.java b/api/src/main/java/jakarta/enterprise/inject/Default.java index 73ab4904..f61f1e79 100644 --- a/api/src/main/java/jakarta/enterprise/inject/Default.java +++ b/api/src/main/java/jakarta/enterprise/inject/Default.java @@ -99,7 +99,7 @@ * @see Event */ public static final class Literal extends AnnotationLiteral implements Default { - + /** The default Default literal */ public static final Literal INSTANCE = new Literal(); private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/enterprise/inject/IllegalProductException.java b/api/src/main/java/jakarta/enterprise/inject/IllegalProductException.java index 72176721..f8d2dd27 100644 --- a/api/src/main/java/jakarta/enterprise/inject/IllegalProductException.java +++ b/api/src/main/java/jakarta/enterprise/inject/IllegalProductException.java @@ -25,18 +25,34 @@ public class IllegalProductException extends InjectionException { private static final long serialVersionUID = -6280627846071966243L; + /** + * Default ctor + */ public IllegalProductException() { super(); } + /** + * Create exception with given message and cause + * @param message - context information + * @param cause - cause of exception + */ public IllegalProductException(String message, Throwable cause) { super(message, cause); } + /** + * Create exception with given message + * @param message - context information + */ public IllegalProductException(String message) { super(message); } + /** + * Create exception with given cause + * @param cause - cause of exception + */ public IllegalProductException(Throwable cause) { super(cause); } diff --git a/api/src/main/java/jakarta/enterprise/inject/InjectionException.java b/api/src/main/java/jakarta/enterprise/inject/InjectionException.java index 43f6d2d7..1c00aaa6 100644 --- a/api/src/main/java/jakarta/enterprise/inject/InjectionException.java +++ b/api/src/main/java/jakarta/enterprise/inject/InjectionException.java @@ -23,19 +23,35 @@ public class InjectionException extends RuntimeException { private static final long serialVersionUID = -2132733164534544788L; + /** + * Default ctor + */ public InjectionException() { } - public InjectionException(String message, Throwable throwable) { - super(message, throwable); + /** + * Create exception with given message and cause + * @param message - context information + * @param cause - cause of exception + */ + public InjectionException(String message, Throwable cause) { + super(message, cause); } + /** + * Create exception with given message + * @param message - context information + */ public InjectionException(String message) { super(message); } - public InjectionException(Throwable throwable) { - super(throwable); + /** + * Create exception with given cause + * @param cause - cause of exception + */ + public InjectionException(Throwable cause) { + super(cause); } } diff --git a/api/src/main/java/jakarta/enterprise/inject/ResolutionException.java b/api/src/main/java/jakarta/enterprise/inject/ResolutionException.java index aa78b86c..56c98688 100644 --- a/api/src/main/java/jakarta/enterprise/inject/ResolutionException.java +++ b/api/src/main/java/jakarta/enterprise/inject/ResolutionException.java @@ -22,18 +22,34 @@ public class ResolutionException extends InjectionException { private static final long serialVersionUID = -6280627846071966243L; + /** + * Default ctor + */ public ResolutionException() { super(); } + /** + * Create exception with given message and cause + * @param message - context information + * @param cause - cause of exception + */ public ResolutionException(String message, Throwable cause) { super(message, cause); } + /** + * Create exception with given message + * @param message - context information + */ public ResolutionException(String message) { super(message); } + /** + * Create exception with given cause + * @param cause - cause of exception + */ public ResolutionException(Throwable cause) { super(cause); } diff --git a/api/src/main/java/jakarta/enterprise/inject/Specializes.java b/api/src/main/java/jakarta/enterprise/inject/Specializes.java index cdadeb91..10cd24f2 100644 --- a/api/src/main/java/jakarta/enterprise/inject/Specializes.java +++ b/api/src/main/java/jakarta/enterprise/inject/Specializes.java @@ -83,7 +83,7 @@ public static final class Literal extends AnnotationLiteral implements Specializes { private static final long serialVersionUID = 1L; - + /** Default Specializes literal */ public static final Literal INSTANCE = new Literal(); } diff --git a/api/src/main/java/jakarta/enterprise/inject/TransientReference.java b/api/src/main/java/jakarta/enterprise/inject/TransientReference.java index d0c8622a..f87a2a08 100644 --- a/api/src/main/java/jakarta/enterprise/inject/TransientReference.java +++ b/api/src/main/java/jakarta/enterprise/inject/TransientReference.java @@ -62,7 +62,7 @@ public static final class Literal extends AnnotationLiteral implements TransientReference { private static final long serialVersionUID = 1L; - + /** Default TransientReference literal */ public static final Literal INSTANCE = new Literal(); } diff --git a/api/src/main/java/jakarta/enterprise/inject/Typed.java b/api/src/main/java/jakarta/enterprise/inject/Typed.java index 70a361d3..796912d5 100644 --- a/api/src/main/java/jakarta/enterprise/inject/Typed.java +++ b/api/src/main/java/jakarta/enterprise/inject/Typed.java @@ -69,13 +69,19 @@ * @since 2.0 */ public final static class Literal extends AnnotationLiteral implements Typed { - + /** Default Typed literal */ public static final Literal INSTANCE = of(new Class[] {}); private static final long serialVersionUID = 1L; + /** */ private final Class[] value; + /** + * Obtain the Type literal of the provided bean classes + * @param value - the classes corresponding to the bean types of the bean + * @return a new Literal value for the provided classes + */ public static Literal of(Class[] value) { return new Literal(value); } @@ -84,6 +90,9 @@ private Literal(Class[] value) { this.value = value; } + /** + * @return the classes corresponding to the bean types of the bean + */ public Class[] value() { return value; } diff --git a/api/src/main/java/jakarta/enterprise/inject/UnproxyableResolutionException.java b/api/src/main/java/jakarta/enterprise/inject/UnproxyableResolutionException.java index c4aebc1d..a095fd6a 100644 --- a/api/src/main/java/jakarta/enterprise/inject/UnproxyableResolutionException.java +++ b/api/src/main/java/jakarta/enterprise/inject/UnproxyableResolutionException.java @@ -27,20 +27,36 @@ public class UnproxyableResolutionException extends ResolutionException { private static final long serialVersionUID = 1667539354548135465L; + /** + * Default ctor + */ public UnproxyableResolutionException() { super(); } - public UnproxyableResolutionException(String message, Throwable throwable) { - super(message, throwable); + /** + * Create exception with given message and cause + * @param message - context information + * @param cause - cause of exception + */ + public UnproxyableResolutionException(String message, Throwable cause) { + super(message, cause); } + /** + * Create exception with given message + * @param message - context information + */ public UnproxyableResolutionException(String message) { super(message); } - public UnproxyableResolutionException(Throwable throwable) { - super(throwable); + /** + * Create exception with given cause + * @param cause - cause of exception + */ + public UnproxyableResolutionException(Throwable cause) { + super(cause); } } diff --git a/api/src/main/java/jakarta/enterprise/inject/UnsatisfiedResolutionException.java b/api/src/main/java/jakarta/enterprise/inject/UnsatisfiedResolutionException.java index dff8d3ef..2319f2e2 100644 --- a/api/src/main/java/jakarta/enterprise/inject/UnsatisfiedResolutionException.java +++ b/api/src/main/java/jakarta/enterprise/inject/UnsatisfiedResolutionException.java @@ -26,20 +26,36 @@ public class UnsatisfiedResolutionException extends ResolutionException { private static final long serialVersionUID = 5350603312442756709L; + /** + * Default ctor + */ public UnsatisfiedResolutionException() { super(); } - public UnsatisfiedResolutionException(String message, Throwable throwable) { - super(message, throwable); + /** + * Create exception with given message and cause + * @param message - context information + * @param cause - cause of exception + */ + public UnsatisfiedResolutionException(String message, Throwable cause) { + super(message, cause); } + /** + * Create exception with given message + * @param message - context information + */ public UnsatisfiedResolutionException(String message) { super(message); } - public UnsatisfiedResolutionException(Throwable throwable) { - super(throwable); + /** + * Create exception with given cause + * @param cause - cause of exception + */ + public UnsatisfiedResolutionException(Throwable cause) { + super(cause); } } diff --git a/api/src/main/java/jakarta/enterprise/inject/Vetoed.java b/api/src/main/java/jakarta/enterprise/inject/Vetoed.java index a039ba6a..5ad2a76c 100644 --- a/api/src/main/java/jakarta/enterprise/inject/Vetoed.java +++ b/api/src/main/java/jakarta/enterprise/inject/Vetoed.java @@ -58,7 +58,7 @@ public static final class Literal extends AnnotationLiteral implements Vetoed { private static final long serialVersionUID = 1L; - + /** Default Vetoed literal */ public static final Literal INSTANCE = new Literal(); } diff --git a/api/src/main/java/jakarta/enterprise/inject/literal/InjectLiteral.java b/api/src/main/java/jakarta/enterprise/inject/literal/InjectLiteral.java index 22828b95..3a94bfbe 100644 --- a/api/src/main/java/jakarta/enterprise/inject/literal/InjectLiteral.java +++ b/api/src/main/java/jakarta/enterprise/inject/literal/InjectLiteral.java @@ -23,7 +23,7 @@ * @since 2.0 */ public final class InjectLiteral extends AnnotationLiteral implements Inject { - + /** Default Inject literal */ public static final InjectLiteral INSTANCE = new InjectLiteral(); private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/enterprise/inject/literal/NamedLiteral.java b/api/src/main/java/jakarta/enterprise/inject/literal/NamedLiteral.java index 095d492b..9ce422f7 100644 --- a/api/src/main/java/jakarta/enterprise/inject/literal/NamedLiteral.java +++ b/api/src/main/java/jakarta/enterprise/inject/literal/NamedLiteral.java @@ -24,13 +24,19 @@ * @since 2.0 */ public final class NamedLiteral extends AnnotationLiteral implements Named { - + /** Default NamedLiteral */ public static final Named INSTANCE = of(""); private static final long serialVersionUID = 1L; + /** */ private final String value; + /** + * Create a new NamedLiteral for the given name value + * @param value - name + * @return new NamedLiteral + */ public static NamedLiteral of(String value) { return new NamedLiteral(value); } diff --git a/api/src/main/java/jakarta/enterprise/inject/literal/QualifierLiteral.java b/api/src/main/java/jakarta/enterprise/inject/literal/QualifierLiteral.java index 4f60f0ba..dd5f0626 100644 --- a/api/src/main/java/jakarta/enterprise/inject/literal/QualifierLiteral.java +++ b/api/src/main/java/jakarta/enterprise/inject/literal/QualifierLiteral.java @@ -23,7 +23,7 @@ * @since 2.0 */ public final class QualifierLiteral extends AnnotationLiteral implements Qualifier { - + /** Default QualifierLiteral instance */ public static final QualifierLiteral INSTANCE = new QualifierLiteral(); private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/enterprise/inject/literal/SingletonLiteral.java b/api/src/main/java/jakarta/enterprise/inject/literal/SingletonLiteral.java index 14262cdd..6a3083e4 100644 --- a/api/src/main/java/jakarta/enterprise/inject/literal/SingletonLiteral.java +++ b/api/src/main/java/jakarta/enterprise/inject/literal/SingletonLiteral.java @@ -23,7 +23,7 @@ * @since 2.0 */ public final class SingletonLiteral extends AnnotationLiteral implements Singleton { - + /** Default SingletonLiteral instance */ public static final SingletonLiteral INSTANCE = new SingletonLiteral(); private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/enterprise/inject/spi/Annotated.java b/api/src/main/java/jakarta/enterprise/inject/spi/Annotated.java index b9ae3f65..d6d6cd36 100644 --- a/api/src/main/java/jakarta/enterprise/inject/spi/Annotated.java +++ b/api/src/main/java/jakarta/enterprise/inject/spi/Annotated.java @@ -22,7 +22,7 @@ /** *

* Represents a Java program element that can be annotated. - *

+ *

* * @see java.lang.reflect.AnnotatedElement * diff --git a/api/src/main/java/jakarta/enterprise/inject/spi/AnnotatedType.java b/api/src/main/java/jakarta/enterprise/inject/spi/AnnotatedType.java index 8f5a4a52..ab17b40d 100644 --- a/api/src/main/java/jakarta/enterprise/inject/spi/AnnotatedType.java +++ b/api/src/main/java/jakarta/enterprise/inject/spi/AnnotatedType.java @@ -64,7 +64,7 @@ public interface AnnotatedType extends Annotated { /** *

* Get the {@linkplain AnnotatedField fields} of the type. - *

+ *

* * @return the fields, or an empty set if none are defined */ diff --git a/api/src/main/java/jakarta/enterprise/inject/spi/CDI.java b/api/src/main/java/jakarta/enterprise/inject/spi/CDI.java index 10e6d909..25c4966f 100644 --- a/api/src/main/java/jakarta/enterprise/inject/spi/CDI.java +++ b/api/src/main/java/jakarta/enterprise/inject/spi/CDI.java @@ -42,7 +42,9 @@ public abstract class CDI implements Instance { private static final Object lock = new Object(); private static volatile boolean providerSetManually = false; + /** The set of discovered CDIProviders */ protected static volatile Set discoveredProviders = null; + /** {@link CDIProvider} set by user or retrieved by serviceloader */ protected static volatile CDIProvider configuredProvider = null; /** diff --git a/api/src/main/java/jakarta/enterprise/inject/spi/CDIProvider.java b/api/src/main/java/jakarta/enterprise/inject/spi/CDIProvider.java index 9a7c0732..4811fc51 100644 --- a/api/src/main/java/jakarta/enterprise/inject/spi/CDIProvider.java +++ b/api/src/main/java/jakarta/enterprise/inject/spi/CDIProvider.java @@ -22,6 +22,7 @@ */ public interface CDIProvider extends Prioritized { + /** The default value for {@linkplain #getPriority()} */ public static final int DEFAULT_CDI_PROVIDER_PRIORITY = 0; /** diff --git a/api/src/main/java/jakarta/enterprise/inject/spi/DefinitionException.java b/api/src/main/java/jakarta/enterprise/inject/spi/DefinitionException.java index 0172e053..a34da9d6 100644 --- a/api/src/main/java/jakarta/enterprise/inject/spi/DefinitionException.java +++ b/api/src/main/java/jakarta/enterprise/inject/spi/DefinitionException.java @@ -41,16 +41,29 @@ public class DefinitionException extends RuntimeException { private static final long serialVersionUID = -2699170549782567339L; - public DefinitionException(String message, Throwable t) { - super(message, t); + /** + * Create exception with given message and cause + * @param message - context information + * @param cause - cause of exception + */ + public DefinitionException(String message, Throwable cause) { + super(message, cause); } + /** + * Create exception with given message + * @param message - context information + */ public DefinitionException(String message) { super(message); } - public DefinitionException(Throwable t) { - super(t); + /** + * Create exception with given cause + * @param cause - cause of exception + */ + public DefinitionException(Throwable cause) { + super(cause); } } diff --git a/api/src/main/java/jakarta/enterprise/inject/spi/DeploymentException.java b/api/src/main/java/jakarta/enterprise/inject/spi/DeploymentException.java index 50627b26..82940510 100644 --- a/api/src/main/java/jakarta/enterprise/inject/spi/DeploymentException.java +++ b/api/src/main/java/jakarta/enterprise/inject/spi/DeploymentException.java @@ -41,16 +41,29 @@ public class DeploymentException extends RuntimeException { private static final long serialVersionUID = 2604707587772339984L; - public DeploymentException(String message, Throwable t) { - super(message, t); + /** + * Create exception with given message and cause + * @param message - context information + * @param cause - cause of exception + */ + public DeploymentException(String message, Throwable cause) { + super(message, cause); } + /** + * Create exception with given message + * @param message - context information + */ public DeploymentException(String message) { super(message); } - public DeploymentException(Throwable t) { - super(t); + /** + * Create exception with given cause + * @param cause - cause of exception + */ + public DeploymentException(Throwable cause) { + super(cause); } } diff --git a/api/src/main/java/jakarta/enterprise/inject/spi/ObserverMethod.java b/api/src/main/java/jakarta/enterprise/inject/spi/ObserverMethod.java index 5f3e754e..fd812983 100644 --- a/api/src/main/java/jakarta/enterprise/inject/spi/ObserverMethod.java +++ b/api/src/main/java/jakarta/enterprise/inject/spi/ObserverMethod.java @@ -40,7 +40,7 @@ * @param the event type */ public interface ObserverMethod extends Prioritized { - + /** The default observer notification priority */ public static final int DEFAULT_PRIORITY = jakarta.interceptor.Interceptor.Priority.APPLICATION + 500; /** diff --git a/api/src/main/java/jakarta/enterprise/inject/spi/WithAnnotations.java b/api/src/main/java/jakarta/enterprise/inject/spi/WithAnnotations.java index 86211672..7d0ceadb 100644 --- a/api/src/main/java/jakarta/enterprise/inject/spi/WithAnnotations.java +++ b/api/src/main/java/jakarta/enterprise/inject/spi/WithAnnotations.java @@ -44,7 +44,10 @@ @Retention(RUNTIME) @Target(PARAMETER) public @interface WithAnnotations { - + /** + * Event annotation types to observe + * @return Event annotation types to observe + */ Class[] value(); } diff --git a/api/src/main/java/jakarta/enterprise/util/AnnotationLiteral.java b/api/src/main/java/jakarta/enterprise/util/AnnotationLiteral.java index 00ab36ef..4ff7fe80 100644 --- a/api/src/main/java/jakarta/enterprise/util/AnnotationLiteral.java +++ b/api/src/main/java/jakarta/enterprise/util/AnnotationLiteral.java @@ -71,6 +71,9 @@ public abstract class AnnotationLiteral implements Annotat private transient Method[] members; private transient Integer cachedHashCode; + /** + * Default ctor + */ protected AnnotationLiteral() { } diff --git a/api/src/main/java/jakarta/enterprise/util/Nonbinding.java b/api/src/main/java/jakarta/enterprise/util/Nonbinding.java index 9f54c1b4..8ef816d6 100644 --- a/api/src/main/java/jakarta/enterprise/util/Nonbinding.java +++ b/api/src/main/java/jakarta/enterprise/util/Nonbinding.java @@ -56,7 +56,7 @@ * @since 2.0 */ public static final class Literal extends AnnotationLiteral implements Nonbinding { - + /** Default Nonbinding literal */ public static final Literal INSTANCE = new Literal(); private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/enterprise/util/TypeLiteral.java b/api/src/main/java/jakarta/enterprise/util/TypeLiteral.java index 451a6d3f..d5f13bd0 100644 --- a/api/src/main/java/jakarta/enterprise/util/TypeLiteral.java +++ b/api/src/main/java/jakarta/enterprise/util/TypeLiteral.java @@ -52,6 +52,9 @@ public abstract class TypeLiteral implements Serializable { private transient Type actualType; + /** + * Default ctor + */ protected TypeLiteral() { } diff --git a/api/src/main/java/module-info.java b/api/src/main/java/module-info.java index 5154dab2..218571c9 100644 --- a/api/src/main/java/module-info.java +++ b/api/src/main/java/module-info.java @@ -11,6 +11,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/** + * The CDI exported package, dependency information and services + */ module jakarta.cdi { exports jakarta.decorator; exports jakarta.enterprise.context;