@SuppressWarnings("unchecked") private boolean isPersistJobDataAfterExecution(String jobClassName) { boolean persistJobDataAfterExecution = false; try { Class<Job> jobClass = (Class<Job>) loadHelper.getClassLoader().loadClass(jobClassName); persistJobDataAfterExecution = ClassUtils.isAnnotationPresent(jobClass, PersistJobDataAfterExecution.class); } catch (Exception ex) { log.error("could not determine whether class: " + jobClassName + " is PersistJobDataAfterExecution annotated"); } return persistJobDataAfterExecution; }
/** * @return whether the associated Job class carries the {@link PersistJobDataAfterExecution} annotation. */ public boolean isPersistJobDataAfterExecution() { return ClassUtils.isAnnotationPresent(jobClass, PersistJobDataAfterExecution.class); }
@Override public boolean isPersistJobDataAfterExecution() { return owner.getAnnotation(PersistJobDataAfterExecution.class) != null; }
public static boolean isPersistJobDataAfterExecution(Class<?> jobClass) { return getAnnotation(jobClass, PersistJobDataAfterExecution.class) != null; }