Package io.jmix.core.impl.scanning
Class JmixModulesClasspathScanner
java.lang.Object
io.jmix.core.impl.scanning.AbstractClasspathScanner
io.jmix.core.impl.scanning.JmixModulesClasspathScanner
@Component("core_JmixModulesClasspathScanner")
public class JmixModulesClasspathScanner
extends AbstractClasspathScanner
Scans classpath of all Jmix modules used in the application and detects classes according to
ClasspathScanCandidateDetector
beans registered in the Spring context.
Detected class names are stored and available through the getClassNames(Class)
method. This method
accepts a ClasspathScanCandidateDetector
type and returns names of classes selected by this detector.
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected List<ClasspathScanCandidateDetector>
protected Map<Class<? extends ClasspathScanCandidateDetector>,
Set<String>> protected org.springframework.core.type.classreading.MetadataReaderFactory
Fields inherited from class io.jmix.core.impl.scanning.AbstractClasspathScanner
DEFAULT_CLASS_RESOURCE_PATTERN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetClassNames
(Class<? extends ClasspathScanCandidateDetector> detectorType) Returns the set of class names selected by a detector of the given type.protected org.springframework.core.env.Environment
protected org.springframework.core.type.classreading.MetadataReaderFactory
protected org.springframework.core.io.ResourceLoader
protected void
init()
void
Refreshes the set of class names corresponding to a detector passed.void
setJmixComponents
(JmixModules jmixModules) void
setMetadataReaderFactory
(AnnotationScanMetadataReaderFactory metadataReaderFactory) Methods inherited from class io.jmix.core.impl.scanning.AbstractClasspathScanner
resolveBasePackage, scanPackage
-
Field Details
-
metadataReaderFactory
protected org.springframework.core.type.classreading.MetadataReaderFactory metadataReaderFactory -
basePackages
-
detectedClasses
-
applicationContext
@Autowired protected org.springframework.context.ApplicationContext applicationContext -
candidateDetectors
-
-
Constructor Details
-
JmixModulesClasspathScanner
public JmixModulesClasspathScanner()
-
-
Method Details
-
setMetadataReaderFactory
@Autowired public void setMetadataReaderFactory(AnnotationScanMetadataReaderFactory metadataReaderFactory) -
setJmixComponents
-
init
@PostConstruct protected void init() -
getClassNames
Returns the set of class names selected by a detector of the given type. -
refreshClassNames
Refreshes the set of class names corresponding to a detector passed. -
getMetadataReaderFactory
protected org.springframework.core.type.classreading.MetadataReaderFactory getMetadataReaderFactory()- Specified by:
getMetadataReaderFactory
in classAbstractClasspathScanner
-
getResourceLoader
protected org.springframework.core.io.ResourceLoader getResourceLoader()- Specified by:
getResourceLoader
in classAbstractClasspathScanner
-
getEnvironment
protected org.springframework.core.env.Environment getEnvironment()- Specified by:
getEnvironment
in classAbstractClasspathScanner
-