Interface DiscoveryStrategy
- All Known Implementing Classes:
AbstractDiscoveryStrategy,JandexDiscoveryStrategy,ReflectionDiscoveryStrategy
public interface DiscoveryStrategy
This construct is not thread-safe.
- Author:
- Matej Briškár, Martin Kouba, Laird Nelson
-
Method Summary
Modifier and TypeMethodDescriptionorg.jboss.weld.resources.spi.ClassFileServicesvoidregisterHandler(BeanArchiveHandler handler) Register additionalBeanArchiveHandlerfor handling discovered bean archives.voidsetBootstrap(org.jboss.weld.bootstrap.api.Bootstrap bootstrap) Installs aBootstrapfor use by the implementation.voidsetInitialBeanDefiningAnnotations(Set<Class<? extends Annotation>> initialBeanDefiningAnnotations) Installs theSetof bean defining annotations that the implementation may use when discovering beans.voidsetResourceLoader(org.jboss.weld.resources.spi.ResourceLoader resourceLoader) Installs aResourceLoaderfor use by the implementation.voidsetScanner(BeanArchiveScanner beanArchiveScanner) Optionally, a client may set a custom scanner implementation.
-
Method Details
-
setResourceLoader
void setResourceLoader(org.jboss.weld.resources.spi.ResourceLoader resourceLoader) Installs aResourceLoaderfor use by the implementation.- Parameters:
resourceLoader- theResourceLoaderto install
-
setBootstrap
void setBootstrap(org.jboss.weld.bootstrap.api.Bootstrap bootstrap) Installs aBootstrapfor use by the implementation.- Parameters:
bootstrap- theBootstrapto install
-
setInitialBeanDefiningAnnotations
void setInitialBeanDefiningAnnotations(Set<Class<? extends Annotation>> initialBeanDefiningAnnotations) Installs theSetof bean defining annotations that the implementation may use when discovering beans.- Parameters:
initialBeanDefiningAnnotations- the initialSetof bean defining annotations
-
setScanner
Optionally, a client may set a custom scanner implementation. If not set, the impl is allowed to use anything it considers appropriate.- Parameters:
beanArchiveScanner-
-
registerHandler
Register additionalBeanArchiveHandlerfor handling discovered bean archives.- Parameters:
handler- the handler
-
performDiscovery
Set<WeldBeanDeploymentArchive> performDiscovery()- Returns:
- the set of discovered
WeldBeanDeploymentArchives
-
getClassFileServices
org.jboss.weld.resources.spi.ClassFileServices getClassFileServices()- Returns:
- the associated
ClassFileServicesornull
-