Skip to content

Commit

Permalink
Consistent use of <pre class="code">
Browse files Browse the repository at this point in the history
Issue: SPR-8108
  • Loading branch information
jhoeller committed May 7, 2013
1 parent 1ca943c commit 2a44228
Show file tree
Hide file tree
Showing 59 changed files with 87 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import org.gradle.api.invocation.*
* dependencies (for example Hibernate v3 and v4).
* <p>
* The 'merge' extension should be used to define how projects are merged, for example:
* <pre>
* <pre class="code">
* configure(subprojects) {
* apply plugin: MergePlugin
* }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package org.springframework.beans.factory.aspectj;
*
* The subaspect of this aspect doesn't need to include any AOP constructs.
* For example, here is a subaspect that configures the {@code PricingStrategyClient} objects.
* <pre>
* <pre class="code">
* aspect PricingStrategyDependencyInjectionAspect
* extends GenericInterfaceDrivenDependencyInjectionAspect<PricingStrategyClient> {
* private PricingStrategy pricingStrategy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* Decorator for a standard {@link BeanInfo} object, e.g. as created by
* {@link Introspector#getBeanInfo(Class)}, designed to discover and register static
* and/or non-void returning setter methods. For example:
* <pre>{@code
* <pre class="code">
* public class Bean {
* private Foo foo;
*
Expand All @@ -56,7 +56,7 @@
* this.foo = foo;
* return this;
* }
* }}</pre>
* }</pre>
* The standard JavaBeans {@code Introspector} will discover the {@code getFoo} read
* method, but will bypass the {@code #setFoo(Foo)} write method, because its non-void
* returning signature does not comply with the JavaBeans specification.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* <p>The mapping file should be in the following format, as specified by the
* Java Activation Framework:
*
* <pre>
* <pre class="code">
* # map text/html to .htm and .html files
* text/html html htm HTML HTM</pre>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,12 @@ private static void parseCacheManagerProperty(Element element, BeanDefinition de

/**
* Registers a
* <pre>
* <pre class="code">
* <bean id="cacheAspect" class="org.springframework.cache.aspectj.AnnotationCacheAspect" factory-method="aspectOf">
* <property name="cacheManager" ref="cacheManager"/>
* <property name="keyGenerator" ref="keyGenerator"/>
* </bean>
*
* </pre>
* @param element
* @param parserContext
*/
private void registerCacheAspect(Element element, ParserContext parserContext) {
if (!parserContext.getRegistry().containsBeanDefinition(CACHE_ASPECT_BEAN_NAME)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
*
* <p>Usage example:
*
* <pre>
* <pre class="code">
* GenericApplicationContext ctx = new GenericApplicationContext();
* XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(ctx);
* xmlReader.loadBeanDefinitions(new ClassPathResource("applicationContext.xml"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* <p><b>NOTE:</b> On JBoss 6.0, to avoid the container loading the classes before the
* application actually starts, one needs to add a <tt>WEB-INF/jboss-scanning.xml</tt>
* file to the application archive - with the following content:
* <pre>&lt;scanning xmlns="urn:jboss:scanning:1.0"/&gt;</pre>
* <pre class="code">&lt;scanning xmlns="urn:jboss:scanning:1.0"/&gt;</pre>
*
* <p>Thanks to Ales Justin and Marius Bogoevici for the initial prototype.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
* <p>Example:
*
* <pre>
* <pre class="code">
* &lt;bean id="queueConnectionFactoryTarget" class="org.springframework.jndi.JndiObjectTargetSource"&gt;
* &lt;property name="jndiName" value="JmsQueueConnectionFactory"/&gt;
* &lt;property name="lookupOnStartup" value="false"/&gt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public int hashCode() {
* Returns the textual representation of this handle. The textual
* representation is:
*
* <pre>
* <pre class="code">
* owner '.' name desc ' ' '(' tag ')'
* </pre>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public void visitLabel(Label label) {
* constant types, implementations of this method should check for
* unexpected constant types, like this:
*
* <pre>
* <pre class="code">
* if (cst instanceof Integer) {
* // ...
* } else if (cst instanceof Float) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static Class<?> resolveReturnType(Method method, Class<?> clazz) {
* method for {@code creatProxy()} and an {@code Object[]} array containing
* {@code MyService.class}, {@code resolveReturnTypeForGenericMethod()} will
* infer that the target return type is {@code MyService}.
* <pre>{@code public static <T> T createProxy(Class<T> clazz)}</pre>
* <pre class="code">{@code public static <T> T createProxy(Class<T> clazz)}</pre>
* <h4>Possible Return Values</h4>
* <ul>
* <li>the target return type, if it can be inferred</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public interface Environment extends PropertyResolver {
* explicit active profiles, whether one or more of the given profiles is included in
* the set of default profiles. If a profile begins with '!' the logic is inverted,
* i.e. the method will return true if the given profile is <em>not</em> active. For
* example, <pre>env.acceptsProfiles("p1", "!p2")</pre> will return true if profile
* example, <pre class="code">env.acceptsProfiles("p1", "!p2")</pre> will return true if profile
* 'p1' is active or 'p2' is not active.
* @throws IllegalArgumentException if called with zero arguments
* @throws IllegalArgumentException if any profile is null, empty or whitespace-only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
* <p><b>Ant-style Patterns:</b>
*
* <p>When the path location contains an Ant-style pattern, e.g.:
* <pre>
* <pre class="code">
* /WEB-INF/*-context.xml
* com/mycompany/**&#47;applicationContext.xml
* file:C:/some/path/*-context.xml
Expand Down Expand Up @@ -143,9 +143,9 @@
*
* <p><b>WARNING:</b> Ant-style patterns with "classpath:" resources are not
* guaranteed to find matching resources if the root package to search is available
* in multiple class path locations. This is because a resource such as<pre>
* in multiple class path locations. This is because a resource such as<pre class="code">
* com/mycompany/package1/service-context.xml
* </pre>may be in only one location, but when a path such as<pre>
* </pre>may be in only one location, but when a path such as<pre class="code">
* classpath:com/mycompany/**&#47;service-context.xml
* </pre>is used to try to resolve it, the resolver will work off the (first) URL
* returned by {@code getResource("com/mycompany");}. If this base package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static boolean isEmpty(Object str) {
/**
* Check that the given CharSequence is neither {@code null} nor of length 0.
* Note: Will return {@code true} for a CharSequence that purely consists of whitespace.
* <p><pre>
* <p><pre class="code">
* StringUtils.hasLength(null) = false
* StringUtils.hasLength("") = false
* StringUtils.hasLength(" ") = true
Expand Down Expand Up @@ -116,7 +116,7 @@ public static boolean hasLength(String str) {
* Check whether the given CharSequence has actual text.
* More specifically, returns {@code true} if the string not {@code null},
* its length is greater than 0, and it contains at least one non-whitespace character.
* <p><pre>
* <p><pre class="code">
* StringUtils.hasText(null) = false
* StringUtils.hasText("") = false
* StringUtils.hasText(" ") = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface ExpressionParser {
/**
* Parse the expression string and return an Expression object you can use for repeated evaluation.
* <p>Some examples:
* <pre>
* <pre class="code">
* 3 + 4
* name.firstName
* </pre>
Expand All @@ -42,7 +42,7 @@ public interface ExpressionParser {
/**
* Parse the expression string and return an Expression object you can use for repeated evaluation.
* <p>Some examples:
* <pre>
* <pre class="code">
* 3 + 4
* name.firstName
* </pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface ParserContext {
* Whether or not the expression being parsed is a template. A template expression consists of literal text that can
* be mixed with evaluatable blocks. Some examples:
*
* <pre>
* <pre class="code">
* Some literal text
* Hello #{name.firstName}!
* #{3 + 4}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* <p>
* When a message is formatted, it will have this kind of form
*
* <pre>
* <pre class="code">
* EL1004E: (pos 34): Type cannot be found 'String'
* </pre>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* A builder that provides a convenient API for constructing an embedded database.
*
* <p>Usage example:
* <pre>
* <pre class="code">
* EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
* EmbeddedDatabase db = builder.setType(H2).addScript("schema.sql").addScript("data.sql").build();
* db.shutdown();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* DataSources are defined as individual Spring beans with names
* "myRepeatableReadDataSource", "mySerializableDataSource" and "myDefaultDataSource":
*
* <pre>
* <pre class="code">
* &lt;bean id="dataSourceRouter" class="org.springframework.jdbc.datasource.lookup.IsolationLevelDataSourceRouter"&gt;
* &lt;property name="targetDataSources"&gt;
* &lt;map&gt;
Expand All @@ -57,7 +57,7 @@
* names for a standard JNDI lookup. This allows for a single concise definition
* without the need for separate DataSource bean definitions.
*
* <pre>
* <pre class="code">
* &lt;bean id="dataSourceRouter" class="org.springframework.jdbc.datasource.lookup.IsolationLevelDataSourceRouter"&gt;
* &lt;property name="targetDataSources"&gt;
* &lt;map&gt;
Expand All @@ -74,7 +74,7 @@
* (By default, JtaTransactionManager will only accept a default isolation level
* because of the lack of isolation level support in standard JTA itself.)
*
* <pre>
* <pre class="code">
* &lt;bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"&gt;
* &lt;property name="allowCustomIsolationLevels" value="true"/&gt;
* &lt;/bean&gt;</pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* definition, as the list element for the "filterDefinitions" bean property.
* For example:
*
* <pre>
* <pre class="code">
* &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
* ...
* &lt;property name="filterDefinitions"&gt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* Hibernate's own {@code SessionFactory.getCurrentSession()} method, to be
* able to detect a thread-bound Session. Typically, the code will look like as follows:
*
* <pre>
* <pre class="code">
* public void doSomeDataAccessAction() {
* Session session = this.sessionFactory.getCurrentSession();
* ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ public void setFilterDefinitions(FilterDefinition[] filterDefinitions) {
* This configuration setting corresponds to the &lt;class-cache&gt; entry
* in the "hibernate.cfg.xml" configuration format.
* <p>For example:
* <pre>
* <pre class="code">
* &lt;property name="entityCacheStrategies"&gt;
* &lt;props&gt;
* &lt;prop key="com.mycompany.Customer"&gt;read-write&lt;/prop&gt;
Expand All @@ -465,7 +465,7 @@ public void setEntityCacheStrategies(Properties entityCacheStrategies) {
* This configuration setting corresponds to the &lt;collection-cache&gt; entry
* in the "hibernate.cfg.xml" configuration format.
* <p>For example:
* <pre>
* <pre class="code">
* &lt;property name="collectionCacheStrategies"&gt;
* &lt;props&gt;
* &lt;prop key="com.mycompany.Order.items">read-write&lt;/prop&gt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* definition, as list element for the "typeDefinitions" bean property.
* For example:
*
* <pre>
* <pre class="code">
* &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
* ...
* &lt;property name="typeDefinitions"&gt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* <p>Usage example:
*
* <pre>
* <pre class="code">
* &lt;bean id=&quot;sessionFactory&quot; class=&quot;org.springframework.orm.hibernate3.LocalSessionFactoryBean&quot;&gt;
* ...
* &lt;property name=&quot;entityInterceptor&quot;&gt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
*
* <p>For example, in case of <a href="http://www.jpox.org">JPOX</a>:
*
* <p><pre>
* <p><pre class="code">
* &lt;bean id="persistenceManagerFactory" class="org.jpox.PersistenceManagerFactoryImpl" destroy-method="close"&gt;
* &lt;property name="connectionFactory" ref="dataSource"/&gt;
* &lt;property name="nontransactionalRead" value="true"/&gt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* actual running server.
*
* <p>Below is an example:
* <pre>
* <pre class="code">
* RestTemplate restTemplate = new RestTemplate()
* MockRestServiceServer mockServer = MockRestServiceServer.createServer(restTemplate);
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*
* <p>Below is an example:
*
* <pre>
* <pre class="code">
* static imports:
* MockMvcBuilders.*, MockMvcRequestBuilders.*, MockMvcResultMatchers.*
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public interface ResultActions {

/**
* Provide an expectation. For example:
* <pre>
* <pre class="code">
* static imports: MockMvcRequestBuilders.*, MockMvcResultMatchers.*
*
* mockMvc.perform(get("/person/1"))
Expand All @@ -52,7 +52,7 @@ public interface ResultActions {

/**
* Provide a general action. For example:
* <pre>
* <pre class="code">
* static imports: MockMvcRequestBuilders.*, MockMvcResultMatchers.*
*
* mockMvc.perform(get("/form")).andDo(print());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* <p>Example:
*
* <pre>
* <pre class="code">
* static imports: MockMvcRequestBuilders.*, MockMvcResultHandlers.*
*
* mockMvc.perform(get("/form")).andDo(print());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* <p>Example:
*
* <pre>
* <pre class="code">
* static imports: MockMvcRequestBuilders.*, MockMvcResultMatchers.*
*
* mockMvc.perform(get("/form"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ public static MockMultipartHttpServletRequestBuilder fileUpload(String urlTempla
* {@link MvcResult} of the request that started async processing.
*
* <p>Usage involves performing one request first that starts async processing:
* <pre>
* <pre class="code">
* MvcResult mvcResult = this.mockMvc.perform(get("/1"))
* .andExpect(request().asyncStarted())
* .andReturn();
* </pre>
*
* <p>And then performing the async dispatch re-using the {@code MvcResult}:
* <pre>
* <pre class="code">
* this.mockMvc.perform(asyncDispatch(mvcResult))
* .andExpect(status().isOk())
* .andExpect(content().contentType(MediaType.APPLICATION_JSON))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void match(MvcResult result) {

/**
* Assert the response body content with a Hamcrest {@link Matcher}.
* <pre>
* <pre class="code">
* mockMvc.perform(get("/path"))
* .andExpect(content(containsString("text")));
* </pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* agnostic of the actual testing framework in use.
*
* @author Sam Brannen
* @author Juergen Hoeller
* @author Juergen Hoellereasymock
* @since 2.5
*/
public class TestContext extends AttributeAccessorSupport {
Expand Down
Loading

0 comments on commit 2a44228

Please sign in to comment.