private void launch(Object object, Method method, ScheduleDelay annotation) { if (annotation.delayParameterName().isEmpty() && annotation.delay() == 0) { throw new RuntimeException("Delay parameter is not configured"); } Launcher launcher = launcherProvider.get(); launcher.scheduleWithFixedDelay( new LoggedRunnable(object, method), annotation.initialDelayParameterName().isEmpty() ? annotation.initialDelay() : getValue(annotation.initialDelayParameterName()), annotation.delayParameterName().isEmpty() ? annotation.delay() : getValue(annotation.delayParameterName()), annotation.unit()); }