public abstract class AbstractDiscoveryStrategy extends Object implements DiscoveryStrategy
Modifier and Type | Field and Description |
---|---|
protected org.jboss.weld.bootstrap.api.Bootstrap |
bootstrap |
protected Set<Class<? extends Annotation>> |
initialBeanDefiningAnnotations |
protected org.jboss.weld.resources.spi.ResourceLoader |
resourceLoader |
protected BeanArchiveScanner |
scanner |
Modifier | Constructor and Description |
---|---|
protected |
AbstractDiscoveryStrategy() |
|
AbstractDiscoveryStrategy(org.jboss.weld.resources.spi.ResourceLoader resourceLoader,
org.jboss.weld.bootstrap.api.Bootstrap bootstrap,
Set<Class<? extends Annotation>> initialBeanDefiningAnnotations) |
Modifier and Type | Method and Description |
---|---|
protected void |
addToArchives(Set<WeldBeanDeploymentArchive> deploymentArchives,
WeldBeanDeploymentArchive bda) |
protected void |
afterDiscovery(Set<WeldBeanDeploymentArchive> archives) |
protected void |
beforeDiscovery(Collection<BeanArchiveBuilder> builders)
Initialize the strategy before accessing found BeanArchiveBuilder builders.
|
org.jboss.weld.resources.spi.ClassFileServices |
getClassFileServices() |
Set<WeldBeanDeploymentArchive> |
performDiscovery() |
protected WeldBeanDeploymentArchive |
processAllDiscovery(BeanArchiveBuilder builder)
Process the bean archive with bean-discovery-mode of all.
|
protected WeldBeanDeploymentArchive |
processAnnotatedDiscovery(BeanArchiveBuilder builder)
Process the bean archive with bean-discovery-mode of annotated.
|
protected WeldBeanDeploymentArchive |
processNoneDiscovery(BeanArchiveBuilder builder)
Process the bean archive with bean-discovery-mode of none.
|
void |
registerHandler(BeanArchiveHandler handler)
Register additional
BeanArchiveHandler for handling discovered bean archives. |
void |
setBootstrap(org.jboss.weld.bootstrap.api.Bootstrap bootstrap)
Installs a
Bootstrap for use by the
implementation. |
void |
setInitialBeanDefiningAnnotations(Set<Class<? extends Annotation>> initialBeanDefiningAnnotations)
Installs the
Set of bean defining annotations that the
implementation may use when discovering beans. |
void |
setResourceLoader(org.jboss.weld.resources.spi.ResourceLoader resourceLoader)
Installs a
ResourceLoader for use by the
implementation. |
void |
setScanner(BeanArchiveScanner scanner)
Optionally, a client may set a custom scanner implementation.
|
protected org.jboss.weld.resources.spi.ResourceLoader resourceLoader
protected org.jboss.weld.bootstrap.api.Bootstrap bootstrap
protected Set<Class<? extends Annotation>> initialBeanDefiningAnnotations
protected BeanArchiveScanner scanner
protected AbstractDiscoveryStrategy()
public AbstractDiscoveryStrategy(org.jboss.weld.resources.spi.ResourceLoader resourceLoader, org.jboss.weld.bootstrap.api.Bootstrap bootstrap, Set<Class<? extends Annotation>> initialBeanDefiningAnnotations)
resourceLoader
- bootstrap
- initialBeanDefiningAnnotations
- public void setResourceLoader(org.jboss.weld.resources.spi.ResourceLoader resourceLoader)
DiscoveryStrategy
ResourceLoader
for use by the
implementation.setResourceLoader
in interface DiscoveryStrategy
resourceLoader
- the ResourceLoader
to installpublic void setBootstrap(org.jboss.weld.bootstrap.api.Bootstrap bootstrap)
DiscoveryStrategy
Bootstrap
for use by the
implementation.setBootstrap
in interface DiscoveryStrategy
bootstrap
- the Bootstrap
to installpublic void setScanner(BeanArchiveScanner scanner)
DiscoveryStrategy
setScanner
in interface DiscoveryStrategy
public void setInitialBeanDefiningAnnotations(Set<Class<? extends Annotation>> initialBeanDefiningAnnotations)
DiscoveryStrategy
Set
of bean defining annotations that the
implementation may use when discovering beans.setInitialBeanDefiningAnnotations
in interface DiscoveryStrategy
initialBeanDefiningAnnotations
- the initial Set
of bean defining annotationspublic Set<WeldBeanDeploymentArchive> performDiscovery()
performDiscovery
in interface DiscoveryStrategy
WeldBeanDeploymentArchive
spublic org.jboss.weld.resources.spi.ClassFileServices getClassFileServices()
getClassFileServices
in interface DiscoveryStrategy
ClassFileServices
or null
protected void addToArchives(Set<WeldBeanDeploymentArchive> deploymentArchives, WeldBeanDeploymentArchive bda)
protected void beforeDiscovery(Collection<BeanArchiveBuilder> builders)
protected void afterDiscovery(Set<WeldBeanDeploymentArchive> archives)
protected WeldBeanDeploymentArchive processNoneDiscovery(BeanArchiveBuilder builder)
protected WeldBeanDeploymentArchive processAnnotatedDiscovery(BeanArchiveBuilder builder)
protected WeldBeanDeploymentArchive processAllDiscovery(BeanArchiveBuilder builder)
public void registerHandler(BeanArchiveHandler handler)
DiscoveryStrategy
BeanArchiveHandler
for handling discovered bean archives.registerHandler
in interface DiscoveryStrategy
handler
- the handlerCopyright © 2020. All rights reserved.