Package org.jboss.weld.bootstrap.spi
Interface BeanDeploymentArchive
-
- All Known Implementing Classes:
ForwardingBeanDeploymentArchive
public interface BeanDeploymentArchive
Represents a CDI bean deployment archive. A deployment archive is any library jar, library directory, EJB jar, rar archive or any war WEB-INF/classes directory contained in the Java EE deployment (as defined in the Java Platform, Enterprise Edition (Java EE) Specification, v6, Section 8.1.2). A bean deployment archive is any deployment archive with a META-INF/beans.xml file, or for a war, with a WEB-INF/beans.xml. The container is allowed to specify a deployment archive asBeanDeploymentArchive
even if no beans.xml is present (for example, a container could define a deployment archive with container specific metadata to be a bean deployment archive).- Author:
- Pete Muir
- See Also:
Deployment
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Collection<String>
getBeanClasses()
Gets all classes in the bean deployment archive.Collection<BeanDeploymentArchive>
getBeanDeploymentArchives()
Get the bean deployment archives which are accessible to this bean deployment archive and adjacent to it in the deployment archive graph.BeansXml
getBeansXml()
Get any deployment descriptors in the bean deployment archive.Collection<EjbDescriptor<?>>
getEjbs()
Get all the EJBs in the deployment archiveString
getId()
Get a string which uniquely identifies theBeanDeploymentArchive
within theDeployment
.default Collection<String>
getKnownClasses()
If possible, return all the classes found in the archive.default Collection<Class<?>>
getLoadedBeanClasses()
Get all pre-loaded classes for the bean deployment archive.ServiceRegistry
getServices()
Get the Bean Deployment Archive scoped services
-
-
-
Method Detail
-
getBeanDeploymentArchives
Collection<BeanDeploymentArchive> getBeanDeploymentArchives()
Get the bean deployment archives which are accessible to this bean deployment archive and adjacent to it in the deployment archive graph. Cycles in the accessible BeanDeploymentArchive graph are allowed. If a cycle is detected by Weld, it will be automatically removed by Web Beans. This means any implementor of this interface don't need to worry about circularities.- Returns:
- the accessible bean deployment archives
-
getBeanClasses
Collection<String> getBeanClasses()
Gets all classes in the bean deployment archive.For an explicit bean archive this method returns a collection of all types present within the archive.
For an implicit bean archive this method returns all the types found in the archive which are annotated with a bean defining annotation or are Session bean definitions.
- Returns:
- the classes, empty if no classes are present
-
getLoadedBeanClasses
default Collection<Class<?>> getLoadedBeanClasses()
Get all pre-loaded classes for the bean deployment archive. Weld checks if there is an overlap of FQCNs between the classes returned from this method and class names returned fromgetBeanClasses()
. If two names overlap the class object returned from this method is used.- Returns:
- the classes, empty if no pre-loaded classes are available
- Since:
- 3.0
-
getKnownClasses
default Collection<String> getKnownClasses()
If possible, return all the classes found in the archive. For explicit bean archive the result of this method should be the same as forgetBeanClasses()
. For implicit bean archive this method should also return types which are neither annotated with bean defining annotations nor are Session bean definitions.- Returns:
- all classes found in the bean deployment archive, empty if no classes are present
- Since:
- 3.0
-
getBeansXml
BeansXml getBeansXml()
Get any deployment descriptors in the bean deployment archive. The container will return a a merged view of the beans.xml per bean deployment archive. This will normally represent a single file such as the physical META-INF/beans.xml or WEB-INF/beans.xml) The container may choose to parse beans.xml itself, or it may use Weld to parse beans.xml- Returns:
- the parsed beans.xml
- See Also:
Bootstrap.parse(java.net.URL)
,Bootstrap.parse(Iterable)
-
getEjbs
Collection<EjbDescriptor<?>> getEjbs()
Get all the EJBs in the deployment archive- Returns:
- the EJBs, or empty if no EJBs are present or if this is not an EJB archive
-
getServices
ServiceRegistry getServices()
Get the Bean Deployment Archive scoped services- Returns:
- bean deployment archive scoped services
-
getId
String getId()
Get a string which uniquely identifies theBeanDeploymentArchive
within theDeployment
. The identifier must be consistent between multiple occurrences of this deployment.- Returns:
- identifier of BeanDeploymentArchive
-
-