public boolean supportsParameter()

in winegrower-extension/winegrower-testing/winegrower-testing-junit5/src/main/java/org/apache/winegrower/extension/testing/junit5/internal/BaseInjection.java [37:54]


    public boolean supportsParameter(final ParameterContext parameterContext, final ExtensionContext context)
            throws ParameterResolutionException {
        try { // first check if the parameter is handled by another extension
            if (org.apache.winegrower.extension.testing.junit5.internal.engine.CaptureExtensionRegistry
                    .get(ParameterResolver.class, context)
                    .anyMatch(it -> it != BaseInjection.this && it.supportsParameter(parameterContext, context))) {
                return false;
            }
        } catch (final Exception | Error e) {
            // ignore, the engine is not the expected one, fallback on default behavior
        }

        // if not handled assume it is a service we know
        final Parameter parameter = parameterContext.getParameter();
        final Class<?> type = parameter.getType();
        return !parameter.isAnnotationPresent(NotAnOSGiService.class) &&
                (type == Ripener.class || type == OSGiServices.class || store(context).get(Ripener.class, Ripener.class).getServices().findService(type).isPresent());
    }