package org.testng.annotations;

import static java.lang.annotation.ElementType.METHOD;

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

/**
 * Mark a method as supplying data for a test method. The data provider name defaults to method
 * name. The annotated method must return an Object[][] where each Object[] can be assigned the
 * parameter list of the test method. The @Test method that wants to receive data from this
 * DataProvider needs to use a dataProvider name equals to the name of this annotation.
 */
@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
@Target({METHOD})
@Documented
public @interface DataProvider {

  /**
   * The name of this DataProvider.
   *
   * @return the value (default empty)
   */
  String name() default "";

  /**
   * Whether this data provider should be run in parallel.
   *
   * @return the value (default false)
   */
  boolean parallel() default false;

  /**
   * Which indices to run from this data provider, default: all.
   *
   * @return the value
   */
  int[] indices() default {};
}

@@ -205,16 +205,19 @@
 %0A/**%0A * 
+%3Cp%3E
 Mark a m
@@ -262,31 +262,46 @@
 hod.
- The data provider
+%3C/p%3E%0A *%0A * %3Cp%3EThe %7B@link #name()
  name
+%7D
  def
@@ -313,70 +313,191 @@
  to 
-method%0A * name. The annotated method must return an Object%5B%5D%5B%5D
+the name of the annotated method.%3C/p%3E%0A *%0A * %3Cp%3EThe annotated method must return any of the following:%3C/p%3E%0A *%0A * %3Cul%3E%0A *   %3Cli%3E%0A *     %7B@code Object%5B%5D%5B%5D%7D or %7B@code Iterator%3CObject%5B%5D%3E%7D,
  whe
@@ -504,24 +504,31 @@
 re each 
+%7B@code 
 Object%5B%5D
  can be 
@@ -523,15 +523,173 @@
 ct%5B%5D
- can be
+%7D is assigned to%0A *     the parameter list of the test method.%0A *   %3C/li%3E%0A *   %3Cli%3E%0A *     %7B@code Object%5B%5D%7D or %7B@code Iterator%3CObject%3E%7D, where each %7B@code Object%7D is
  ass
@@ -698,14 +698,28 @@
 ned 
+to 
 the%0A *
+     single
  par
@@ -717,37 +717,32 @@
 ingle parameter 
-list 
 of the test meth
@@ -748,18 +748,61 @@
 hod.
- The @Test
+%0A *   %3C/li%3E%0A * %3C/ul%3E%0A * %0A * %3Cp%3EThe %7B@link Test @Test%7D
  met
@@ -841,19 +841,23 @@
 rom this
-%0A *
+ %7B@link
  DataPro
@@ -865,14 +865,18 @@
 ider
+%7D
  needs
+%0A *
  to 
@@ -881,16 +881,28 @@
 o use a 
+%7B@link Test#
 dataProv
@@ -905,16 +905,19 @@
 Provider
+()%7D
  name eq
@@ -919,17 +919,16 @@
 me equal
-s
  to the 
@@ -951,16 +951,20 @@
 otation.
+%3C/p%3E
 %0A */%0A@Re

Fix documentation of @DataProvider