增加任务组的注解事件

This commit is contained in:
AriaLyy
2017-07-10 17:26:54 +08:00
parent 2f94560c9b
commit c948aa7555
18 changed files with 731 additions and 238 deletions

View File

@@ -42,6 +42,7 @@ import javax.lang.model.element.TypeElement;
@Override public Set<String> getSupportedAnnotationTypes() {
Set<String> annotataions = new LinkedHashSet<>();
//单任务下载的注解
annotataions.add(Download.onPre.class.getCanonicalName());
annotataions.add(Download.onNoSupportBreakPoint.class.getCanonicalName());
annotataions.add(Download.onTaskCancel.class.getCanonicalName());
@@ -52,6 +53,18 @@ import javax.lang.model.element.TypeElement;
annotataions.add(Download.onTaskRunning.class.getCanonicalName());
annotataions.add(Download.onTaskStart.class.getCanonicalName());
annotataions.add(Download.onTaskStop.class.getCanonicalName());
//下载任务的注解
annotataions.add(Download.onPre.class.getCanonicalName());
annotataions.add(Download.onNoSupportBreakPoint.class.getCanonicalName());
annotataions.add(Download.onTaskCancel.class.getCanonicalName());
annotataions.add(Download.onTaskComplete.class.getCanonicalName());
annotataions.add(Download.onTaskFail.class.getCanonicalName());
annotataions.add(Download.onTaskPre.class.getCanonicalName());
annotataions.add(Download.onTaskResume.class.getCanonicalName());
annotataions.add(Download.onTaskRunning.class.getCanonicalName());
annotataions.add(Download.onTaskStart.class.getCanonicalName());
annotataions.add(Download.onTaskStop.class.getCanonicalName());
//上传任务的注解
annotataions.add(Upload.onPre.class.getCanonicalName());
annotataions.add(Upload.onNoSupportBreakPoint.class.getCanonicalName());
annotataions.add(Upload.onTaskCancel.class.getCanonicalName());
@@ -73,6 +86,7 @@ import javax.lang.model.element.TypeElement;
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
mHandler.clean();
mHandler.handleDownload(roundEnv);
mHandler.handleDownloadGroup(roundEnv);
mHandler.handleUpload(roundEnv);
mHandler.createProxyFile();
return true;