1414 * limitations under the License.
1515 */
1616
17- package org .springframework .test .context .junit .jupiter . support ;
17+ package org .springframework .test .context .junit .jupiter ;
1818
1919import java .lang .annotation .Annotation ;
2020import java .lang .reflect .AnnotatedElement ;
3232import org .springframework .core .MethodParameter ;
3333import org .springframework .core .annotation .AnnotatedElementUtils ;
3434
35- import static org .springframework .core .annotation .AnnotatedElementUtils .hasAnnotation ;
36-
3735/**
3836 * Collection of utilities related to autowiring of individual method parameters.
3937 *
4341 * @see #isAutowirable(Parameter)
4442 * @see #resolveDependency(Parameter, Class, ApplicationContext)
4543 */
46- public abstract class ParameterAutowireUtils {
44+ abstract class ParameterAutowireUtils {
4745
4846 private ParameterAutowireUtils () {
4947 /* no-op */
@@ -58,11 +56,11 @@ private ParameterAutowireUtils() {
5856 * {@link Qualifier @Qualifier}, or {@link Value @Value}.
5957 * @see #resolveDependency(Parameter, Class, ApplicationContext)
6058 */
61- public static boolean isAutowirable (Parameter parameter ) {
59+ static boolean isAutowirable (Parameter parameter ) {
6260 return ApplicationContext .class .isAssignableFrom (parameter .getType ())
63- || hasAnnotation (parameter , Autowired .class )
64- || hasAnnotation (parameter , Qualifier .class )
65- || hasAnnotation (parameter , Value .class );
61+ || AnnotatedElementUtils . hasAnnotation (parameter , Autowired .class )
62+ || AnnotatedElementUtils . hasAnnotation (parameter , Qualifier .class )
63+ || AnnotatedElementUtils . hasAnnotation (parameter , Value .class );
6664 }
6765
6866 /**
@@ -91,7 +89,7 @@ public static boolean isAutowirable(Parameter parameter) {
9189 * @see MethodParameterFactory#createSynthesizingMethodParameter(Parameter)
9290 * @see AutowireCapableBeanFactory#resolveDependency(DependencyDescriptor, String)
9391 */
94- public static Object resolveDependency (Parameter parameter , Class <?> containingClass ,
92+ static Object resolveDependency (Parameter parameter , Class <?> containingClass ,
9593 ApplicationContext applicationContext ) {
9694
9795 boolean required = findMergedAnnotation (parameter , Autowired .class ).map (Autowired ::required ).orElse (true );
0 commit comments