class CdiLockConfigurationExtractor {
    private final Duration defaultLockAtMostFor;
    private final Duration defaultLockAtLeastFor;

    CdiLockConfigurationExtractor(Duration defaultLockAtMostFor, Duration defaultLockAtLeastFor) {
        this.defaultLockAtMostFor = requireNonNull(defaultLockAtMostFor);
        this.defaultLockAtLeastFor = requireNonNull(defaultLockAtLeastFor);
    }

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

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

    private String getName(SchedulerLock annotation) {
        return annotation.name();
    }

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

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

    private Duration getValue(String stringValueFromAnnotation, Duration defaultValue, String paramName) {<FILL_FUNCTION_BODY>}

    Optional<SchedulerLock> findAnnotation(Method method) {
        return Optional.ofNullable(method.getAnnotation(SchedulerLock.class));
    }
}

        if (!stringValueFromAnnotation.isEmpty()) {
            return parseDuration(stringValueFromAnnotation);
        } else {
            return defaultValue;
        }
    
<no_super_class>