From 43b3b4c261c9a0cda6454eb09f417e288f1e2f16 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Wed, 16 Nov 2011 04:20:17 +0000 Subject: [PATCH] Polish @Enable* Javadoc --- .../scheduling/annotation/EnableAsync.java | 5 +++-- ...actTransactionManagementConfiguration.java | 4 ++-- .../EnableTransactionManagement.java | 19 ++++++++++--------- .../TransactionManagementConfigurer.java | 4 ++-- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/org.springframework.context/src/main/java/org/springframework/scheduling/annotation/EnableAsync.java b/org.springframework.context/src/main/java/org/springframework/scheduling/annotation/EnableAsync.java index 5a0266e5b67..83930b56355 100644 --- a/org.springframework.context/src/main/java/org/springframework/scheduling/annotation/EnableAsync.java +++ b/org.springframework.context/src/main/java/org/springframework/scheduling/annotation/EnableAsync.java @@ -132,8 +132,9 @@ public @interface EnableAsync { boolean proxyTargetClass() default false; /** - * Indicate how async advice should be applied. - * The default is {@link AdviceMode#PROXY}. + * Indicate how async advice should be applied. The default is + * {@link AdviceMode#PROXY}. + * @see AdviceMode */ AdviceMode mode() default AdviceMode.PROXY; diff --git a/org.springframework.transaction/src/main/java/org/springframework/transaction/annotation/AbstractTransactionManagementConfiguration.java b/org.springframework.transaction/src/main/java/org/springframework/transaction/annotation/AbstractTransactionManagementConfiguration.java index 64020e79f72..9ef8ad23f24 100644 --- a/org.springframework.transaction/src/main/java/org/springframework/transaction/annotation/AbstractTransactionManagementConfiguration.java +++ b/org.springframework.transaction/src/main/java/org/springframework/transaction/annotation/AbstractTransactionManagementConfiguration.java @@ -41,8 +41,8 @@ public abstract class AbstractTransactionManagementConfiguration implements Impo protected PlatformTransactionManager txManager; public void setImportMetadata(AnnotationMetadata importMetadata) { - enableTx = importMetadata.getAnnotationAttributes(EnableTransactionManagement.class.getName(), false); - Assert.notNull(enableTx, + this.enableTx = importMetadata.getAnnotationAttributes(EnableTransactionManagement.class.getName(), false); + Assert.notNull(this.enableTx, "@EnableTransactionManagement is not present on importing class " + importMetadata.getClassName()); } diff --git a/org.springframework.transaction/src/main/java/org/springframework/transaction/annotation/EnableTransactionManagement.java b/org.springframework.transaction/src/main/java/org/springframework/transaction/annotation/EnableTransactionManagement.java index 9ef25b083dc..f17cea51a4a 100644 --- a/org.springframework.transaction/src/main/java/org/springframework/transaction/annotation/EnableTransactionManagement.java +++ b/org.springframework.transaction/src/main/java/org/springframework/transaction/annotation/EnableTransactionManagement.java @@ -71,7 +71,7 @@ import org.springframework.core.Ordered; * } are responsible for registering the necessary Spring * components that power annotation-driven transaction management, such as the * TransactionInterceptor and the proxy- or AspectJ-based advice that weave the - * interceptor into the call stack when {@code JdbcFooRepository}'s {@code @Transacational} + * interceptor into the call stack when {@code JdbcFooRepository}'s {@code @Transactional} * methods are invoked. * *

A minor difference between the two examples lies in the naming of the {@code @@ -123,9 +123,9 @@ import org.springframework.core.Ordered; * {@link AdviceMode#PROXY} (the default), then the other attributes control the behavior * of the proxying. * - *

Note that if the {@linkplain #mode} is set to {@link AdviceMode#ASPECTJ}, then - * the {@link #proxyTargetClass()} attribute is obsolete. Note also that in this case the - * {@code spring-aspects} module JAR must be present on the classpath.

+ *

If the {@linkplain #mode} is set to {@link AdviceMode#ASPECTJ}, then the + * {@link #proxyTargetClass()} attribute is obsolete. Note also that in this case the + * {@code spring-aspects} module JAR must be present on the classpath. * * @author Chris Beams * @since 3.1 @@ -141,9 +141,10 @@ import org.springframework.core.Ordered; public @interface EnableTransactionManagement { /** - * Indicate whether subclass-based (CGLIB) proxies are to be created as opposed - * to standard Java interface-based proxies. The default is {@code false}. - * Applicable only if {@link #mode()} is set to {@link AdviceMode#PROXY}. + * Indicate whether subclass-based (CGLIB) proxies are to be created ({@code true}) as + * opposed to standard Java interface-based proxies ({@code false}). The default is + * {@code false}. Applicable only if {@link #mode()} is set to + * {@link AdviceMode#PROXY}. * *

Note that subclass-based proxies require the {@link Transactional @Transactional} * to be defined on the concrete class. Annotations in interfaces will @@ -152,8 +153,8 @@ public @interface EnableTransactionManagement { boolean proxyTargetClass() default false; /** - * Indicate how transactional advice should be applied. - * The default is {@link AdviceMode.PROXY}. + * Indicate how transactional advice should be applied. The default is + * {@link AdviceMode.PROXY}. * @see AdviceMode */ AdviceMode mode() default AdviceMode.PROXY; diff --git a/org.springframework.transaction/src/main/java/org/springframework/transaction/annotation/TransactionManagementConfigurer.java b/org.springframework.transaction/src/main/java/org/springframework/transaction/annotation/TransactionManagementConfigurer.java index fd95d50886b..4052ee1be17 100644 --- a/org.springframework.transaction/src/main/java/org/springframework/transaction/annotation/TransactionManagementConfigurer.java +++ b/org.springframework.transaction/src/main/java/org/springframework/transaction/annotation/TransactionManagementConfigurer.java @@ -24,10 +24,10 @@ import org.springframework.transaction.PlatformTransactionManager; * or need to specify explicitly the {@link PlatformTransactionManager} bean to be used * for annotation-driven transaction management, as opposed to the default approach of a * by-type lookup. One reason this might be necessary is if there are two - * {@code PlatformTransactionManager} implementations present in the container. + * {@code PlatformTransactionManager} beans present in the container. * *

See @{@link EnableTransactionManagement} for general examples and context; see - * {@link #annotationDrivenTransactionManager()} below for detailed instructions. + * {@link #annotationDrivenTransactionManager()} for detailed instructions. * *

Note that in by-type lookup disambiguation cases, an alternative approach to * implementing this interface is to simply mark one of the offending {@code