Class 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
    • Field Detail

      • SUPPRESSOR

        public static final BeansXml SUPPRESSOR
    • Constructor Detail

      • BeansXml

        public BeansXml()
    • Method Detail

      • alternatives

        public BeansXml alternatives​(Class<?>... alternatives)
      • interceptors

        public BeansXml interceptors​(Class<?>... interceptors)
      • decorators

        public BeansXml decorators​(Class<?>... decorators)
      • stereotype

        public BeansXml stereotype​(Class<?>... stereotypes)
      • setBeansXmlVersion

        public BeansXml setBeansXmlVersion​(BeansXmlVersion version)
        Sets the version. Use null to enforce a beans.xml without version attribute.
        Parameters:
        version - value of version attribute. null if the attribute is to be omitted
        Returns:
        this
      • setBeanDiscoveryMode

        public BeansXml setBeanDiscoveryMode​(BeanDiscoveryMode mode)
        Sets the discovery mode. Use null to enforce a beans.xml without bean discovery mode attribute.
        Parameters:
        mode - value of bean discovery mode attribute. null if the attribute is to be omitted
        Returns:
        this
      • openStream

        public InputStream openStream()
        Specified by:
        openStream in interface org.jboss.shrinkwrap.api.asset.Asset