Top Fields Constructors Methods
org.junit.jupiter.params

pack-priv abstract Class AbstractParameterizedClassInvocationLifecycleMethodInvoker

extends Object
implements ParameterResolver
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.api.extension.ParameterResolver, org.junit.jupiter.api.extension.TestInstantiationAwareExtension, org.junit.jupiter.api.extension.Extension
Known Direct Subclasses
org.junit.jupiter.params.AfterParameterizedClassInvocationMethodInvoker, org.junit.jupiter.params.BeforeParameterizedClassInvocationMethodInvoker
Static Imports
java.util.Objects.requireNonNull

Since
5.13

Field Summary

Modifier and TypeField and Description
private final EvaluatedArgumentSet
private final ParameterizedClassContext
private final int
private final ArgumentSetLifecycleMethod
private final ResolutionCache

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public TestInstantiationAwareExtension.ExtensionContextScope
getTestInstantiationExtensionContextScope(ExtensionContext rootContext)

Overrides default org.junit.jupiter.api.extension.TestInstantiationAwareExtension.getTestInstantiationExtensionContextScope.

Determine whether this extension should receive a test-method scoped ExtensionContext during the instantiation of test classes or processing of test instances.

protected void
private boolean
public Object
resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)

Implements org.junit.jupiter.api.extension.ParameterResolver.resolveParameter.

Resolve an argument for the Parameter in the supplied ParameterContext for the supplied ExtensionContext.

public boolean
supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext)

Implements org.junit.jupiter.api.extension.ParameterResolver.supportsParameter.

Determine if this resolver supports resolution of an argument for the Parameter in the supplied ParameterContext for the supplied ExtensionContext.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

argumentsback to summary
private final EvaluatedArgumentSet arguments
declarationContextback to summary
private final ParameterizedClassContext declarationContext
invocationIndexback to summary
private final int invocationIndex
lifecycleMethodback to summary
private final ArgumentSetLifecycleMethod lifecycleMethod
resolutionCacheback to summary
private final ResolutionCache resolutionCache

Constructor Detail

AbstractParameterizedClassInvocationLifecycleMethodInvokerback to summary
pack-priv AbstractParameterizedClassInvocationLifecycleMethodInvoker(ParameterizedClassContext declarationContext, EvaluatedArgumentSet arguments, int invocationIndex, ResolutionCache resolutionCache, ArgumentSetLifecycleMethod lifecycleMethod)

Method Detail

getTestInstantiationExtensionContextScopeback to summary
public TestInstantiationAwareExtension.ExtensionContextScope getTestInstantiationExtensionContextScope(ExtensionContext rootContext)

Overrides default org.junit.jupiter.api.extension.TestInstantiationAwareExtension.getTestInstantiationExtensionContextScope.

Doc from org.junit.jupiter.api.extension.TestInstantiationAwareExtension.getTestInstantiationExtensionContextScope.

Determine whether this extension should receive a test-method scoped ExtensionContext during the instantiation of test classes or processing of test instances.

If an extension returns TEST_METHOD from this method, methods defined in the following extension APIs will be called with a test-method scoped ExtensionContext instead of a test-class scoped context. Note, however, that a test-class scoped context will always be supplied if the PER_CLASS test instance lifecycle is used.

When a test-method scoped ExtensionContext is supplied, implementations of the above extension APIs will observe the following differences.

Note

The behavior which is enabled by returning TEST_METHOD from this method will become the default in future versions of JUnit. To ensure forward compatibility, extension authors are therefore advised to opt into this feature, even if they do not require the new functionality.

Annotations
@Override
invokeback to summary
protected void invoke(ExtensionContext context)
isCorrectTestClassback to summary
private boolean isCorrectTestClass(ExtensionContext context)
resolveParameterback to summary
public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) throws ParameterResolutionException

Implements org.junit.jupiter.api.extension.ParameterResolver.resolveParameter.

Doc from org.junit.jupiter.api.extension.ParameterResolver.resolveParameter.

Resolve an argument for the Parameter in the supplied ParameterContext for the supplied ExtensionContext.

This method is only called by the framework if supportsParameter previously returned true for the same ParameterContext and ExtensionContext.

The java.lang.reflect.Method or java.lang.reflect.Constructor in which the parameter is declared can be retrieved via ParameterContext#getDeclaringExecutable().

Annotations
@Override
supportsParameterback to summary
public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext) throws ParameterResolutionException

Implements org.junit.jupiter.api.extension.ParameterResolver.supportsParameter.

Doc from org.junit.jupiter.api.extension.ParameterResolver.supportsParameter.

Determine if this resolver supports resolution of an argument for the Parameter in the supplied ParameterContext for the supplied ExtensionContext.

The java.lang.reflect.Method or java.lang.reflect.Constructor in which the parameter is declared can be retrieved via ParameterContext#getDeclaringExecutable().

Annotations
@Override