From 7a8a9c71b6de278f0f8f374f71bf7c648557f83e Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 7 Dec 2015 12:51:44 +0100 Subject: [PATCH] Javadoc fixes Issue: SPR-13763 --- .../context/event/EventListener.java | 47 ++++++++++--------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/context/event/EventListener.java b/spring-context/src/main/java/org/springframework/context/event/EventListener.java index 5f86890079..9f4fefb4c5 100644 --- a/spring-context/src/main/java/org/springframework/context/event/EventListener.java +++ b/spring-context/src/main/java/org/springframework/context/event/EventListener.java @@ -30,31 +30,34 @@ import org.springframework.core.annotation.AliasFor; * *

If an annotated method supports a single event type, the method may * declare a single parameter that reflects the event type to listen to. - * If an annotated method supports multiple event types, this annotation may - * refer to one or more supported event types using the {@code classes} - * attribute. See {@link #classes} for further details. + * If an annotated method supports multiple event types, this annotation + * may refer to one or more supported event types using the {@code classes} + * attribute. See the {@link #classes} javadoc for further details. * *

Events can be {@link ApplicationEvent} instances as well as arbitrary * objects. * - *

Processing of {@code @EventListener} annotations is performed via the - * {@link EventListenerMethodProcessor} which is registered automatically - * when using Java config or manually via the {@code } + *

Processing of {@code @EventListener} annotations is performed via + * the internal {@link EventListenerMethodProcessor} bean which gets + * registered automatically when using Java config or manually via the + * {@code } or {@code } * element when using XML config. * - *

Annotated methods may have a non-{@code void} return type. When they do, - * the result of the method invocation is sent as a new event. If the return type - * is either an array or a collection, each element is sent as a new event. + *

Annotated methods may have a non-{@code void} return type. When they + * do, the result of the method invocation is sent as a new event. If the + * return type is either an array or a collection, each element is sent + * as a new individual event. * - *

It is also possible to define the order in which listeners for a certain - * event are invoked. To do so, add Spring's common + *

It is also possible to define the order in which listeners for a + * certain event are to be invoked. To do so, add Spring's common * {@link org.springframework.core.annotation.Order @Order} annotation - * alongside this annotation. + * alongside this event listener annotation. * - *

While it is possible for an event listener to declare that it throws arbitrary - * exception types, any checked exceptions thrown from an event listener will be - * wrapped in an {@link java.lang.reflect.UndeclaredThrowableException} since - * the caller can only handle runtime exceptions. + *

While it is possible for an event listener to declare that it + * throws arbitrary exception types, any checked exceptions thrown + * from an event listener will be wrapped in an + * {@link java.lang.reflect.UndeclaredThrowableException} + * since the event publisher can only handle runtime exceptions. * * @author Stephane Nicoll * @since 4.2 @@ -73,17 +76,17 @@ public @interface EventListener { /** * The event classes that this listener handles. - *

If this attribute is specified with a single value, the annotated - * method may optionally accept a single parameter. However, if this - * attribute is specified with multiple values, the annotated method - * must not declare any parameters. + *

If this attribute is specified with a single value, the + * annotated method may optionally accept a single parameter. + * However, if this attribute is specified with multiple values, + * the annotated method must not declare any parameters. */ @AliasFor("value") Class[] classes() default {}; /** - * Spring Expression Language (SpEL) attribute used for making the event - * handling conditional. + * Spring Expression Language (SpEL) attribute used for making the + * event handling conditional. *

Default is "", meaning the event is always handled. */ String condition() default "";