Replace <code> with {@code} throughout Javadoc

Issue: SPR-10128
This commit is contained in:
Chris Beams
2012-12-18 14:45:36 +01:00
parent 8597ec25ec
commit 9540d2c81b
1503 changed files with 8001 additions and 8060 deletions

View File

@@ -38,7 +38,7 @@ public class ExpectedLookupTemplate extends JndiTemplate {
/**
* Construct a new JndiTemplate that will always return given objects
* for given names. To be populated through <code>addObject</code> calls.
* for given names. To be populated through {@code addObject} calls.
* @see #addObject(String, Object)
*/
public ExpectedLookupTemplate() {

View File

@@ -41,13 +41,13 @@ import org.springframework.util.StringUtils;
* Mainly for test environments, but also usable for standalone applications.
*
* <p>This class is not intended for direct usage by applications, although it
* can be used for example to override JndiTemplate's <code>createInitialContext</code>
* can be used for example to override JndiTemplate's {@code createInitialContext}
* method in unit tests. Typically, SimpleNamingContextBuilder will be used to
* set up a JVM-level JNDI environment.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @see org.springframework.mock.jndi.SimpleNamingContextBuilder
* @see SimpleNamingContextBuilder
* @see org.springframework.jndi.JndiTemplate#createInitialContext
*/
public class SimpleNamingContext implements Context {

View File

@@ -33,7 +33,7 @@ import org.springframework.util.ClassUtils;
* Simple implementation of a JNDI naming context builder.
*
* <p>Mainly targeted at test environments, where each test case can
* configure JNDI appropriately, so that <code>new InitialContext()</code>
* configure JNDI appropriately, so that {@code new InitialContext()}
* will expose the required objects. Also usable for standalone applications,
* e.g. for binding a JDBC DataSource to a well-known JNDI location, to be
* able to use traditional J2EE data access code outside of a J2EE container.
@@ -63,7 +63,7 @@ import org.springframework.util.ClassUtils;
* DataSource ds = new DriverManagerDataSource(...);
* builder.bind("java:comp/env/jdbc/myds", ds);</pre>
*
* Note that you <i>should not</i> call <code>activate()</code> on a builder from
* Note that you <i>should not</i> call {@code activate()} on a builder from
* this factory method, as there will already be an activated one in any case.
*
* <p>An instance of this class is only necessary at setup time.
@@ -74,7 +74,7 @@ import org.springframework.util.ClassUtils;
* @see #emptyActivatedContextBuilder()
* @see #bind(String, Object)
* @see #activate()
* @see org.springframework.mock.jndi.SimpleNamingContext
* @see SimpleNamingContext
* @see org.springframework.jdbc.datasource.SingleConnectionDataSource
* @see org.springframework.jdbc.datasource.DriverManagerDataSource
* @see org.apache.commons.dbcp.BasicDataSource
@@ -92,7 +92,7 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
/**
* Checks if a SimpleNamingContextBuilder is active.
* @return the current SimpleNamingContextBuilder instance,
* or <code>null</code> if none
* or {@code null} if none
*/
public static SimpleNamingContextBuilder getCurrentContextBuilder() {
return activated;
@@ -129,8 +129,8 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
/**
* Register the context builder by registering it with the JNDI NamingManager.
* Note that once this has been done, <code>new InitialContext()</code> will always
* return a context from this factory. Use the <code>emptyActivatedContextBuilder()</code>
* Note that once this has been done, {@code new InitialContext()} will always
* return a context from this factory. Use the {@code emptyActivatedContextBuilder()}
* static method to get an empty context (for example, in test methods).
* @throws IllegalStateException if there's already a naming context builder
* registered with the JNDI NamingManager
@@ -156,7 +156,7 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
* Temporarily deactivate this context builder. It will remain registered with
* the JNDI NamingManager but will delegate to the standard JNDI InitialContextFactory
* (if configured) instead of exposing its own bound objects.
* <p>Call <code>activate()</code> again in order to expose this context builder's own
* <p>Call {@code activate()} again in order to expose this context builder's own
* bound objects again. Such activate/deactivate sequences can be applied any number
* of times (e.g. within a larger integration test suite running in the same VM).
* @see #activate()

View File

@@ -46,7 +46,7 @@ import org.springframework.util.Assert;
* which match named beans in the context. This is autowire by name, rather than
* type. This approach is based on an approach originated by Ara Abrahmian.
* Setter Dependency Injection is the default: set the
* <code>populateProtectedVariables</code> property to <code>true</code> in
* {@code populateProtectedVariables} property to {@code true} in
* the constructor to switch on Field Injection.
* </ul>
*
@@ -113,7 +113,7 @@ public abstract class AbstractDependencyInjectionSpringContextTests extends Abst
/**
* Set whether to populate protected variables of this test case. Default is
* <code>false</code>.
* {@code false}.
*/
public final void setPopulateProtectedVariables(boolean populateFields) {
this.populateProtectedVariables = populateFields;
@@ -148,7 +148,7 @@ public abstract class AbstractDependencyInjectionSpringContextTests extends Abst
/**
* Set whether or not dependency checking should be performed for test
* properties set by Dependency Injection.
* <p>The default is <code>true</code>, meaning that tests cannot be run
* <p>The default is {@code true}, meaning that tests cannot be run
* unless all properties are populated.
*/
public final void setDependencyCheck(final boolean dependencyCheck) {
@@ -167,7 +167,7 @@ public abstract class AbstractDependencyInjectionSpringContextTests extends Abst
* Prepare this test instance, injecting dependencies into its protected
* fields and its bean properties.
* <p>Note: if the {@link ApplicationContext} for this test instance has not
* been configured (e.g., is <code>null</code>), dependency injection
* been configured (e.g., is {@code null}), dependency injection
* will naturally <strong>not</strong> be performed, but an informational
* message will be written to the log.
* @see #injectDependencies()

View File

@@ -92,7 +92,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
}
/**
* This implementation is final. Override <code>onSetUp</code> for custom behavior.
* This implementation is final. Override {@code onSetUp} for custom behavior.
* @see #onSetUp()
*/
protected final void setUp() throws Exception {
@@ -114,7 +114,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
}
/**
* Subclasses can override this method in place of the <code>setUp()</code>
* Subclasses can override this method in place of the {@code setUp()}
* method, which is final in this class.
* <p>The default implementation does nothing.
* @throws Exception simply let any exception propagate
@@ -132,7 +132,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
}
/**
* This implementation is final. Override <code>onTearDown</code> for
* This implementation is final. Override {@code onTearDown} for
* custom behavior.
* @see #onTearDown()
*/
@@ -165,7 +165,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
* context from the given locations.
* <p>If you override {@link #contextKey()}, you will typically have to
* override this method as well, being able to handle the key type that
* <code>contextKey()</code> returns.
* {@code contextKey()} returns.
* @see #getConfigLocations()
*/
protected ConfigurableApplicationContext loadContext(Object key) throws Exception {
@@ -198,7 +198,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
* instance, calls the {@link #prepareApplicationContext} prepareApplicationContext}
* method and the {@link #customizeBeanFactory customizeBeanFactory} method to allow
* for customizing the context and its DefaultListableBeanFactory, populates the
* context from the specified config <code>locations</code> through the configured
* context from the specified config {@code locations} through the configured
* {@link #createBeanDefinitionReader(GenericApplicationContext) BeanDefinitionReader},
* and finally {@link ConfigurableApplicationContext#refresh() refreshes} the context.
* @param locations the config locations (as Spring resource locations,
@@ -321,10 +321,10 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
* from the same package that the concrete test class is defined in. A path
* starting with a slash is treated as fully qualified class path location,
* e.g.: "/org/springframework/whatever/foo.xml".
* <p>The default implementation simply returns <code>null</code>.
* <p>The default implementation simply returns {@code null}.
* @return an array of config locations
* @see #getConfigPath()
* @see java.lang.Class#getResource(String)
* @see Class#getResource(String)
*/
protected String getConfigPath() {
return null;
@@ -332,7 +332,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
/**
* Return the ApplicationContext that this base class manages; may be
* <code>null</code>.
* {@code null}.
*/
public final ConfigurableApplicationContext getApplicationContext() {
// lazy load, in case setUp() has not yet been called.

View File

@@ -106,11 +106,11 @@ public abstract class AbstractSpringContextTests extends ConditionalTestCase {
}
/**
* Determine if the supplied context <code>key</code> is <em>empty</em>.
* <p>By default, <code>null</code> values, empty strings, and zero-length
* Determine if the supplied context {@code key} is <em>empty</em>.
* <p>By default, {@code null} values, empty strings, and zero-length
* arrays are considered <em>empty</em>.
* @param key the context key to check
* @return <code>true</code> if the supplied context key is empty
* @return {@code true} if the supplied context key is empty
*/
protected boolean isContextKeyEmpty(Object key) {
return (key == null) || ((key instanceof String) && !StringUtils.hasText((String) key)) ||
@@ -119,9 +119,9 @@ public abstract class AbstractSpringContextTests extends ConditionalTestCase {
/**
* Obtain an ApplicationContext for the given key, potentially cached.
* @param key the context key; may be <code>null</code>.
* @param key the context key; may be {@code null}.
* @return the corresponding ApplicationContext instance (potentially cached),
* or <code>null</code> if the provided <code>key</code> is <em>empty</em>
* or {@code null} if the provided {@code key} is <em>empty</em>
*/
protected final ConfigurableApplicationContext getContext(Object key) throws Exception {
if (isContextKeyEmpty(key)) {

View File

@@ -103,7 +103,7 @@ public abstract class AbstractTransactionalDataSourceSpringContextTests
/**
* Convenient method to delete all rows from these tables.
* Calling this method will make avoidance of rollback by calling
* <code>setComplete()</code> impossible.
* {@code setComplete()} impossible.
* @see #setComplete
*/
protected void deleteFromTables(String[] names) {

View File

@@ -182,7 +182,7 @@ public abstract class AbstractTransactionalSpringContextTests extends AbstractDe
* <p>Override {@link #onSetUpBeforeTransaction()} and/or
* {@link #onSetUpInTransaction()} to add custom set-up behavior for
* transactional execution. Alternatively, override this method for general
* set-up behavior, calling <code>super.onSetUp()</code> as part of your
* set-up behavior, calling {@code super.onSetUp()} as part of your
* method implementation.
* @throws Exception simply let any exception propagate
* @see #onTearDown()
@@ -241,7 +241,7 @@ public abstract class AbstractTransactionalSpringContextTests extends AbstractDe
* <p>Override {@link #onTearDownInTransaction()} and/or
* {@link #onTearDownAfterTransaction()} to add custom tear-down behavior
* for transactional execution. Alternatively, override this method for
* general tear-down behavior, calling <code>super.onTearDown()</code> as
* general tear-down behavior, calling {@code super.onTearDown()} as
* part of your method implementation.
* <p>Note that {@link #onTearDownInTransaction()} will only be called if a
* transaction is still active at the time of the test shutdown. In
@@ -305,7 +305,7 @@ public abstract class AbstractTransactionalSpringContextTests extends AbstractDe
/**
* Immediately force a commit or rollback of the transaction, according to
* the <code>complete</code> and {@link #isRollback() rollback} flags.
* the {@code complete} and {@link #isRollback() rollback} flags.
* <p>Can be used to explicitly let the transaction end early, for example to
* check whether lazy associations of persistent objects work outside of a
* transaction (that is, have been initialized properly).

View File

@@ -97,7 +97,7 @@ public abstract class AbstractAnnotationAwareTransactionalTests extends
/**
* Constructs a new AbstractAnnotationAwareTransactionalTests instance with
* the specified JUnit <code>name</code> and retrieves the configured (or
* the specified JUnit {@code name} and retrieves the configured (or
* default) {@link ProfileValueSource}.
* @param name the name of the current test
* @see ProfileValueUtils#retrieveProfileValueSource(Class)
@@ -118,10 +118,10 @@ public abstract class AbstractAnnotationAwareTransactionalTests extends
/**
* Search for a unique {@link ProfileValueSource} in the supplied
* {@link ApplicationContext}. If found, the
* <code>profileValueSource</code> for this test will be set to the unique
* {@code profileValueSource} for this test will be set to the unique
* {@link ProfileValueSource}.
* @param applicationContext the ApplicationContext in which to search for
* the ProfileValueSource; may not be <code>null</code>
* the ProfileValueSource; may not be {@code null}
* @deprecated Use {@link ProfileValueSourceConfiguration @ProfileValueSourceConfiguration} instead.
*/
@Deprecated
@@ -189,12 +189,12 @@ public abstract class AbstractAnnotationAwareTransactionalTests extends
}
/**
* Determine if the test for the supplied <code>testMethod</code> should
* Determine if the test for the supplied {@code testMethod} should
* run in the current environment.
* <p>The default implementation is based on
* {@link IfProfileValue @IfProfileValue} semantics.
* @param testMethod the test method
* @return <code>true</code> if the test is <em>disabled</em> in the current environment
* @return {@code true} if the test is <em>disabled</em> in the current environment
* @see ProfileValueUtils#isTestEnabledInThisEnvironment
*/
protected boolean isDisabledInThisEnvironment(Method testMethod) {

View File

@@ -32,9 +32,9 @@ import java.lang.annotation.Target;
* {@link AbstractAnnotationAwareTransactionalTests} is less error-prone than
* calling
* {@link org.springframework.test.AbstractSingleSpringContextTests#setDirty() setDirty()}
* explicitly because the call to <code>setDirty()</code> is guaranteed to
* explicitly because the call to {@code setDirty()} is guaranteed to
* occur, even if the test failed. If only a particular code path in the test
* dirties the context, prefer calling <code>setDirty()</code> explicitly --
* dirties the context, prefer calling {@code setDirty()} explicitly --
* and take care!
* </p>
*

View File

@@ -79,12 +79,12 @@ import java.lang.annotation.Target;
public @interface IfProfileValue {
/**
* The <code>name</code> of the <em>profile value</em> against which to test.
* The {@code name} of the <em>profile value</em> against which to test.
*/
String name();
/**
* A single, permissible <code>value</code> of the <em>profile value</em>
* A single, permissible {@code value} of the <em>profile value</em>
* for the given {@link #name() name}.
* <p>Note: Assigning values to both {@link #value()} and {@link #values()}
* will lead to a configuration conflict.
@@ -92,7 +92,7 @@ public @interface IfProfileValue {
String value() default "";
/**
* A list of all permissible <code>values</code> of the
* A list of all permissible {@code values} of the
* <em>profile value</em> for the given {@link #name() name}.
* <p>Note: Assigning values to both {@link #value()} and {@link #values()}
* will lead to a configuration conflict.

View File

@@ -22,7 +22,7 @@ package org.springframework.test.annotation;
* testing environment.
* </p>
* <p>
* Concrete implementations must provide a <code>public</code> no-args
* Concrete implementations must provide a {@code public} no-args
* constructor.
* </p>
* <p>
@@ -44,7 +44,7 @@ public interface ProfileValueSource {
/**
* Get the <em>profile value</em> indicated by the specified key.
* @param key the name of the <em>profile value</em>
* @return the String value of the <em>profile value</em>, or <code>null</code>
* @return the String value of the <em>profile value</em>, or {@code null}
* if there is no <em>profile value</em> with that key
*/
String get(String key);

View File

@@ -103,15 +103,15 @@ public abstract class ProfileValueUtils {
}
/**
* Determine if the supplied <code>testClass</code> is <em>enabled</em>
* Determine if the supplied {@code testClass} is <em>enabled</em>
* in the current environment, as specified by the
* {@link IfProfileValue @IfProfileValue} annotation at the class level.
* <p>
* Defaults to <code>true</code> if no
* Defaults to {@code true} if no
* {@link IfProfileValue @IfProfileValue} annotation is declared.
*
* @param testClass the test class
* @return <code>true</code> if the test is <em>enabled</em> in the
* @return {@code true} if the test is <em>enabled</em> in the
* current environment
*/
public static boolean isTestEnabledInThisEnvironment(Class<?> testClass) {
@@ -124,17 +124,17 @@ public abstract class ProfileValueUtils {
}
/**
* Determine if the supplied <code>testMethod</code> is <em>enabled</em>
* Determine if the supplied {@code testMethod} is <em>enabled</em>
* in the current environment, as specified by the
* {@link IfProfileValue @IfProfileValue} annotation, which may be declared
* on the test method itself or at the class level.
* <p>
* Defaults to <code>true</code> if no
* Defaults to {@code true} if no
* {@link IfProfileValue @IfProfileValue} annotation is declared.
*
* @param testMethod the test method
* @param testClass the test class
* @return <code>true</code> if the test is <em>enabled</em> in the
* @return {@code true} if the test is <em>enabled</em> in the
* current environment
*/
public static boolean isTestEnabledInThisEnvironment(Method testMethod, Class<?> testClass) {
@@ -150,19 +150,19 @@ public abstract class ProfileValueUtils {
}
/**
* Determine if the supplied <code>testMethod</code> is <em>enabled</em>
* Determine if the supplied {@code testMethod} is <em>enabled</em>
* in the current environment, as specified by the
* {@link IfProfileValue @IfProfileValue} annotation, which may be declared
* on the test method itself or at the class level.
* <p>
* Defaults to <code>true</code> if no
* Defaults to {@code true} if no
* {@link IfProfileValue @IfProfileValue} annotation is declared.
*
* @param profileValueSource the ProfileValueSource to use to determine if
* the test is enabled
* @param testMethod the test method
* @param testClass the test class
* @return <code>true</code> if the test is <em>enabled</em> in the
* @return {@code true} if the test is <em>enabled</em> in the
* current environment
*/
public static boolean isTestEnabledInThisEnvironment(ProfileValueSource profileValueSource, Method testMethod,
@@ -179,14 +179,14 @@ public abstract class ProfileValueUtils {
}
/**
* Determine if the <code>value</code> (or one of the <code>values</code>)
* Determine if the {@code value} (or one of the {@code values})
* in the supplied {@link IfProfileValue @IfProfileValue} annotation is
* <em>enabled</em> in the current environment.
*
* @param profileValueSource the ProfileValueSource to use to determine if
* the test is enabled
* @param ifProfileValue the annotation to introspect
* @return <code>true</code> if the test is <em>enabled</em> in the
* @return {@code true} if the test is <em>enabled</em> in the
* current environment
*/
private static boolean isTestEnabledInThisEnvironment(ProfileValueSource profileValueSource,

View File

@@ -25,7 +25,7 @@ import java.lang.annotation.Target;
/**
* Test annotation to indicate whether or not the transaction for the annotated
* test method should be <em>rolled back</em> after the test method has
* completed. If <code>true</code>, the transaction will be rolled back;
* completed. If {@code true}, the transaction will be rolled back;
* otherwise, the transaction will be committed.
*
* @author Sam Brannen

View File

@@ -33,8 +33,8 @@ public class JdbcTestUtils {
/**
* Read a script from the LineNumberReaded and build a String containing the lines.
* @param lineNumberReader the <code>LineNumberReader</> containing the script to be processed
* @return <code>String</code> containing the script lines
* @param lineNumberReader the {@code LineNumberReader} containing the script to be processed
* @return {@code String} containing the script lines
* @throws IOException
*/
public static String readScript(LineNumberReader lineNumberReader) throws IOException {
@@ -73,7 +73,7 @@ public class JdbcTestUtils {
/**
* Split an SQL script into separate statements delimited with the provided delimiter character. Each
* individual statement will be added to the provided <code>List</code>.
* individual statement will be added to the provided {@code List}.
* @param script the SQL script
* @param delim charecter delimiting each statement - typically a ';' character
* @param statements the List that will contain the individual statements

View File

@@ -121,8 +121,8 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio
/**
* Create an EntityManager that will always automatically enlist itself in current
* transactions, in contrast to an EntityManager returned by
* <code>EntityManagerFactory.createEntityManager()</code>
* (which requires an explicit <code>joinTransaction()</code> call).
* {@code EntityManagerFactory.createEntityManager()}
* (which requires an explicit {@code joinTransaction()} call).
*/
protected EntityManager createContainerManagedEntityManager() {
return ExtendedEntityManagerCreator.createContainerManagedEntityManager(this.entityManagerFactory);

View File

@@ -20,7 +20,7 @@ import org.springframework.instrument.classloading.ResourceOverridingShadowingCl
/**
* Subclass of ShadowingClassLoader that overrides attempts to
* locate <code>orm.xml</code>.
* locate {@code orm.xml}.
*
* <p>This class must <b>not</b> be an inner class of AbstractJpaTests
* to avoid it being loaded until first used.
@@ -33,7 +33,7 @@ import org.springframework.instrument.classloading.ResourceOverridingShadowingCl
class OrmXmlOverridingShadowingClassLoader extends ResourceOverridingShadowingClassLoader {
/**
* Default location of the <code>orm.xml</code> file in the class path:
* Default location of the {@code orm.xml} file in the class path:
* "META-INF/orm.xml"
*/
public static final String DEFAULT_ORM_XML_LOCATION = "META-INF/orm.xml";