class MicronautLockConfigurationExtractor {
    private final Duration defaultLockAtMostFor;
    private final Duration defaultLockAtLeastFor;
    private final ConversionService conversionService;

    MicronautLockConfigurationExtractor(
            Duration defaultLockAtMostFor, Duration defaultLockAtLeastFor, ConversionService conversionService) {
        this.defaultLockAtMostFor = requireNonNull(defaultLockAtMostFor);
        this.defaultLockAtLeastFor = requireNonNull(defaultLockAtLeastFor);
        this.conversionService = conversionService;
    }

    Optional<LockConfiguration> getLockConfiguration(ExecutableMethod<Object, Object> method) {
        Optional<AnnotationValue<SchedulerLock>> annotation = findAnnotation(method);
        return annotation.map(this::getLockConfiguration);
    }

    private LockConfiguration getLockConfiguration(AnnotationValue<SchedulerLock> annotation) {
        return new LockConfiguration(
                ClockProvider.now(), getName(annotation), getLockAtMostFor(annotation), getLockAtLeastFor(annotation));
    }

    private String getName(AnnotationValue<SchedulerLock> annotation) {
        return annotation.getRequiredValue("name", String.class);
    }

    Duration getLockAtMostFor(AnnotationValue<SchedulerLock> annotation) {
        return getValue(annotation, this.defaultLockAtMostFor, "lockAtMostFor");
    }

    Duration getLockAtLeastFor(AnnotationValue<SchedulerLock> annotation) {
        return getValue(annotation, this.defaultLockAtLeastFor, "lockAtLeastFor");
    }

    private Duration getValue(AnnotationValue<SchedulerLock> annotation, Duration defaultValue, String paramName) {<FILL_FUNCTION_BODY>}

    Optional<AnnotationValue<SchedulerLock>> findAnnotation(ExecutableMethod<Object, Object> method) {
        return method.findAnnotation(SchedulerLock.class);
    }
}

        String stringValueFromAnnotation =
                annotation.get(paramName, String.class).orElse("");
        if (StringUtils.hasText(stringValueFromAnnotation)) {
            return conversionService
                    .convert(stringValueFromAnnotation, Duration.class)
                    .orElseThrow(() -> new IllegalArgumentException("Invalid " + paramName + " value \""
                            + stringValueFromAnnotation + "\" - cannot parse into duration"));
        } else {
            return defaultValue;
        }
    
<no_super_class>