protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts) throws AnnotationProcessorException { Schedules annotation = (Schedules) ainfo.getAnnotation(); Schedule[] schAnnotations = annotation.value(); List<HandlerProcessingResult> results = new ArrayList<HandlerProcessingResult>(); for(Schedule sch : schAnnotations) { results.add(processSchedule(sch, ainfo, ejbContexts)); } return getOverallProcessingResult(results); }
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts) throws AnnotationProcessorException { Schedules annotation = (Schedules) ainfo.getAnnotation(); Schedule[] schAnnotations = annotation.value(); List<HandlerProcessingResult> results = new ArrayList<HandlerProcessingResult>(); for(Schedule sch : schAnnotations) { results.add(processSchedule(sch, ainfo, ejbContexts)); } return getOverallProcessingResult(results); }
/** * Introspects the method for scheduling attributes. */ public ArrayList<TimerTask> introspect(TimeoutCaller caller, AnnotatedType<?> type) { ArrayList<TimerTask> timers = null; for (AnnotatedMethod<?> method : type.getMethods()) { Schedules schedules = method.getAnnotation(Schedules.class); if (schedules != null) { if (timers == null) timers = new ArrayList<TimerTask>(); for (Schedule schedule : schedules.value()) { addSchedule(timers, schedule, caller, getScheduledMethod(method)); } } Schedule schedule = method.getAnnotation(Schedule.class); if (schedule != null) { if (timers == null) timers = new ArrayList<TimerTask>(); addSchedule(timers, schedule, caller, getScheduledMethod(method)); } } return timers; }
scheduleAnnotationList.addAll(asList(schedulesAnnotation.value()));
scheduleAnnotationList.addAll(Arrays.asList(schedulesAnnotation.value()));
list.addAll(asList(schedulesAnnotation.value()));