public class GrailsComponentScanner extends Object
A Grails classes scanner that searches the classpath from an @GrailsComponentScanner specified packages.
| Constructor and description |
|---|
GrailsComponentScanner(ApplicationContext context)Create a new GrailsComponentScanner instance. |
GrailsComponentScanner(ApplicationContext context, ApplicationStartup applicationStartup) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected ClassPathScanningCandidateComponentProvider |
createClassPathScanningCandidateComponentProvider(ApplicationContext context)Create a ClassPathScanningCandidateComponentProvider to scan entities based on the specified ApplicationContext. |
|
public List<String> |
getPackages() |
|
public final Set<Class<?>> |
scan(Class<? extends Annotation> annotationTypes)Scan for entities with the specified annotations. |
Create a new GrailsComponentScanner instance.
context - the source application contextCreate a ClassPathScanningCandidateComponentProvider to scan entities based on the specified ApplicationContext.
context - the ApplicationContext to useScan for entities with the specified annotations.
annotationTypes - the annotation types used on the artefacts