Package org.apache.sling.junit.jupiter.osgi.impl

# Class TypeBasedParameterResolver<T>

java.lang.Object
org.apache.sling.junit.jupiter.osgi.impl.AbstractTypeBasedParameterResolver
org.apache.sling.junit.jupiter.osgi.impl.TypeBasedParameterResolver<T>

Type Parameters:
  `T` - the type to be provided by the parameter resolver

All Implemented Interfaces:
  `org.junit.jupiter.api.extension.Extension`, `org.junit.jupiter.api.extension.ParameterResolver`

public abstract class TypeBasedParameterResolver<T> extends AbstractTypeBasedParameterResolver
Abstract implementation of a `ParameterResolver` that resolves parameters of one given type. Implementations need only implement the abstract method `resolveParameter(ParameterContext, ExtensionContext, Type)`, the supported parameter type is inferred from the classes type-argument `T`.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`TypeBasedParameterResolver()`

## Method Summary

Modifier and Type
Method
Description
`protected abstract T`
`resolveParameter(@NotNull org.junit.jupiter.api.extension.ParameterContext parameterContext, @NotNull org.junit.jupiter.api.extension.ExtensionContext extensionContext, @NotNull Type resolvedParameterType)`
`protected boolean`
`supportsParameter(@NotNull org.junit.jupiter.api.extension.ParameterContext parameterContext, @NotNull org.junit.jupiter.api.extension.ExtensionContext extensionContext, @NotNull Type resolvedParameterType)`

### Methods inherited from class org.apache.sling.junit.jupiter.osgi.impl.AbstractTypeBasedParameterResolver

`resolveParameter, supportsParameter`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### TypeBasedParameterResolver

protected TypeBasedParameterResolver()

## Method Details

### supportsParameter

protected boolean supportsParameter(@NotNull @NotNull org.junit.jupiter.api.extension.ParameterContext parameterContext, @NotNull @NotNull org.junit.jupiter.api.extension.ExtensionContext extensionContext, @NotNull @NotNull Type resolvedParameterType)

Specified by:
  `supportsParameter` in class `AbstractTypeBasedParameterResolver`

### resolveParameter

protected abstract T resolveParameter(@NotNull @NotNull org.junit.jupiter.api.extension.ParameterContext parameterContext, @NotNull @NotNull org.junit.jupiter.api.extension.ExtensionContext extensionContext, @NotNull @NotNull Type resolvedParameterType)

Specified by:
  `resolveParameter` in class `AbstractTypeBasedParameterResolver`