All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.robe.quartz.annotation.AnnotationJobProvider Maven / Gradle / Ivy

There is a newer version: 0.5.0.0-1039
Show newest version
package io.robe.quartz.annotation;

import io.robe.quartz.common.JobInfo;
import io.robe.quartz.common.JobProvider;
import io.robe.quartz.job.schedule.QJob;
import org.quartz.Job;

import static com.google.common.base.Preconditions.checkNotNull;

/**
 * A Util class that helps converting annotations to quartz objects.
 */
public class AnnotationJobProvider extends JobProvider {

    @Override
    public JobInfo getJob(Class clazz) {
        QJob jAnn = clazz.getAnnotation(QJob.class);
        checkNotNull(jAnn);
        return new AnnotationJobInfo(jAnn, clazz);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy