Class ComponentScannerFactory


  • public class ComponentScannerFactory
    extends java.lang.Object
    A factory for ComponentScanners which can be configured with relevant annotations to scan for.
    • Constructor Summary

      Constructors 
      Constructor Description
      ComponentScannerFactory​(java.lang.reflect.AnnotatedElement[] typeAnnotations, java.lang.reflect.AnnotatedElement[] fieldAnnotations, java.lang.reflect.AnnotatedElement[] methodAnnotations, java.lang.reflect.AnnotatedElement[] constructorAnnotations)
      Constructs a new instance.
      ComponentScannerFactory​(java.lang.reflect.AnnotatedElement[] typeAnnotations, java.lang.reflect.AnnotatedElement[] fieldAnnotations, java.lang.reflect.AnnotatedElement[] methodAnnotations, java.lang.reflect.AnnotatedElement[] constructorAnnotations, java.util.function.Predicate<java.lang.Class<?>> filter)
      Constructs a new instance.
    • Constructor Detail

      • ComponentScannerFactory

        public ComponentScannerFactory​(java.lang.reflect.AnnotatedElement[] typeAnnotations,
                                       java.lang.reflect.AnnotatedElement[] fieldAnnotations,
                                       java.lang.reflect.AnnotatedElement[] methodAnnotations,
                                       java.lang.reflect.AnnotatedElement[] constructorAnnotations,
                                       java.util.function.Predicate<java.lang.Class<?>> filter)
        Constructs a new instance.
        Parameters:
        typeAnnotations - an array of annotations to scan for on types, cannot be null or contain nulls but can be empty
        fieldAnnotations - an array of annotations to scan for on fields, cannot be null or contain nulls but can be empty
        methodAnnotations - an array of annotations to scan for on methods, cannot be null or contain nulls but can be empty
        constructorAnnotations - an array of annotations to scan for on constructors, cannot be null or contain nulls but can be empty
        filter - an inclusion filter for the classes detected, can be null in which case all detected classes are included
      • ComponentScannerFactory

        public ComponentScannerFactory​(java.lang.reflect.AnnotatedElement[] typeAnnotations,
                                       java.lang.reflect.AnnotatedElement[] fieldAnnotations,
                                       java.lang.reflect.AnnotatedElement[] methodAnnotations,
                                       java.lang.reflect.AnnotatedElement[] constructorAnnotations)
        Constructs a new instance.
        Parameters:
        typeAnnotations - an array of annotations to scan for on types, cannot be null or contain nulls but can be empty
        fieldAnnotations - an array of annotations to scan for on fields, cannot be null or contain nulls but can be empty
        methodAnnotations - an array of annotations to scan for on methods, cannot be null or contain nulls but can be empty
        constructorAnnotations - an array of annotations to scan for on constructors, cannot be null or contain nulls but can be empty
    • Method Detail

      • create

        public ComponentScanner create​(java.lang.String... packageNamePrefixes)
        Creates a new ComponentScanner to scan for the given packages.
        Parameters:
        packageNamePrefixes - an array of package name prefixes, cannot be null
        Returns:
        a ComponentScanner, never null