Package org.int4.dirk.plugins
Class ComponentScannerFactory
- java.lang.Object
-
- org.int4.dirk.plugins.ComponentScannerFactory
-
public class ComponentScannerFactory extends java.lang.ObjectA factory forComponentScanners 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentScannercreate(java.lang.String... packageNamePrefixes)Creates a newComponentScannerto scan for the given packages.ComponentScannercreate(java.net.URL... urls)Creates a newComponentScannerto scan for the givenURLs.
-
-
-
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 benullor containnulls but can be emptyfieldAnnotations- an array of annotations to scan for on fields, cannot benullor containnulls but can be emptymethodAnnotations- an array of annotations to scan for on methods, cannot benullor containnulls but can be emptyconstructorAnnotations- an array of annotations to scan for on constructors, cannot benullor containnulls but can be emptyfilter- an inclusion filter for the classes detected, can benullin 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 benullor containnulls but can be emptyfieldAnnotations- an array of annotations to scan for on fields, cannot benullor containnulls but can be emptymethodAnnotations- an array of annotations to scan for on methods, cannot benullor containnulls but can be emptyconstructorAnnotations- an array of annotations to scan for on constructors, cannot benullor containnulls but can be empty
-
-
Method Detail
-
create
public ComponentScanner create(java.lang.String... packageNamePrefixes)
Creates a newComponentScannerto scan for the given packages.- Parameters:
packageNamePrefixes- an array of package name prefixes, cannot benull- Returns:
- a
ComponentScanner, nevernull
-
create
public ComponentScanner create(java.net.URL... urls)
Creates a newComponentScannerto scan for the givenURLs.- Parameters:
urls- an array ofURLs, cannot benull- Returns:
- a
ComponentScanner, nevernull
-
-