diff --git a/spring-framework-reference/src/beans.xml b/spring-framework-reference/src/beans.xml index 5d553f118c..f219deddde 100644 --- a/spring-framework-reference/src/beans.xml +++ b/spring-framework-reference/src/beans.xml @@ -370,11 +370,11 @@ PetStoreServiceImpl service = context.getBean("petStore", PetStoreServiceImpl.cl List userList service.getUsernameList(); - You use getBean to retrieve instances of + You use getBean() to retrieve instances of your beans. The ApplicationContext interface has a few other methods for retrieving beans, but ideally your application code should never use them. Indeed, your application code - should have no calls to the getBean method at + should have no calls to the getBean() method at all, and thus no dependency on Spring APIs at all. For example, Spring's integration with web frameworks provides for dependency injection for various web framework classes such as controllers and JSF-managed @@ -512,7 +512,7 @@ List userList service.getUsernameList(); ApplicationContext implementations also permit the registration of existing objects that are created outside the container, by users. This is done by accessing the ApplicationContext's - BeanFactory via the method getBeanFactory which + BeanFactory via the method getBeanFactory() which returns the BeanFactory implementation DefaultListableBeanFactory. DefaultListableBeanFactory supports this @@ -4408,7 +4408,7 @@ dataSource.url=jdbc:mysql:mydb FactoryBean instance itself, not the bean it produces, you preface the bean id with the ampersand symbol & (without quotes) when calling the - getBean method of the + getBean() method of the ApplicationContext. So for a given FactoryBean with an id of myBean, invoking getBean("myBean") @@ -5525,9 +5525,9 @@ public class FactoryMethodComponent { } This class is a Spring component that has application-specific - code contained in its doWork method. However, + code contained in its doWork() method. However, it also contributes a bean definition that has a factory method - referring to the method publicInstance. The + referring to the method publicInstance(). The @Bean annotation identifies the factory method and other bean definition properties, such as a qualifier value through the @Qualifier annotation. Other method level diff --git a/spring-framework-reference/src/classic-spring.xml b/spring-framework-reference/src/classic-spring.xml index feb7913f3a..f82b02df74 100644 --- a/spring-framework-reference/src/classic-spring.xml +++ b/spring-framework-reference/src/classic-spring.xml @@ -431,8 +431,8 @@ ConnectionFactory interface, SingleConnectionFactory102, based on the JMS 1.0.2 API that will return the same Connection on - all createConnection calls and ignore calls to - close. You will need to set the boolean + all createConnection() calls and ignore calls to + close(). You will need to set the boolean property pubSubDomain to indicate which messaging domain is used as SingleConnectionFactory102 will always explicitly differentiate between a diff --git a/spring-framework-reference/src/dao.xml b/spring-framework-reference/src/dao.xml index ccf99a2018..c8eec31071 100644 --- a/spring-framework-reference/src/dao.xml +++ b/spring-framework-reference/src/dao.xml @@ -45,7 +45,7 @@ JDOExceptions itself, preferably via delegating to SessionFactoryUtils' convertHibernateAccessException(..) or - convertJdoAccessException methods respectively. + convertJdoAccessException() methods respectively. These methods convert the exceptions to ones that are compatible with the exceptions in the org.springframework.dao exception hierarchy. As JDOExceptions are unchecked, they can diff --git a/spring-framework-reference/src/expressions.xml b/spring-framework-reference/src/expressions.xml index 299c3f51f1..20ff8f1d58 100644 --- a/spring-framework-reference/src/expressions.xml +++ b/spring-framework-reference/src/expressions.xml @@ -290,11 +290,11 @@ boolean result = exp.getValue(context, Boolean.class); // evaluates to trueThe StandardEvaluationContext is where you may specify the root object to evaluate against via the method - setRootObject or passing the root object into + setRootObject() or passing the root object into the constructor. You can also specify variables and functions that will be used in the expression using the methods - setVariable and - registerFunction. The use of variables and + setVariable() and + registerFunction(). The use of variables and functions are described in the language reference sections Variables and Functions. The diff --git a/spring-framework-reference/src/jdbc.xml b/spring-framework-reference/src/jdbc.xml index 8c77cbbabb..ea03224744 100644 --- a/spring-framework-reference/src/jdbc.xml +++ b/spring-framework-reference/src/jdbc.xml @@ -1036,7 +1036,7 @@ public class ExecuteAnUpdate {
Retrieving auto-generated keys - An update convenience method supports the retrieval of primary keys generated by the database. This support is part of the JDBC 3.0 standard; see Chapter 13.6 of the specification for details. The method takes a diff --git a/spring-framework-reference/src/jms.xml b/spring-framework-reference/src/jms.xml index 83d60dcc22..e986fdb322 100644 --- a/spring-framework-reference/src/jms.xml +++ b/spring-framework-reference/src/jms.xml @@ -160,8 +160,8 @@ ConnectionFactory interface, SingleConnectionFactory, that will return the same Connection on all - createConnection calls and ignore calls to - close. This is useful for testing and + createConnection() calls and ignore calls to + close(). This is useful for testing and standalone environments so that the same connection can be used for multiple JmsTemplate calls that may span any number of transactions. SingleConnectionFactory @@ -284,7 +284,7 @@ This message listener container is the simpler of the two standard flavors. It creates a fixed number of JMS sessions and consumers at startup, registers the listener using the standard JMS - MessageConsumer.setMessageListener method, + MessageConsumer.setMessageListener() method, and leaves it up the JMS provider to perform listener callbacks. This variant does not allow for dynamic adaption to runtime demands or for participation in externally managed transactions. Compatibility-wise, @@ -425,8 +425,8 @@ public class JmsQueueSender { In order to facilitate the sending of domain model objects, the JmsTemplate has various send methods that take a Java object as an argument for a message's data content. The overloaded - methods convertAndSend and - receiveAndConvert in + methods convertAndSend() and + receiveAndConvert() in JmsTemplate delegate the conversion process to an instance of the MessageConverter interface. This interface defines a simple contract to convert between Java objects and diff --git a/spring-framework-reference/src/oxm.xml b/spring-framework-reference/src/oxm.xml index 1e28576671..7a33b99097 100644 --- a/spring-framework-reference/src/oxm.xml +++ b/spring-framework-reference/src/oxm.xml @@ -104,7 +104,7 @@ public interface Marshaller { - Although the marshal method accepts a plain object as its first + Although the marshal() method accepts a plain object as its first parameter, most Marshaller implementations cannot handle arbitrary objects. Instead, an object class must be mapped in a mapping file, marked with an annotation, registered with the marshaller, or have a common base class. Refer to the further sections @@ -218,9 +218,9 @@ public class Settings { The application class uses this bean to store its settings. Besides a main method, the class has two - methods: saveSettings saves the settings bean to a file named - settings.xml, and loadSettings loads these settings again. A - main method constructs a Spring application context, and calls these two methods. + methods: saveSettings() saves the settings bean to a file named + settings.xml, and loadSettings() loads these settings again. A + main() method constructs a Spring application context, and calls these two methods. The names of RestTemplate methods follow a naming convention, the first part indicates what HTTP method is being invoked and the second part indicates what is returned. For example, the - method getForObject will perform a GET, convert + method getForObject() will perform a GET, convert the HTTP response into an object type of your choice and return that - object. The method postForLocation will do a + object. The method postForLocation() will do a POST, converting the given object into a HTTP request and return the response HTTP Location header where the newly created object can be found. In case of an exception processing the HTTP request, an exception @@ -1414,13 +1414,13 @@ if (HttpStatus.SC_CREATED == post.getStatusCode()) { HttpMessageConverter instances. Converters for the main mime types are registered by default, but you can also write your own converter and register it via the - messageConverters bean property. The default + messageConverters() bean property. The default converter instances registered with the template are ByteArrayHttpMessageConverter, StringHttpMessageConverter, FormHttpMessageConverter and SourceHttpMessageConverter. You can override - these defaults using the messageConverters bean + these defaults using the messageConverters() bean property as would be required if using the MarshallingHttpMessageConverter or MappingJacksonHttpMessageConverter. @@ -1499,11 +1499,11 @@ URI location = template.postForLocation(uri, booking, "1"); Dealing with request and response headers Besides the methods described above, the RestTemplate - also has the exchange method, which can be + also has the exchange() method, which can be used for arbitrary HTTP method execution based on the HttpEntity class. - Perhaps most importantly, the exchange + Perhaps most importantly, the exchange() method can be used to add request headers and read response headers. For example: @@ -1527,9 +1527,9 @@ String body = response.getBody(); HTTP Message Conversion Objects passed to and returned from the methods - getForObject, - postForLocation, and - put are converted to HTTP requests and from + getForObject(), + postForLocation(), and + put() are converted to HTTP requests and from HTTP responses by HttpMessageConverters. The HttpMessageConverter interface is shown below to give you a better feel for its functionality diff --git a/spring-framework-reference/src/validation.xml b/spring-framework-reference/src/validation.xml index 8f7847b709..af7ed57185 100644 --- a/spring-framework-reference/src/validation.xml +++ b/spring-framework-reference/src/validation.xml @@ -1192,9 +1192,9 @@ public interface Parser { To create your own Formatter, simply implement the Formatter interface above. Parameterize T to be the type of object you wish to format, for example, java.util.Date. Implement - the print operation to print an instance of T + the print() operation to print an instance of T for display in the client locale. Implement the - parse operation to parse an instance of T from + parse() operation to parse an instance of T from the formatted representation returned from the client locale. Your Formatter should throw a ParseException or IllegalArgumentException if a parse attempt fails. Take care to ensure your Formatter implementation @@ -1273,10 +1273,10 @@ public interface AnnotationFormatterFactory { Parameterize A to be the field annotationType you wish to associate formatting logic with, for example org.springframework.format.annotation.DateTimeFormat. Have - getFieldTypes return the types of fields the - annotation may be used on. Have getPrinter + getFieldTypes() return the types of fields the + annotation may be used on. Have getPrinter() return a Printer to print the value of an annotated field. Have - getParser return a Parser to parse a + getParser() return a Parser to parse a clientValue for an annotated field. The example AnnotationFormatterFactory implementation below binds