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
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected List<ClasspathScanCandidateDetector>protected Map<Class<? extends ClasspathScanCandidateDetector>,Set<String>> protected org.springframework.core.type.classreading.MetadataReaderFactoryFields inherited from class io.jmix.core.impl.scanning.AbstractClasspathScanner
DEFAULT_CLASS_RESOURCE_PATTERN -
Constructor Summary
Constructors -
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.Environmentprotected org.springframework.core.type.classreading.MetadataReaderFactoryprotected org.springframework.core.io.ResourceLoaderprotected voidinit()voidRefreshes the set of class names corresponding to a detector passed.voidsetJmixComponents(JmixModules jmixModules) voidsetMetadataReaderFactory(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:
getMetadataReaderFactoryin classAbstractClasspathScanner
-
getResourceLoader
protected org.springframework.core.io.ResourceLoader getResourceLoader()- Specified by:
getResourceLoaderin classAbstractClasspathScanner
-
getEnvironment
protected org.springframework.core.env.Environment getEnvironment()- Specified by:
getEnvironmentin classAbstractClasspathScanner
-