Class AnnotationDetector

java.lang.Object
com.jk.core.annotations.AnnotationDetector

public class AnnotationDetector extends Object
This Class is used for scanning packages for classes with class annotations.
Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Constructor Details

    • AnnotationDetector

      public AnnotationDetector()
  • Method Details

    • scan

      public static void scan(Class<? extends Annotation> clas, String[] basePackage, AnnotationHandler handler)
      This method scans the package for classes with class annotations.

      Then proceed to call the found event on the provided handler.

      Parameters:
      clas - Specifies the class to be scanned
      basePackage - Specifies the base package of the classes.
      handler - Specifies the annotation handler.
    • scanAsList

      public static List<String> scanAsList(Class<? extends Annotation> clas, String... basePackage)
      This method scans list of classes in the base package for class annotations.
      Parameters:
      clas - Specifies the classes to be scanned.
      basePackage - Specifies the base package to be scanned.
      Returns:
      list of classes names.