/*
 * Copyright 2002-2007 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.web.bind.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotation that binds a method parameter or method return value
 * to a named model attribute, exposed to a web view. Supported
 * for {@link RequestMapping} annotated handler classes.
 *
 * <p>Can be used to expose reference data to a web view
 * (through annotating no-arg accessor methods in a controller class),
 * or to expose command/form objects to a web view (through annotating
 * corresponding parameters of a {@link RequestMapping} annotated
 * handler method).
 *
 * @author Juergen Hoeller
 * @since 2.5
 */
@Target({ElementType.PARAMETER, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ModelAttribute {

	/**
	 * The name of the model attribute to bind to.
	 * <p>The default moddel attribute name is inferred from the
	 * attribute type, based on the non-qualified class name:
	 * e.g. "order" for class "mypackage.Order".
	 */
	String value();

}

@@ -937,19 +937,16 @@
 rn value
-%0A *
  to a na
@@ -948,16 +948,19 @@
  a named
+%0A *
  model a
@@ -1001,19 +1001,16 @@
 upported
-%0A *
  for %7B@l
@@ -1020,32 +1020,35 @@
  RequestMapping%7D
+%0A *
  annotated handl
@@ -1065,15 +1065,16 @@
 .%0A *
+ %3Cp%3E
 %0A * 
-%3Cp%3E
 Can 
@@ -1119,19 +1119,16 @@
 web view
-%0A *
  (throug
@@ -1146,16 +1146,19 @@
 g no-arg
+%0A *
  accesso
@@ -1190,19 +1190,16 @@
  class),
-%0A *
  or to e
@@ -1227,16 +1227,19 @@
 jects to
+%0A *
  a web v
@@ -1261,19 +1261,16 @@
 notating
-%0A *
  corresp
@@ -1291,16 +1291,19 @@
 ers of a
+%0A *
  %7B@link 
@@ -1327,19 +1327,16 @@
 nnotated
-%0A *
  handler
@@ -1401,17 +1401,19 @@
 @Target(
-%7B
+ %7B 
 ElementT
@@ -1445,16 +1445,17 @@
 e.METHOD
+ 
 %7D)%0A@Rete
@@ -1593,16 +1593,21 @@
 %0A%09 * %3Cp%3E
+%0A%09 * 
 The defa
@@ -1613,17 +1613,16 @@
 ault mod
-d
 el attri
@@ -1651,20 +1651,16 @@
 from the
-%0A%09 *
  attribu
@@ -1667,16 +1667,20 @@
 te type,
+%0A%09 *
  based o
@@ -1710,20 +1710,16 @@
 ss name:
-%0A%09 *
  e.g. %22o
@@ -1733,16 +1733,20 @@
 or class
+%0A%09 *
  %22mypack

Corrected typo.