Skip to content

Commit

Permalink
Avoid unnecessary imports for @⁠ParameterizedClass in Javadoc
Browse files Browse the repository at this point in the history
This commit also makes the Javadoc references to @⁠ParameterizedClass
and @⁠ParameterizedTest consistent across argument source annotations.
  • Loading branch information
sbrannen committed Mar 2, 2025
1 parent b3f2046 commit 20b0eea
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* annotation in order to provide the arguments.
*
* @since 5.10
* @see org.junit.jupiter.params.ParameterizedClass
* @see org.junit.jupiter.params.ParameterizedTest
* @see org.junit.jupiter.params.provider.ArgumentsSource
* @see org.junit.jupiter.params.provider.Arguments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
/**
* An {@code ArgumentsProvider} is responsible for
* {@linkplain #provideArguments(ParameterDeclarations, ExtensionContext) providing}
* a stream of arguments to be passed to a {@code @ParameterizedClass} or
* {@code @ParameterizedTest}.
* a stream of arguments to be passed to a
* {@link org.junit.jupiter.params.ParameterizedClass @ParameterizedClass} or
* {@link org.junit.jupiter.params.ParameterizedTest @ParameterizedTest}.
*
* <p>An {@code ArgumentsProvider} can be registered via the
* {@link ArgumentsSource @ArgumentsSource} annotation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.lang.annotation.Target;

import org.apiguardian.api.API;
import org.junit.jupiter.params.ParameterizedClass;

/**
* {@code @ArgumentsSource} is a {@linkplain Repeatable repeatable} annotation
Expand All @@ -33,7 +32,7 @@
*
* @since 5.0
* @see org.junit.jupiter.params.provider.ArgumentsProvider
* @see ParameterizedClass
* @see org.junit.jupiter.params.ParameterizedClass
* @see org.junit.jupiter.params.ParameterizedTest
*/
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.TYPE })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
* files from one or more classpath {@link #resources} or {@link #files}.
*
* <p>The CSV records parsed from these resources and files will be provided as
* arguments to the annotated {@code @ParameterizedClass} or
* {@code @ParameterizedTest}. Note that the first record may optionally
* be used to supply CSV headers (see {@link #useHeadersInDisplayName}).
* arguments to the annotated
* {@link org.junit.jupiter.params.ParameterizedClass @ParameterizedClass} or
* {@link org.junit.jupiter.params.ParameterizedTest @ParameterizedTest}. Note
* that the first record may optionally be used to supply CSV headers (see
* {@link #useHeadersInDisplayName}).
*
* <p>Any line beginning with a {@code #} symbol will be interpreted as a comment
* and will be ignored.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.lang.annotation.Target;

import org.apiguardian.api.API;
import org.junit.jupiter.params.ParameterizedClass;
import org.junit.jupiter.params.ParameterizedInvocationConstants;

/**
Expand All @@ -30,7 +29,8 @@
* {@link #textBlock} attribute.
*
* <p>The supplied values will be provided as arguments to the annotated
* {@code @ParameterizedClass} or {@code @ParameterizedTest}.
* {@link org.junit.jupiter.params.ParameterizedClass @ParameterizedClass} or
* {@link org.junit.jupiter.params.ParameterizedTest @ParameterizedTest}.
*
* <p>The column delimiter (which defaults to a comma ({@code ,})) can be customized
* via either {@link #delimiter} or {@link #delimiterString}.
Expand Down Expand Up @@ -64,7 +64,7 @@
* @since 5.0
* @see CsvFileSource
* @see org.junit.jupiter.params.provider.ArgumentsSource
* @see ParameterizedClass
* @see org.junit.jupiter.params.ParameterizedClass
* @see org.junit.jupiter.params.ParameterizedTest
*/
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.TYPE })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import java.lang.annotation.Target;

import org.apiguardian.api.API;
import org.junit.jupiter.params.ParameterizedClass;
import org.junit.jupiter.params.ParameterizedTest;

/**
* {@code @FieldSource} is a {@linkplain Repeatable repeatable}
Expand All @@ -33,8 +31,8 @@
* <p>Each field must be able to supply a <em>stream</em> of <em>arguments</em>,
* and each set of "arguments" within the "stream" will be provided as the physical
* arguments for individual invocations of the annotated
* {@link ParameterizedClass @ParameterizedClass} or
* {@link ParameterizedTest @ParameterizedTest}.
* {@link org.junit.jupiter.params.ParameterizedClass @ParameterizedClass} or
* {@link org.junit.jupiter.params.ParameterizedTest @ParameterizedTest}.
*
* <p>In this context, a "stream" is anything that JUnit can reliably convert to
* a {@link java.util.stream.Stream Stream}; however, the actual concrete field
Expand Down Expand Up @@ -107,15 +105,15 @@
* always be {@code static}.
*
* <p>This behavior and the above examples also apply to parameters of a
* {@link ParameterizedClass @ParameterizedClass}, regardless whether field or
* constructor injection is used.
* {@link org.junit.jupiter.params.ParameterizedClass @ParameterizedClass},
* regardless whether field or constructor injection is used.
*
* @since 5.11
* @see MethodSource
* @see Arguments
* @see ArgumentsSource
* @see ParameterizedClass
* @see ParameterizedTest
* @see org.junit.jupiter.params.ParameterizedClass
* @see org.junit.jupiter.params.ParameterizedTest
* @see org.junit.jupiter.api.TestInstance
*/
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.TYPE })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import java.lang.annotation.Target;

import org.apiguardian.api.API;
import org.junit.jupiter.params.ParameterizedClass;
import org.junit.jupiter.params.ParameterizedTest;

/**
* {@code @MethodSource} is a {@linkplain Repeatable repeatable}
Expand All @@ -33,12 +31,12 @@
* <p>Each factory method must generate a <em>stream</em> of <em>arguments</em>,
* and each set of "arguments" within the "stream" will be provided as the
* physical arguments for individual invocations of the annotated
* {@code ParameterizedClass @ParameterizedClass} or
* {@link ParameterizedTest @ParameterizedTest}. Generally speaking this
* translates to a {@link java.util.stream.Stream Stream} of {@link Arguments}
* (i.e., {@code Stream<Arguments>}); however, the actual concrete return type
* can take on many forms. In this context, a "stream" is anything that JUnit
* can reliably convert into a {@code Stream}, such as
* {@code org.junit.jupiter.params.ParameterizedClass @ParameterizedClass} or
* {@link org.junit.jupiter.params.ParameterizedTest @ParameterizedTest}.
* Generally speaking this translates to a {@link java.util.stream.Stream Stream}
* of {@link Arguments} (i.e., {@code Stream<Arguments>}); however, the actual
* concrete return type can take on many forms. In this context, a "stream" is
* anything that JUnit can reliably convert into a {@code Stream}, such as
* {@link java.util.stream.Stream Stream},
* {@link java.util.stream.DoubleStream DoubleStream},
* {@link java.util.stream.LongStream LongStream},
Expand Down Expand Up @@ -95,8 +93,8 @@
* classes must always be {@code static}.
*
* <p>This behavior and the above examples also apply to parameters of a
* {@link ParameterizedClass @ParameterizedClass}, regardless whether field or
* constructor injection is used.
* {@link org.junit.jupiter.params.ParameterizedClass @ParameterizedClass},
* regardless whether field or constructor injection is used.
*
* <p>Factory methods can declare parameters, which will be provided by registered
* implementations of {@link org.junit.jupiter.api.extension.ParameterResolver}.
Expand All @@ -105,8 +103,8 @@
* @see FieldSource
* @see Arguments
* @see ArgumentsSource
* @see ParameterizedClass
* @see ParameterizedTest
* @see org.junit.jupiter.params.ParameterizedClass
* @see org.junit.jupiter.params.ParameterizedTest
* @see org.junit.jupiter.api.TestInstance
*/
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.TYPE })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.lang.annotation.Target;

import org.apiguardian.api.API;
import org.junit.jupiter.params.ParameterizedClass;

/**
* {@code @ValueSource} is a {@linkplain Repeatable repeatable}
Expand All @@ -37,7 +36,7 @@
*
* @since 5.0
* @see org.junit.jupiter.params.provider.ArgumentsSource
* @see ParameterizedClass
* @see org.junit.jupiter.params.ParameterizedClass
* @see org.junit.jupiter.params.ParameterizedTest
*/
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.TYPE })
Expand Down

0 comments on commit 20b0eea

Please sign in to comment.