/**
  * Scans for annotations on the view class and its methods using pre-configured {@link
  * AnnotationScanner}s (if any)
  */
 private void scanAnnotationsOnViewClass() {
   // nothing to do
   if (annotationScanners == null || annotationScanners.length == 0) {
     return;
   }
   final Class viewClass = this.locator.getViewType();
   final Method[] viewMethods = viewClass.getMethods();
   for (final AnnotationScanner annotationScanner : annotationScanners) {
     // scan class level annotations
     annotationScanner.scanClass(viewClass);
     // now method level annotations
     for (final Method viewMethod : viewMethods) {
       annotationScanner.scanMethod(viewMethod);
     }
   }
 }
Example #2
0
    public Map<Class<? extends Annotation>, Set<Class<?>>> call() throws Exception {

      Timer t = Timer.getInstance();
      if (t != null) {
        t.startTiming();
      }

      AnnotationScanner scanner = new AnnotationScanner(sc);
      Map<Class<? extends Annotation>, Set<Class<?>>> annotatedClasses =
          scanner.getAnnotatedClasses();

      if (t != null) {
        t.stopTiming();
        t.logResult("Configuration annotation scan complete.");
      }

      return annotatedClasses;
    }