class SchedulerLockInterceptor implements MethodInterceptor<Object, Object> {
    private final LockingTaskExecutor lockingTaskExecutor;
    private final MicronautLockConfigurationExtractor micronautLockConfigurationExtractor;

    public SchedulerLockInterceptor(
            LockProvider lockProvider,
            Optional<ConversionService<?>> conversionService,
            @Value("${shedlock.defaults.lock-at-most-for}") String defaultLockAtMostFor,
            @Value("${shedlock.defaults.lock-at-least-for:PT0S}") String defaultLockAtLeastFor) {
        ConversionService<?> resolvedConversionService = conversionService.orElse(ConversionService.SHARED);

        lockingTaskExecutor = new DefaultLockingTaskExecutor(lockProvider);
        micronautLockConfigurationExtractor = new MicronautLockConfigurationExtractor(
                resolvedConversionService
                        .convert(defaultLockAtMostFor, Duration.class)
                        .orElseThrow(() -> new IllegalArgumentException("Invalid 'defaultLockAtMostFor' value")),
                resolvedConversionService
                        .convert(defaultLockAtLeastFor, Duration.class)
                        .orElseThrow(() -> new IllegalArgumentException("Invalid 'defaultLockAtLeastFor' value")),
                resolvedConversionService);
    }

    @Override
    public Object intercept(MethodInvocationContext<Object, Object> context) {<FILL_FUNCTION_BODY>}
}

        Class<?> returnType = context.getReturnType().getType();
        if (!void.class.equals(returnType) && !Void.class.equals(returnType)) {
            throw new LockingNotSupportedException();
        }

        Optional<LockConfiguration> lockConfiguration =
                micronautLockConfigurationExtractor.getLockConfiguration(context.getExecutableMethod());
        if (lockConfiguration.isPresent()) {
            lockingTaskExecutor.executeWithLock((Runnable) context::proceed, lockConfiguration.get());
            return null;
        } else {
            return context.proceed();
        }
    
<no_super_class>