Package org.jboss.shrinkwrap.impl
Class BeansXml
- java.lang.Object
-
- org.jboss.shrinkwrap.impl.BeansXml
-
- All Implemented Interfaces:
org.jboss.shrinkwrap.api.asset.Asset
public class BeansXml extends Object implements org.jboss.shrinkwrap.api.asset.Asset
Allows to create a beans.xml file programmatically. By default it uses discovery mode all and has version 3.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBeansXml.Exclude
-
Field Summary
Fields Modifier and Type Field Description static BeansXmlSUPPRESSOR
-
Constructor Summary
Constructors Constructor Description BeansXml()BeansXml(BeanDiscoveryMode mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BeansXmlalternatives(Class<?>... alternatives)BeansXmldecorators(Class<?>... decorators)BeansXmlexcludeFilters(BeansXml.Exclude... filters)BeanDiscoveryModegetBeanDiscoveryMode()BeansXmlVersiongetBeansXmlVersion()BeansXmlinterceptors(Class<?>... interceptors)InputStreamopenStream()BeansXmlsetBeanDiscoveryMode(BeanDiscoveryMode mode)Sets the discovery mode.BeansXmlsetBeansXmlVersion(BeansXmlVersion version)Sets the version.BeansXmlstereotype(Class<?>... stereotypes)
-
-
-
Field Detail
-
SUPPRESSOR
public static final BeansXml SUPPRESSOR
-
-
Constructor Detail
-
BeansXml
public BeansXml()
-
BeansXml
public BeansXml(BeanDiscoveryMode mode)
-
-
Method Detail
-
excludeFilters
public BeansXml excludeFilters(BeansXml.Exclude... filters)
-
setBeansXmlVersion
public BeansXml setBeansXmlVersion(BeansXmlVersion version)
Sets the version. Usenullto enforce a beans.xml without version attribute.- Parameters:
version- value of version attribute.nullif the attribute is to be omitted- Returns:
- this
-
getBeanDiscoveryMode
public BeanDiscoveryMode getBeanDiscoveryMode()
-
getBeansXmlVersion
public BeansXmlVersion getBeansXmlVersion()
-
setBeanDiscoveryMode
public BeansXml setBeanDiscoveryMode(BeanDiscoveryMode mode)
Sets the discovery mode. Usenullto enforce a beans.xml without bean discovery mode attribute.- Parameters:
mode- value of bean discovery mode attribute.nullif the attribute is to be omitted- Returns:
- this
-
openStream
public InputStream openStream()
- Specified by:
openStreamin interfaceorg.jboss.shrinkwrap.api.asset.Asset
-
-